|
||||
File indexing completed on 2025-01-18 10:03:04
0001 // Created on: 2018-03-16 0002 // Created by: Eugeny MALTCHIKOV 0003 // Copyright (c) 2018 OPEN CASCADE SAS 0004 // 0005 // This file is part of Open CASCADE Technology software library. 0006 // 0007 // This library is free software; you can redistribute it and/or modify it under 0008 // the terms of the GNU Lesser General Public License version 2.1 as published 0009 // by the Free Software Foundation, with special exception defined in the file 0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0011 // distribution for complete text of the license and disclaimer of any warranty. 0012 // 0013 // Alternatively, this file may be used under the terms of Open CASCADE 0014 // commercial license or contractual agreement. 0015 0016 #ifndef _BOPAlgo_MakePeriodic_HeaderFile 0017 #define _BOPAlgo_MakePeriodic_HeaderFile 0018 0019 #include <Standard.hxx> 0020 #include <Standard_DefineAlloc.hxx> 0021 #include <Standard_Handle.hxx> 0022 0023 #include <BOPAlgo_Options.hxx> 0024 #include <BRepTools_History.hxx> 0025 #include <Standard_Boolean.hxx> 0026 #include <TopoDS_Shape.hxx> 0027 #include <TopTools_DataMapOfShapeShape.hxx> 0028 0029 //! BOPAlgo_MakePeriodic is the tool for making an arbitrary shape periodic 0030 //! in 3D space in specified directions. 0031 //! 0032 //! Periodicity of the shape means that the shape can be repeated in any 0033 //! periodic direction any number of times without creation of the new 0034 //! geometry or splits. 0035 //! 0036 //! The idea is to make the shape look identical on the opposite sides of the 0037 //! periodic directions, so when translating the copy of a shape on the period 0038 //! there will be no coinciding parts of different dimensions. 0039 //! 0040 //! If necessary the algorithm will trim the shape to fit it into the 0041 //! requested period by splitting it by the planes limiting the shape's 0042 //! requested period. 0043 //! 0044 //! For making the shape periodic in certain direction the algorithm performs 0045 //! the following steps: 0046 //! * Creates the copy of the shape and moves it on the period into negative 0047 //! side of the requested direction; 0048 //! * Splits the negative side of the shape by the moved copy, ensuring copying 0049 //! of the geometry from positive side to negative; 0050 //! * Creates the copy of the shape (with already split negative side) and moves 0051 //! it on the period into the positive side of the requested direction; 0052 //! * Splits the positive side of the shape by the moved copy, ensuring copying 0053 //! of the geometry from negative side to positive. 0054 //! 0055 //! The algorithm also associates the identical (or twin) shapes located 0056 //! on the opposite sides of the result shape. 0057 //! Using the *GetTwins()* method it is possible to get the twin shapes from 0058 //! the opposite sides. 0059 //! 0060 //! Algorithm also provides the methods to repeat the periodic shape in 0061 //! periodic directions. The subsequent repetitions are performed on the 0062 //! repeated shape, thus repeating the shape two times in X direction will 0063 //! create result in three shapes (original plus two copies). 0064 //! Single subsequent repetition will result already in 6 shapes. 0065 //! The repetitions can be cleared and started over. 0066 //! 0067 //! The algorithm supports History of shapes modifications, thus 0068 //! it is possible to track how the shape has been changed to make it periodic 0069 //! and what new shapes have been created during repetitions. 0070 //! 0071 //! The algorithm supports the parallel processing mode, which allows faster 0072 //! completion of the operations. 0073 //! 0074 //! The algorithm supports the Error/Warning system and returns the following alerts: 0075 //! - *BOPAlgo_AlertNoPeriodicityRequired* - Error alert is given if no periodicity 0076 //! has been requested in any direction; 0077 //! - *BOPAlgo_AlertUnableToTrim* - Error alert is given if the trimming of the shape 0078 //! for fitting it into requested period has failed; 0079 //! - *BOPAlgo_AlertUnableToMakeIdentical* - Error alert is given if splitting of the 0080 //! shape by its moved copies has failed; 0081 //! - *BOPAlgo_AlertUnableToRepeat* - Warning alert is given if the gluing of the repeated 0082 //! shapes has failed. 0083 //! 0084 //! Example of usage of the algorithm: 0085 //! ~~~~ 0086 //! TopoDS_Shape aShape = ...; // The shape to make periodic 0087 //! Standard_Boolean bMakeXPeriodic = ...; // Flag for making or not the shape periodic in X direction 0088 //! Standard_Real aXPeriod = ...; // X period for the shape 0089 //! Standard_Boolean isXTrimmed = ...; // Flag defining whether it is necessary to trimming 0090 //! // the shape to fit to X period 0091 //! Standard_Real aXFirst = ...; // Start of the X period 0092 //! // (really necessary only if the trimming is requested) 0093 //! Standard_Boolean bRunParallel = ...; // Parallel processing mode or single 0094 //! 0095 //! BOPAlgo_MakePeriodic aPeriodicityMaker; // Periodicity maker 0096 //! aPeriodicityMaker.SetShape(aShape); // Set the shape 0097 //! aPeriodicityMaker.MakeXPeriodic(bMakePeriodic, aXPeriod); // Making the shape periodic in X direction 0098 //! aPeriodicityMaker.SetTrimmed(isXTrimmed, aXFirst); // Trim the shape to fit X period 0099 //! aPeriodicityMaker.SetRunParallel(bRunParallel); // Set the parallel processing mode 0100 //! aPeriodicityMaker.Perform(); // Performing the operation 0101 //! 0102 //! if (aPeriodicityMaker.HasErrors()) // Check for the errors 0103 //! { 0104 //! // errors treatment 0105 //! Standard_SStream aSStream; 0106 //! aPeriodicityMaker.DumpErrors(aSStream); 0107 //! return; 0108 //! } 0109 //! if (aPeriodicityMaker.HasWarnings()) // Check for the warnings 0110 //! { 0111 //! // warnings treatment 0112 //! Standard_SStream aSStream; 0113 //! aPeriodicityMaker.DumpWarnings(aSStream); 0114 //! } 0115 //! const TopoDS_Shape& aPeriodicShape = aPeriodicityMaker.Shape(); // Result periodic shape 0116 //! 0117 //! 0118 //! aPeriodicityMaker.XRepeat(2); // Making repetitions 0119 //! const TopoDS_Shape& aRepeat = aPeriodicityMaker.RepeatedShape(); // Getting the repeated shape 0120 //! aPeriodicityMaker.ClearRepetitions(); // Clearing the repetitions 0121 //! ~~~~ 0122 //! 0123 class BOPAlgo_MakePeriodic : public BOPAlgo_Options 0124 { 0125 public: 0126 0127 DEFINE_STANDARD_ALLOC 0128 0129 public: //! @name Constructor 0130 0131 //! Empty constructor 0132 BOPAlgo_MakePeriodic() : BOPAlgo_Options() 0133 { 0134 myRepeatPeriod[0] = myRepeatPeriod[1] = myRepeatPeriod[2] = 0.0; 0135 } 0136 0137 0138 public: //! @name Setting the shape to make it periodic 0139 0140 //! Sets the shape to make it periodic. 0141 //! @param theShape [in] The shape to make periodic. 0142 void SetShape(const TopoDS_Shape& theShape) 0143 { 0144 myInputShape = theShape; 0145 } 0146 0147 0148 public: //! @name Definition of the structure to keep all periodicity parameters 0149 0150 //! Structure to keep all periodicity parameters: 0151 struct PeriodicityParams 0152 { 0153 PeriodicityParams() 0154 { 0155 Clear(); 0156 } 0157 0158 //! Returns all previously set parameters to default values 0159 void Clear() 0160 { 0161 myPeriodic[0] = myPeriodic[1] = myPeriodic[2] = Standard_False; 0162 myPeriod[0] = myPeriod[1] = myPeriod[2] = 0.0; 0163 myIsTrimmed[0] = myIsTrimmed[1] = myIsTrimmed[2] = Standard_True; 0164 myPeriodFirst[0] = myPeriodFirst[1] = myPeriodFirst[2] = 0.0; 0165 } 0166 0167 Standard_Boolean myPeriodic[3]; //!< Array of flags defining whether the shape should be 0168 //! periodic in XYZ directions 0169 Standard_Real myPeriod[3]; //!< Array of XYZ period values. Defining the period for any 0170 //! direction the corresponding flag for that direction in 0171 //! myPeriodic should be set to true 0172 Standard_Boolean myIsTrimmed[3]; //!< Array of flags defining whether the input shape has to be 0173 //! trimmed to fit the required period in the required direction 0174 Standard_Real myPeriodFirst[3]; //!< Array of start parameters of the XYZ periods: required for trimming 0175 }; 0176 0177 0178 public: //! @name Setters/Getters for periodicity parameters structure 0179 0180 //! Sets the periodicity parameters. 0181 //! @param theParams [in] Periodicity parameters 0182 void SetPeriodicityParameters(const PeriodicityParams& theParams) 0183 { 0184 myPeriodicityParams = theParams; 0185 } 0186 0187 const PeriodicityParams& PeriodicityParameters() const 0188 { 0189 return myPeriodicityParams; 0190 } 0191 0192 0193 public: //! @name Methods for setting/getting periodicity info using ID as a direction 0194 0195 //! Sets the flag to make the shape periodic in specified direction: 0196 //! - 0 - X direction; 0197 //! - 1 - Y direction; 0198 //! - 2 - Z direction. 0199 //! 0200 //! @param theDirectionID [in] The direction's ID; 0201 //! @param theIsPeriodic [in] Flag defining periodicity in given direction; 0202 //! @param thePeriod [in] Required period in given direction. 0203 void MakePeriodic(const Standard_Integer theDirectionID, 0204 const Standard_Boolean theIsPeriodic, 0205 const Standard_Real thePeriod = 0.0) 0206 { 0207 Standard_Integer id = ToDirectionID(theDirectionID); 0208 myPeriodicityParams.myPeriodic[id] = theIsPeriodic; 0209 myPeriodicityParams.myPeriod[id] = theIsPeriodic ? thePeriod : 0.0; 0210 } 0211 0212 //! Returns the info about Periodicity of the shape in specified direction. 0213 //! @param theDirectionID [in] The direction's ID. 0214 Standard_Boolean IsPeriodic(const Standard_Integer theDirectionID) const 0215 { 0216 return myPeriodicityParams.myPeriodic[ToDirectionID(theDirectionID)]; 0217 } 0218 0219 //! Returns the Period of the shape in specified direction. 0220 //! @param theDirectionID [in] The direction's ID. 0221 Standard_Real Period(const Standard_Integer theDirectionID) const 0222 { 0223 Standard_Integer id = ToDirectionID(theDirectionID); 0224 return myPeriodicityParams.myPeriodic[id] ? myPeriodicityParams.myPeriod[id] : 0.0; 0225 } 0226 0227 0228 public: //! @name Named methods for setting/getting info about shape's periodicity 0229 0230 //! Sets the flag to make the shape periodic in X direction. 0231 //! @param theIsPeriodic [in] Flag defining periodicity in X direction; 0232 //! @param thePeriod [in] Required period in X direction. 0233 void MakeXPeriodic(const Standard_Boolean theIsPeriodic, 0234 const Standard_Real thePeriod = 0.0) 0235 { 0236 MakePeriodic(0, theIsPeriodic, thePeriod); 0237 } 0238 0239 //! Returns the info about periodicity of the shape in X direction. 0240 Standard_Boolean IsXPeriodic() const { return IsPeriodic(0); } 0241 0242 //! Returns the XPeriod of the shape 0243 Standard_Real XPeriod() const { return Period(0); } 0244 0245 //! Sets the flag to make the shape periodic in Y direction. 0246 //! @param theIsPeriodic [in] Flag defining periodicity in Y direction; 0247 //! @param thePeriod [in] Required period in Y direction. 0248 void MakeYPeriodic(const Standard_Boolean theIsPeriodic, 0249 const Standard_Real thePeriod = 0.0) 0250 { 0251 MakePeriodic(1, theIsPeriodic, thePeriod); 0252 } 0253 0254 //! Returns the info about periodicity of the shape in Y direction. 0255 Standard_Boolean IsYPeriodic() const { return IsPeriodic(1); } 0256 0257 //! Returns the YPeriod of the shape. 0258 Standard_Real YPeriod() const { return Period(1); } 0259 0260 //! Sets the flag to make the shape periodic in Z direction. 0261 //! @param theIsPeriodic [in] Flag defining periodicity in Z direction; 0262 //! @param thePeriod [in] Required period in Z direction. 0263 void MakeZPeriodic(const Standard_Boolean theIsPeriodic, 0264 const Standard_Real thePeriod = 0.0) 0265 { 0266 MakePeriodic(2, theIsPeriodic, thePeriod); 0267 } 0268 0269 //! Returns the info about periodicity of the shape in Z direction. 0270 Standard_Boolean IsZPeriodic() const { return IsPeriodic(2); } 0271 0272 //! Returns the ZPeriod of the shape. 0273 Standard_Real ZPeriod() const { return Period(2); } 0274 0275 0276 public: //! @name Methods for setting/getting trimming info taking Direction ID as a parameter 0277 0278 //! Defines whether the input shape is already trimmed in specified direction 0279 //! to fit the period in this direction. 0280 //! Direction is defined by an ID: 0281 //! - 0 - X direction; 0282 //! - 1 - Y direction; 0283 //! - 2 - Z direction. 0284 //! 0285 //! If the shape is not trimmed it is required to set the first parameter 0286 //! of the period in that direction. 0287 //! The algorithm will make the shape fit into the period. 0288 //! 0289 //! Before calling this method, the shape has to be set to be periodic in this direction. 0290 //! 0291 //! @param theDirectionID [in] The direction's ID; 0292 //! @param theIsTrimmed [in] The flag defining trimming of the shape in given direction; 0293 //! @param theFirst [in] The first periodic parameter in the given direction. 0294 void SetTrimmed(const Standard_Integer theDirectionID, 0295 const Standard_Boolean theIsTrimmed, 0296 const Standard_Real theFirst = 0.0) 0297 { 0298 Standard_Integer id = ToDirectionID(theDirectionID); 0299 if (IsPeriodic(id)) 0300 { 0301 myPeriodicityParams.myIsTrimmed[id] = theIsTrimmed; 0302 myPeriodicityParams.myPeriodFirst[id] = !theIsTrimmed ? theFirst : 0.0; 0303 } 0304 } 0305 0306 //! Returns whether the input shape was trimmed in the specified direction. 0307 //! @param theDirectionID [in] The direction's ID. 0308 Standard_Boolean IsInputTrimmed(const Standard_Integer theDirectionID) const 0309 { 0310 return myPeriodicityParams.myIsTrimmed[ToDirectionID(theDirectionID)]; 0311 } 0312 0313 //! Returns the first periodic parameter in the specified direction. 0314 //! @param theDirectionID [in] The direction's ID. 0315 Standard_Real PeriodFirst(const Standard_Integer theDirectionID) const 0316 { 0317 Standard_Integer id = ToDirectionID(theDirectionID); 0318 return !myPeriodicityParams.myIsTrimmed[id] ? myPeriodicityParams.myPeriodFirst[id] : 0.0; 0319 } 0320 0321 0322 public: //! @name Named methods for setting/getting trimming info 0323 0324 //! Defines whether the input shape is already trimmed in X direction 0325 //! to fit the X period. If the shape is not trimmed it is required 0326 //! to set the first parameter for the X period. 0327 //! The algorithm will make the shape fit into the period. 0328 //! 0329 //! Before calling this method, the shape has to be set to be periodic in this direction. 0330 //! 0331 //! @param theIsTrimmed [in] Flag defining whether the shape is already trimmed 0332 //! in X direction to fit the X period; 0333 //! @param theFirst [in] The first X periodic parameter. 0334 void SetXTrimmed(const Standard_Boolean theIsTrimmed, 0335 const Standard_Boolean theFirst = 0.0) 0336 { 0337 SetTrimmed(0, theIsTrimmed, theFirst); 0338 } 0339 0340 //! Returns whether the input shape was already trimmed for X period. 0341 Standard_Boolean IsInputXTrimmed() const 0342 { 0343 return IsInputTrimmed(0); 0344 } 0345 0346 //! Returns the first parameter for the X period. 0347 Standard_Real XPeriodFirst() const 0348 { 0349 return PeriodFirst(0); 0350 } 0351 0352 //! Defines whether the input shape is already trimmed in Y direction 0353 //! to fit the Y period. If the shape is not trimmed it is required 0354 //! to set the first parameter for the Y period. 0355 //! The algorithm will make the shape fit into the period. 0356 //! 0357 //! Before calling this method, the shape has to be set to be periodic in this direction. 0358 //! 0359 //! @param theIsTrimmed [in] Flag defining whether the shape is already trimmed 0360 //! in Y direction to fit the Y period; 0361 //! @param theFirst [in] The first Y periodic parameter. 0362 void SetYTrimmed(const Standard_Boolean theIsTrimmed, 0363 const Standard_Boolean theFirst = 0.0) 0364 { 0365 SetTrimmed(1, theIsTrimmed, theFirst); 0366 } 0367 0368 //! Returns whether the input shape was already trimmed for Y period. 0369 Standard_Boolean IsInputYTrimmed() const 0370 { 0371 return IsInputTrimmed(1); 0372 } 0373 0374 //! Returns the first parameter for the Y period. 0375 Standard_Real YPeriodFirst() const 0376 { 0377 return PeriodFirst(1); 0378 } 0379 0380 //! Defines whether the input shape is already trimmed in Z direction 0381 //! to fit the Z period. If the shape is not trimmed it is required 0382 //! to set the first parameter for the Z period. 0383 //! The algorithm will make the shape fit into the period. 0384 //! 0385 //! Before calling this method, the shape has to be set to be periodic in this direction. 0386 //! 0387 //! @param theIsTrimmed [in] Flag defining whether the shape is already trimmed 0388 //! in Z direction to fit the Z period; 0389 //! @param theFirst [in] The first Z periodic parameter. 0390 void SetZTrimmed(const Standard_Boolean theIsTrimmed, 0391 const Standard_Boolean theFirst = 0.0) 0392 { 0393 SetTrimmed(2, theIsTrimmed, theFirst); 0394 } 0395 0396 //! Returns whether the input shape was already trimmed for Z period. 0397 Standard_Boolean IsInputZTrimmed() const 0398 { 0399 return IsInputTrimmed(2); 0400 } 0401 0402 //! Returns the first parameter for the Z period. 0403 Standard_Real ZPeriodFirst() const 0404 { 0405 return PeriodFirst(2); 0406 } 0407 0408 public: //! @name Performing the operation 0409 0410 //! Makes the shape periodic in necessary directions 0411 Standard_EXPORT void Perform(); 0412 0413 0414 public: //! @name Using the algorithm to repeat the shape 0415 0416 //! Performs repetition of the shape in specified direction 0417 //! required number of times. 0418 //! Negative value of times means that the repetition should 0419 //! be perform in negative direction. 0420 //! Makes the repeated shape a base for following repetitions. 0421 //! 0422 //! @param theDirectionID [in] The direction's ID; 0423 //! @param theTimes [in] Requested number of repetitions. 0424 Standard_EXPORT const TopoDS_Shape& RepeatShape(const Standard_Integer theDirectionID, 0425 const Standard_Integer theTimes); 0426 0427 //! Repeats the shape in X direction specified number of times. 0428 //! Negative value of times means that the repetition should be 0429 //! perform in negative X direction. 0430 //! Makes the repeated shape a base for following repetitions. 0431 //! 0432 //! @param theTimes [in] Requested number of repetitions. 0433 const TopoDS_Shape& XRepeat(const Standard_Integer theTimes) 0434 { 0435 return RepeatShape(0, theTimes); 0436 } 0437 0438 //! Repeats the shape in Y direction specified number of times. 0439 //! Negative value of times means that the repetition should be 0440 //! perform in negative Y direction. 0441 //! Makes the repeated shape a base for following repetitions. 0442 //! 0443 //! @param theTimes [in] Requested number of repetitions. 0444 const TopoDS_Shape& YRepeat(const Standard_Integer theTimes) 0445 { 0446 return RepeatShape(1, theTimes); 0447 } 0448 0449 //! Repeats the shape in Z direction specified number of times. 0450 //! Negative value of times means that the repetition should be 0451 //! perform in negative Z direction. 0452 //! Makes the repeated shape a base for following repetitions. 0453 //! 0454 //! @param theTimes [in] Requested number of repetitions. 0455 const TopoDS_Shape& ZRepeat(const Standard_Integer theTimes) 0456 { 0457 return RepeatShape(2, theTimes); 0458 } 0459 0460 0461 public: //! @name Starting the repetitions over 0462 0463 //! Returns the repeated shape 0464 const TopoDS_Shape& RepeatedShape() const { return myRepeatedShape; } 0465 0466 //! Clears all performed repetitions. 0467 //! The next repetition will be performed on the base shape. 0468 void ClearRepetitions() 0469 { 0470 myRepeatPeriod[0] = myRepeatPeriod[1] = myRepeatPeriod[2] = 0.0; 0471 myRepeatedShape.Nullify(); 0472 myRepeatedTwins.Clear(); 0473 if (!myHistory.IsNull()) 0474 { 0475 myHistory->Clear(); 0476 if (!mySplitHistory.IsNull()) 0477 myHistory->Merge(mySplitHistory); 0478 } 0479 } 0480 0481 public: //! @name Obtaining the result shape 0482 0483 //! Returns the resulting periodic shape 0484 const TopoDS_Shape& Shape() const { return myShape; } 0485 0486 0487 public: //! @name Getting the identical shapes 0488 0489 //! Returns the identical shapes for the given shape located 0490 //! on the opposite periodic side. 0491 //! Returns empty list in case the shape has no twin. 0492 //! 0493 //! @param theS [in] Shape to get the twins for. 0494 const TopTools_ListOfShape& GetTwins(const TopoDS_Shape& theS) const 0495 { 0496 static TopTools_ListOfShape empty; 0497 const TopTools_ListOfShape* aTwins = 0498 myRepeatedTwins.IsEmpty() ? myTwins.Seek(theS) : myRepeatedTwins.Seek(theS); 0499 return (aTwins ? *aTwins : empty); 0500 } 0501 0502 0503 public: //! @name Getting the History of the algorithm 0504 0505 //! Returns the History of the algorithm 0506 const Handle(BRepTools_History)& History() const 0507 { 0508 return myHistory; 0509 } 0510 0511 public: //! @name Clearing the algorithm from previous runs 0512 0513 //! Clears the algorithm from previous runs 0514 void Clear() 0515 { 0516 BOPAlgo_Options::Clear(); 0517 myPeriodicityParams.Clear(); 0518 myShape.Nullify(); 0519 if (!mySplitHistory.IsNull()) 0520 mySplitHistory->Clear(); 0521 if (!myHistory.IsNull()) 0522 myHistory->Clear(); 0523 0524 ClearRepetitions(); 0525 } 0526 0527 0528 public: //! @name Conversion of the integer to ID of periodic direction 0529 0530 //! Converts the integer to ID of periodic direction 0531 static Standard_Integer ToDirectionID(const Standard_Integer theDirectionID) 0532 { 0533 return Abs(theDirectionID % 3); 0534 } 0535 0536 0537 protected: //! @name Protected methods performing the operation 0538 0539 //! Checks the validity of input data 0540 Standard_EXPORT void CheckData(); 0541 0542 //! Trims the shape to fit to the periodic bounds 0543 Standard_EXPORT void Trim(); 0544 0545 //! Makes the shape identical on opposite sides 0546 Standard_EXPORT void MakeIdentical(); 0547 0548 //! Splits the negative side of the shape with the geometry 0549 //! located on the positive side copying the geometry from 0550 //! positive side to the negative. 0551 Standard_EXPORT void SplitNegative(); 0552 0553 //! Splits the positive side of the shape with the geometry 0554 //! located on the negative side of the shape. 0555 //! Ensures that the geometries on the opposite sides will 0556 //! be identical. 0557 //! Associates the identical opposite sub-shapes. 0558 Standard_EXPORT void SplitPositive(); 0559 0560 //! Splits the shape by the given tools, copying the geometry of coinciding 0561 //! parts from the given tools to the split shape. 0562 //! @param theTools [in] The tools to split the shape and take the geometry 0563 //! for coinciding parts. 0564 //! @param theSplitShapeHistory [out] The history of shape split 0565 //! @param theSplitToolsHistory [out] The history of tools modifications during the split 0566 Standard_EXPORT void SplitShape(const TopTools_ListOfShape& theTools, 0567 Handle(BRepTools_History) theSplitShapeHistory = NULL, 0568 Handle(BRepTools_History) theSplitToolsHistory = NULL); 0569 0570 //! Updates the map of twins after periodic shape repetition. 0571 //! @param theTranslationHistory [in] The history of translation of the periodic shape. 0572 //! @param theGluingHistory [in] The history of gluing of the repeated shapes. 0573 Standard_EXPORT void UpdateTwins(const BRepTools_History& theTranslationHistory, 0574 const BRepTools_History& theGluingHistory); 0575 0576 0577 protected: //! @name Fields 0578 0579 // Inputs 0580 TopoDS_Shape myInputShape; //!< Input shape to make periodic 0581 0582 PeriodicityParams myPeriodicityParams; //!< Periodicity parameters 0583 0584 // Results 0585 TopoDS_Shape myShape; //!< Resulting periodic shape (base for repetitions) 0586 TopoDS_Shape myRepeatedShape; //!< Resulting shape after making repetitions of the base 0587 Standard_Real myRepeatPeriod[3]; //!< XYZ repeat period 0588 TopTools_DataMapOfShapeListOfShape myRepeatedTwins; //!< Map of associations of the identical sub-shapes 0589 //! after repetition of the periodic shape 0590 0591 // Twins 0592 TopTools_DataMapOfShapeListOfShape myTwins; //!< Map of associations of the identical sub-shapes 0593 //! located on the opposite sides of the shape 0594 0595 // History 0596 Handle(BRepTools_History) mySplitHistory; //!< Split history - history of shapes modification 0597 //! after the split for making the shape periodic 0598 Handle(BRepTools_History) myHistory; //!< Final history of shapes modifications 0599 //! (to include the history of shape repetition) 0600 0601 }; 0602 0603 #endif // _BOPAlgo_MakePeriodic_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |