Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-12 10:50:29

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