OCCT3D OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    BOPAlgo_MakePeriodic Class Reference

    BOPAlgo_MakePeriodic is the tool for making an arbitrary shape periodic in 3D space in specified directions. More...

    #include <BOPAlgo_MakePeriodic.hxx>

    Inheritance diagram for BOPAlgo_MakePeriodic:

    Data Structures

    struct  PeriodicityParams

    Public Member Functions

    Constructor

    Empty constructor

     BOPAlgo_MakePeriodic ()
    Setting the shape to make it periodic

    Sets the shape to make it periodic.

    Parameters
    [in]theShapeThe shape to make periodic.
    void SetShape (const TopoDS_Shape &theShape)
    Setters/Getters for periodicity parameters structure

    Sets the periodicity parameters.

    Parameters
    [in]theParamsPeriodicity parameters
    void SetPeriodicityParameters (const PeriodicityParams &theParams)
    const PeriodicityParamsPeriodicityParameters () const
    Methods for setting/getting periodicity info using ID as a direction

    Sets the flag to make the shape periodic in specified direction:

    • 0 - X direction;
    • 1 - Y direction;
    • 2 - Z direction.
    Parameters
    [in]theDirectionIDThe direction's ID;
    [in]theIsPeriodicFlag defining periodicity in given direction;
    [in]thePeriodRequired period in given direction.
    void MakePeriodic (const int theDirectionID, const bool theIsPeriodic, const double thePeriod=0.0)
     Returns the info about Periodicity of the shape in specified direction.
    bool IsPeriodic (const int theDirectionID) const
     Returns the info about Periodicity of the shape in specified direction.
    double Period (const int theDirectionID) const
     Returns the Period of the shape in specified direction.
    Named methods for setting/getting info about shape's periodicity

    Sets the flag to make the shape periodic in X direction.

    Parameters
    [in]theIsPeriodicFlag defining periodicity in X direction;
    [in]thePeriodRequired period in X direction.
    void MakeXPeriodic (const bool theIsPeriodic, const double thePeriod=0.0)
     Returns the info about periodicity of the shape in X direction.
    bool IsXPeriodic () const
     Returns the info about periodicity of the shape in X direction.
    double XPeriod () const
     Returns the XPeriod of the shape.
    void MakeYPeriodic (const bool theIsPeriodic, const double thePeriod=0.0)
     Sets the flag to make the shape periodic in Y direction.
    bool IsYPeriodic () const
     Returns the info about periodicity of the shape in Y direction.
    double YPeriod () const
     Returns the YPeriod of the shape.
    void MakeZPeriodic (const bool theIsPeriodic, const double thePeriod=0.0)
     Sets the flag to make the shape periodic in Z direction.
    bool IsZPeriodic () const
     Returns the info about periodicity of the shape in Z direction.
    double ZPeriod () const
     Returns the ZPeriod of the shape.
    Methods for setting/getting trimming info taking Direction ID as a parameter

    Defines whether the input shape is already trimmed in specified direction to fit the period in this direction. Direction is defined by an ID:

    • 0 - X direction;
    • 1 - Y direction;
    • 2 - Z direction.

    If the shape is not trimmed it is required to set the first parameter of the period in that direction. The algorithm will make the shape fit into the period.

    Before calling this method, the shape has to be set to be periodic in this direction.

    Parameters
    [in]theDirectionIDThe direction's ID;
    [in]theIsTrimmedThe flag defining trimming of the shape in given direction;
    [in]theFirstThe first periodic parameter in the given direction.
    void SetTrimmed (const int theDirectionID, const bool theIsTrimmed, const double theFirst=0.0)
     Returns whether the input shape was trimmed in the specified direction.
    bool IsInputTrimmed (const int theDirectionID) const
     Returns whether the input shape was trimmed in the specified direction.
    double PeriodFirst (const int theDirectionID) const
     Returns the first periodic parameter in the specified direction.
    Named methods for setting/getting trimming info

    Defines whether the input shape is already trimmed in X direction to fit the X period. If the shape is not trimmed it is required to set the first parameter for the X period. The algorithm will make the shape fit into the period.

    Before calling this method, the shape has to be set to be periodic in this direction.

    Parameters
    [in]theIsTrimmedFlag defining whether the shape is already trimmed in X direction to fit the X period;
    [in]theFirstThe first X periodic parameter.
    void SetXTrimmed (const bool theIsTrimmed, const bool theFirst=0.0)
     Returns whether the input shape was already trimmed for X period.
    bool IsInputXTrimmed () const
     Returns whether the input shape was already trimmed for X period.
    double XPeriodFirst () const
     Returns the first parameter for the X period.
    void SetYTrimmed (const bool theIsTrimmed, const bool theFirst=0.0)
     Defines whether the input shape is already trimmed in Y direction to fit the Y period. If the shape is not trimmed it is required to set the first parameter for the Y period. The algorithm will make the shape fit into the period.
    bool IsInputYTrimmed () const
     Returns whether the input shape was already trimmed for Y period.
    double YPeriodFirst () const
     Returns the first parameter for the Y period.
    void SetZTrimmed (const bool theIsTrimmed, const bool theFirst=0.0)
     Defines whether the input shape is already trimmed in Z direction to fit the Z period. If the shape is not trimmed it is required to set the first parameter for the Z period. The algorithm will make the shape fit into the period.
    bool IsInputZTrimmed () const
     Returns whether the input shape was already trimmed for Z period.
    double ZPeriodFirst () const
     Returns the first parameter for the Z period.
    Performing the operation

    Makes the shape periodic in necessary directions

    void Perform ()
    Using the algorithm to repeat the shape

    Performs repetition of the shape in specified direction required number of times. Negative value of times means that the repetition should be perform in negative direction. Makes the repeated shape a base for following repetitions.

    Parameters
    [in]theDirectionIDThe direction's ID;
    [in]theTimesRequested number of repetitions.
    const TopoDS_ShapeRepeatShape (const int theDirectionID, const int theTimes)
     Repeats the shape in X direction specified number of times. Negative value of times means that the repetition should be perform in negative X direction. Makes the repeated shape a base for following repetitions.
    const TopoDS_ShapeXRepeat (const int theTimes)
     Repeats the shape in X direction specified number of times. Negative value of times means that the repetition should be perform in negative X direction. Makes the repeated shape a base for following repetitions.
    const TopoDS_ShapeYRepeat (const int theTimes)
     Repeats the shape in Y direction specified number of times. Negative value of times means that the repetition should be perform in negative Y direction. Makes the repeated shape a base for following repetitions.
    const TopoDS_ShapeZRepeat (const int theTimes)
     Repeats the shape in Z direction specified number of times. Negative value of times means that the repetition should be perform in negative Z direction. Makes the repeated shape a base for following repetitions.
    Starting the repetitions over

    Returns the repeated shape

    const TopoDS_ShapeRepeatedShape () const
     Clears all performed repetitions. The next repetition will be performed on the base shape.
    void ClearRepetitions ()
     Clears all performed repetitions. The next repetition will be performed on the base shape.
    Obtaining the result shape

    Returns the resulting periodic shape

    const TopoDS_ShapeShape () const
    Getting the identical shapes

    Returns the identical shapes for the given shape located on the opposite periodic side. Returns empty list in case the shape has no twin.

    Parameters
    [in]theSShape to get the twins for.
    const NCollection_List< TopoDS_Shape > & GetTwins (const TopoDS_Shape &theS) const
    Getting the History of the algorithm

    Returns the History of the algorithm

    const occ::handle< BRepTools_History > & History () const
    Clearing the algorithm from previous runs

    Clears the algorithm from previous runs

    void Clear () override
     Clears all warnings and errors, and any data cached by the algorithm. User defined options are not cleared.
    Public Member Functions inherited from BOPAlgo_Options
     BOPAlgo_Options ()
     Empty constructor.
     BOPAlgo_Options (const occ::handle< NCollection_BaseAllocator > &theAllocator)
     Constructor with allocator.
    virtual ~BOPAlgo_Options ()
     Destructor.
    const occ::handle< NCollection_BaseAllocator > & Allocator () const
     Returns allocator.
    void AddError (const occ::handle< Message_Alert > &theAlert)
     Adds the alert as error (fail).
    void AddWarning (const occ::handle< Message_Alert > &theAlert)
     Adds the alert as warning.
    bool HasErrors () const
     Returns true if algorithm has failed.
    bool HasError (const occ::handle< Standard_Type > &theType) const
     Returns true if algorithm has generated error of specified type.
    bool HasWarnings () const
     Returns true if algorithm has generated some warning alerts.
    bool HasWarning (const occ::handle< Standard_Type > &theType) const
     Returns true if algorithm has generated warning of specified type.
    const occ::handle< Message_Report > & GetReport () const
     Returns report collecting all errors and warnings.
    void DumpErrors (Standard_OStream &theOS) const
     Dumps the error status into the given stream.
    void DumpWarnings (Standard_OStream &theOS) const
     Dumps the warning statuses into the given stream.
    void ClearWarnings ()
     Clears the warnings of the algorithm.
    void SetFuzzyValue (const double theFuzz)
     Sets the additional tolerance.
    double FuzzyValue () const
     Returns the additional tolerance.
    void SetUseOBB (const bool theUseOBB)
     Enables/Disables the usage of OBB.
    bool UseOBB () const
     Returns the flag defining usage of OBB.
    void SetRunParallel (const bool theFlag)
     Set the flag of parallel processing if <theFlag> is true the parallel processing is switched on if <theFlag> is false the parallel processing is switched off.
    bool RunParallel () const
     Returns the flag of parallel processing.

    Static Public Member Functions

    Conversion of the integer to ID of periodic direction

    Converts the integer to ID of periodic direction

    static int ToDirectionID (const int theDirectionID)
    static bool GetParallelMode ()
     Gets the global parallel mode.
    static void SetParallelMode (const bool theNewMode)
     Sets the global parallel mode.

    Protected Member Functions

    Protected methods performing the operation

    Checks the validity of input data

    void CheckData ()
     Trims the shape to fit to the periodic bounds.
    void Trim ()
     Trims the shape to fit to the periodic bounds.
    void MakeIdentical ()
     Makes the shape identical on opposite sides.
    void SplitNegative ()
     Splits the negative side of the shape with the geometry located on the positive side copying the geometry from positive side to the negative.
    void SplitPositive ()
     Splits the positive side of the shape with the geometry located on the negative side of the shape. Ensures that the geometries on the opposite sides will be identical. Associates the identical opposite sub-shapes.
    void SplitShape (const NCollection_List< TopoDS_Shape > &theTools, const occ::handle< BRepTools_History > &theSplitShapeHistory=nullptr, const occ::handle< BRepTools_History > &theSplitToolsHistory=nullptr)
     Splits the shape by the given tools, copying the geometry of coinciding parts from the given tools to the split shape.
    void UpdateTwins (const BRepTools_History &theTranslationHistory, const BRepTools_History &theGluingHistory)
     Updates the map of twins after periodic shape repetition.
    bool UserBreak (const Message_ProgressScope &thePS)
     Adds error to the report if the break signal was caught. Returns true in this case, false otherwise.

    Protected Attributes

    Fields
    TopoDS_Shape myInputShape
     Input shape to make periodic.
    PeriodicityParams myPeriodicityParams
     Periodicity parameters.
    TopoDS_Shape myShape
     Resulting periodic shape (base for repetitions).
    TopoDS_Shape myRepeatedShape
     Resulting shape after making repetitions of the base.
    double myRepeatPeriod [3]
     XYZ repeat period.
    NCollection_DataMap< TopoDS_Shape, NCollection_List< TopoDS_Shape >, TopTools_ShapeMapHashermyRepeatedTwins
     Map of associations of the identical sub-shapes after repetition of the periodic shape.
    NCollection_DataMap< TopoDS_Shape, NCollection_List< TopoDS_Shape >, TopTools_ShapeMapHashermyTwins
     Map of associations of the identical sub-shapes located on the opposite sides of the shape.
    occ::handle< BRepTools_HistorymySplitHistory
     Split history - history of shapes modification after the split for making the shape periodic.
    occ::handle< BRepTools_HistorymyHistory
     Final history of shapes modifications (to include the history of shape repetition).
    occ::handle< NCollection_BaseAllocatormyAllocator
     Enables/Disables the usage of OBB.
    occ::handle< Message_ReportmyReport
     Enables/Disables the usage of OBB.
    bool myRunParallel
     Enables/Disables the usage of OBB.
    double myFuzzyValue
     Enables/Disables the usage of OBB.
    bool myUseOBB
     Enables/Disables the usage of OBB.

    Detailed Description

    BOPAlgo_MakePeriodic is the tool for making an arbitrary shape periodic in 3D space in specified directions.

    Periodicity of the shape means that the shape can be repeated in any periodic direction any number of times without creation of the new geometry or splits.

    The idea is to make the shape look identical on the opposite sides of the periodic directions, so when translating the copy of a shape on the period there will be no coinciding parts of different dimensions.

    If necessary the algorithm will trim the shape to fit it into the requested period by splitting it by the planes limiting the shape's requested period.

    For making the shape periodic in certain direction the algorithm performs the following steps:

    • Creates the copy of the shape and moves it on the period into negative side of the requested direction;
    • Splits the negative side of the shape by the moved copy, ensuring copying of the geometry from positive side to negative;
    • Creates the copy of the shape (with already split negative side) and moves it on the period into the positive side of the requested direction;
    • Splits the positive side of the shape by the moved copy, ensuring copying of the geometry from negative side to positive.

    The algorithm also associates the identical (or twin) shapes located on the opposite sides of the result shape. Using the GetTwins() method it is possible to get the twin shapes from the opposite sides.

    Algorithm also provides the methods to repeat the periodic shape in periodic directions. The subsequent repetitions are performed on the repeated shape, thus repeating the shape two times in X direction will create result in three shapes (original plus two copies). Single subsequent repetition will result already in 6 shapes. The repetitions can be cleared and started over.

    The algorithm supports History of shapes modifications, thus it is possible to track how the shape has been changed to make it periodic and what new shapes have been created during repetitions.

    The algorithm supports the parallel processing mode, which allows faster completion of the operations.

    The algorithm supports the Error/Warning system and returns the following alerts:

    • BOPAlgo_AlertNoPeriodicityRequired - Error alert is given if no periodicity has been requested in any direction;
    • BOPAlgo_AlertUnableToTrim - Error alert is given if the trimming of the shape for fitting it into requested period has failed;
    • BOPAlgo_AlertUnableToMakeIdentical - Error alert is given if splitting of the shape by its moved copies has failed;
    • BOPAlgo_AlertUnableToRepeat - Warning alert is given if the gluing of the repeated shapes has failed.

    Example of usage of the algorithm:

    TopoDS_Shape aShape = ...; // The shape to make periodic
    bool bMakeXPeriodic = ...; // Flag for making or not the shape periodic in X
    direction double aXPeriod = ...; // X period for the shape bool
    isXTrimmed = ...; // Flag defining whether it is necessary to trimming
    // the shape to fit to X period
    double aXFirst = ...; // Start of the X period
    // (really necessary only if the trimming is
    requested)
    bool bRunParallel = ...; // Parallel processing mode or single
    BOPAlgo_MakePeriodic aPeriodicityMaker; // Periodicity maker
    aPeriodicityMaker.SetShape(aShape); // Set the shape
    aPeriodicityMaker.MakeXPeriodic(bMakePeriodic, aXPeriod); // Making the shape periodic in X
    direction aPeriodicityMaker.SetTrimmed(isXTrimmed, aXFirst); // Trim the shape to fit X
    period aPeriodicityMaker.SetRunParallel(bRunParallel); // Set the parallel processing
    mode aPeriodicityMaker.Perform(); // Performing the operation
    if (aPeriodicityMaker.HasErrors()) // Check for the errors
    {
    // errors treatment
    Standard_SStream aSStream;
    aPeriodicityMaker.DumpErrors(aSStream);
    return;
    }
    if (aPeriodicityMaker.HasWarnings()) // Check for the warnings
    {
    // warnings treatment
    Standard_SStream aSStream;
    aPeriodicityMaker.DumpWarnings(aSStream);
    }
    const TopoDS_Shape& aPeriodicShape = aPeriodicityMaker.Shape(); // Result periodic shape
    aPeriodicityMaker.XRepeat(2); // Making repetitions
    const TopoDS_Shape& aRepeat = aPeriodicityMaker.RepeatedShape(); // Getting the repeated shape
    aPeriodicityMaker.ClearRepetitions(); // Clearing the repetitions
    GLenum mode
    Definition OpenGl_glext.h:1482
    std::stringstream Standard_SStream
    Defines Standard_SStream as typedef to C++ string stream.
    Definition Standard_SStream.hxx:21
    const TopoDS_Shape & XRepeat(const int theTimes)
    Repeats the shape in X direction specified number of times. Negative value of times means that the re...
    Definition BOPAlgo_MakePeriodic.hxx:379
    const TopoDS_Shape & Shape() const
    Definition BOPAlgo_MakePeriodic.hxx:418
    void SetShape(const TopoDS_Shape &theShape)
    Definition BOPAlgo_MakePeriodic.hxx:137
    BOPAlgo_MakePeriodic()
    Definition BOPAlgo_MakePeriodic.hxx:132
    void SetTrimmed(const int theDirectionID, const bool theIsTrimmed, const double theFirst=0.0)
    Returns whether the input shape was trimmed in the specified direction.
    Definition BOPAlgo_MakePeriodic.hxx:269
    void ClearRepetitions()
    Clears all performed repetitions. The next repetition will be performed on the base shape.
    Definition BOPAlgo_MakePeriodic.hxx:403
    const TopoDS_Shape & RepeatedShape() const
    Clears all performed repetitions. The next repetition will be performed on the base shape.
    Definition BOPAlgo_MakePeriodic.hxx:399
    void MakeXPeriodic(const bool theIsPeriodic, const double thePeriod=0.0)
    Returns the info about periodicity of the shape in X direction.
    Definition BOPAlgo_MakePeriodic.hxx:213
    bool HasErrors() const
    Returns true if algorithm has failed.
    Definition BOPAlgo_Options.hxx:73
    void DumpErrors(Standard_OStream &theOS) const
    Dumps the error status into the given stream.
    void DumpWarnings(Standard_OStream &theOS) const
    Dumps the warning statuses into the given stream.
    bool HasWarnings() const
    Returns true if algorithm has generated some warning alerts.
    Definition BOPAlgo_Options.hxx:82
    void SetRunParallel(const bool theFlag)
    Set the flag of parallel processing if <theFlag> is true the parallel processing is switched on if <t...
    Definition BOPAlgo_Options.hxx:114
    Describes a shape which.
    Definition TopoDS_Shape.hxx:41

    Constructor & Destructor Documentation

    ◆ BOPAlgo_MakePeriodic()

    BOPAlgo_MakePeriodic::BOPAlgo_MakePeriodic ( )
    inline

    Member Function Documentation

    ◆ CheckData()

    void BOPAlgo_MakePeriodic::CheckData ( )
    protected

    Trims the shape to fit to the periodic bounds.

    ◆ Clear()

    void BOPAlgo_MakePeriodic::Clear ( )
    inlineoverridevirtual

    Clears all warnings and errors, and any data cached by the algorithm. User defined options are not cleared.

    Reimplemented from BOPAlgo_Options.

    ◆ ClearRepetitions()

    void BOPAlgo_MakePeriodic::ClearRepetitions ( )
    inline

    Clears all performed repetitions. The next repetition will be performed on the base shape.

    ◆ GetTwins()

    const NCollection_List< TopoDS_Shape > & BOPAlgo_MakePeriodic::GetTwins ( const TopoDS_Shape & theS) const
    inline

    ◆ History()

    const occ::handle< BRepTools_History > & BOPAlgo_MakePeriodic::History ( ) const
    inline

    ◆ IsInputTrimmed()

    bool BOPAlgo_MakePeriodic::IsInputTrimmed ( const int theDirectionID) const
    inline

    Returns whether the input shape was trimmed in the specified direction.

    Parameters
    [in]theDirectionIDThe direction's ID.

    ◆ IsInputXTrimmed()

    bool BOPAlgo_MakePeriodic::IsInputXTrimmed ( ) const
    inline

    Returns whether the input shape was already trimmed for X period.

    ◆ IsInputYTrimmed()

    bool BOPAlgo_MakePeriodic::IsInputYTrimmed ( ) const
    inline

    Returns whether the input shape was already trimmed for Y period.

    ◆ IsInputZTrimmed()

    bool BOPAlgo_MakePeriodic::IsInputZTrimmed ( ) const
    inline

    Returns whether the input shape was already trimmed for Z period.

    ◆ IsPeriodic()

    bool BOPAlgo_MakePeriodic::IsPeriodic ( const int theDirectionID) const
    inline

    Returns the info about Periodicity of the shape in specified direction.

    Parameters
    [in]theDirectionIDThe direction's ID.

    ◆ IsXPeriodic()

    bool BOPAlgo_MakePeriodic::IsXPeriodic ( ) const
    inline

    Returns the info about periodicity of the shape in X direction.

    ◆ IsYPeriodic()

    bool BOPAlgo_MakePeriodic::IsYPeriodic ( ) const
    inline

    Returns the info about periodicity of the shape in Y direction.

    ◆ IsZPeriodic()

    bool BOPAlgo_MakePeriodic::IsZPeriodic ( ) const
    inline

    Returns the info about periodicity of the shape in Z direction.

    ◆ MakeIdentical()

    void BOPAlgo_MakePeriodic::MakeIdentical ( )
    protected

    Makes the shape identical on opposite sides.

    ◆ MakePeriodic()

    void BOPAlgo_MakePeriodic::MakePeriodic ( const int theDirectionID,
    const bool theIsPeriodic,
    const double thePeriod = 0.0 )
    inline

    Returns the info about Periodicity of the shape in specified direction.

    Parameters
    [in]theDirectionIDThe direction's ID.

    ◆ MakeXPeriodic()

    void BOPAlgo_MakePeriodic::MakeXPeriodic ( const bool theIsPeriodic,
    const double thePeriod = 0.0 )
    inline

    Returns the info about periodicity of the shape in X direction.

    ◆ MakeYPeriodic()

    void BOPAlgo_MakePeriodic::MakeYPeriodic ( const bool theIsPeriodic,
    const double thePeriod = 0.0 )
    inline

    Sets the flag to make the shape periodic in Y direction.

    Parameters
    [in]theIsPeriodicFlag defining periodicity in Y direction;
    [in]thePeriodRequired period in Y direction.

    ◆ MakeZPeriodic()

    void BOPAlgo_MakePeriodic::MakeZPeriodic ( const bool theIsPeriodic,
    const double thePeriod = 0.0 )
    inline

    Sets the flag to make the shape periodic in Z direction.

    Parameters
    [in]theIsPeriodicFlag defining periodicity in Z direction;
    [in]thePeriodRequired period in Z direction.

    ◆ Perform()

    void BOPAlgo_MakePeriodic::Perform ( )

    ◆ Period()

    double BOPAlgo_MakePeriodic::Period ( const int theDirectionID) const
    inline

    Returns the Period of the shape in specified direction.

    Parameters
    [in]theDirectionIDThe direction's ID.

    ◆ PeriodFirst()

    double BOPAlgo_MakePeriodic::PeriodFirst ( const int theDirectionID) const
    inline

    Returns the first periodic parameter in the specified direction.

    Parameters
    [in]theDirectionIDThe direction's ID.

    ◆ PeriodicityParameters()

    const PeriodicityParams & BOPAlgo_MakePeriodic::PeriodicityParameters ( ) const
    inline

    ◆ RepeatedShape()

    const TopoDS_Shape & BOPAlgo_MakePeriodic::RepeatedShape ( ) const
    inline

    Clears all performed repetitions. The next repetition will be performed on the base shape.

    ◆ RepeatShape()

    const TopoDS_Shape & BOPAlgo_MakePeriodic::RepeatShape ( const int theDirectionID,
    const int theTimes )

    Repeats the shape in X direction specified number of times. Negative value of times means that the repetition should be perform in negative X direction. Makes the repeated shape a base for following repetitions.

    Parameters
    [in]theTimesRequested number of repetitions.

    ◆ SetPeriodicityParameters()

    void BOPAlgo_MakePeriodic::SetPeriodicityParameters ( const PeriodicityParams & theParams)
    inline

    ◆ SetShape()

    void BOPAlgo_MakePeriodic::SetShape ( const TopoDS_Shape & theShape)
    inline

    ◆ SetTrimmed()

    void BOPAlgo_MakePeriodic::SetTrimmed ( const int theDirectionID,
    const bool theIsTrimmed,
    const double theFirst = 0.0 )
    inline

    Returns whether the input shape was trimmed in the specified direction.

    Parameters
    [in]theDirectionIDThe direction's ID.

    ◆ SetXTrimmed()

    void BOPAlgo_MakePeriodic::SetXTrimmed ( const bool theIsTrimmed,
    const bool theFirst = 0.0 )
    inline

    Returns whether the input shape was already trimmed for X period.

    ◆ SetYTrimmed()

    void BOPAlgo_MakePeriodic::SetYTrimmed ( const bool theIsTrimmed,
    const bool theFirst = 0.0 )
    inline

    Defines whether the input shape is already trimmed in Y direction to fit the Y period. If the shape is not trimmed it is required to set the first parameter for the Y period. The algorithm will make the shape fit into the period.

    Before calling this method, the shape has to be set to be periodic in this direction.

    Parameters
    [in]theIsTrimmedFlag defining whether the shape is already trimmed in Y direction to fit the Y period;
    [in]theFirstThe first Y periodic parameter.

    ◆ SetZTrimmed()

    void BOPAlgo_MakePeriodic::SetZTrimmed ( const bool theIsTrimmed,
    const bool theFirst = 0.0 )
    inline

    Defines whether the input shape is already trimmed in Z direction to fit the Z period. If the shape is not trimmed it is required to set the first parameter for the Z period. The algorithm will make the shape fit into the period.

    Before calling this method, the shape has to be set to be periodic in this direction.

    Parameters
    [in]theIsTrimmedFlag defining whether the shape is already trimmed in Z direction to fit the Z period;
    [in]theFirstThe first Z periodic parameter.

    ◆ Shape()

    const TopoDS_Shape & BOPAlgo_MakePeriodic::Shape ( ) const
    inline

    ◆ SplitNegative()

    void BOPAlgo_MakePeriodic::SplitNegative ( )
    protected

    Splits the negative side of the shape with the geometry located on the positive side copying the geometry from positive side to the negative.

    ◆ SplitPositive()

    void BOPAlgo_MakePeriodic::SplitPositive ( )
    protected

    Splits the positive side of the shape with the geometry located on the negative side of the shape. Ensures that the geometries on the opposite sides will be identical. Associates the identical opposite sub-shapes.

    ◆ SplitShape()

    void BOPAlgo_MakePeriodic::SplitShape ( const NCollection_List< TopoDS_Shape > & theTools,
    const occ::handle< BRepTools_History > & theSplitShapeHistory = nullptr,
    const occ::handle< BRepTools_History > & theSplitToolsHistory = nullptr )
    protected

    Splits the shape by the given tools, copying the geometry of coinciding parts from the given tools to the split shape.

    Parameters
    [in]theToolsThe tools to split the shape and take the geometry for coinciding parts.
    [out]theSplitShapeHistoryThe history of shape split
    [out]theSplitToolsHistoryThe history of tools modifications during the split

    ◆ ToDirectionID()

    int BOPAlgo_MakePeriodic::ToDirectionID ( const int theDirectionID)
    inlinestatic

    ◆ Trim()

    void BOPAlgo_MakePeriodic::Trim ( )
    protected

    Trims the shape to fit to the periodic bounds.

    ◆ UpdateTwins()

    void BOPAlgo_MakePeriodic::UpdateTwins ( const BRepTools_History & theTranslationHistory,
    const BRepTools_History & theGluingHistory )
    protected

    Updates the map of twins after periodic shape repetition.

    Parameters
    [in]theTranslationHistoryThe history of translation of the periodic shape.
    [in]theGluingHistoryThe history of gluing of the repeated shapes.

    ◆ XPeriod()

    double BOPAlgo_MakePeriodic::XPeriod ( ) const
    inline

    Returns the XPeriod of the shape.

    ◆ XPeriodFirst()

    double BOPAlgo_MakePeriodic::XPeriodFirst ( ) const
    inline

    Returns the first parameter for the X period.

    ◆ XRepeat()

    const TopoDS_Shape & BOPAlgo_MakePeriodic::XRepeat ( const int theTimes)
    inline

    Repeats the shape in X direction specified number of times. Negative value of times means that the repetition should be perform in negative X direction. Makes the repeated shape a base for following repetitions.

    Parameters
    [in]theTimesRequested number of repetitions.

    ◆ YPeriod()

    double BOPAlgo_MakePeriodic::YPeriod ( ) const
    inline

    Returns the YPeriod of the shape.

    ◆ YPeriodFirst()

    double BOPAlgo_MakePeriodic::YPeriodFirst ( ) const
    inline

    Returns the first parameter for the Y period.

    ◆ YRepeat()

    const TopoDS_Shape & BOPAlgo_MakePeriodic::YRepeat ( const int theTimes)
    inline

    Repeats the shape in Y direction specified number of times. Negative value of times means that the repetition should be perform in negative Y direction. Makes the repeated shape a base for following repetitions.

    Parameters
    [in]theTimesRequested number of repetitions.

    ◆ ZPeriod()

    double BOPAlgo_MakePeriodic::ZPeriod ( ) const
    inline

    Returns the ZPeriod of the shape.

    ◆ ZPeriodFirst()

    double BOPAlgo_MakePeriodic::ZPeriodFirst ( ) const
    inline

    Returns the first parameter for the Z period.

    ◆ ZRepeat()

    const TopoDS_Shape & BOPAlgo_MakePeriodic::ZRepeat ( const int theTimes)
    inline

    Repeats the shape in Z direction specified number of times. Negative value of times means that the repetition should be perform in negative Z direction. Makes the repeated shape a base for following repetitions.

    Parameters
    [in]theTimesRequested number of repetitions.

    Field Documentation

    ◆ myHistory

    occ::handle<BRepTools_History> BOPAlgo_MakePeriodic::myHistory
    protected

    Final history of shapes modifications (to include the history of shape repetition).

    ◆ myInputShape

    TopoDS_Shape BOPAlgo_MakePeriodic::myInputShape
    protected

    Input shape to make periodic.

    ◆ myPeriodicityParams

    PeriodicityParams BOPAlgo_MakePeriodic::myPeriodicityParams
    protected

    Periodicity parameters.

    ◆ myRepeatedShape

    TopoDS_Shape BOPAlgo_MakePeriodic::myRepeatedShape
    protected

    Resulting shape after making repetitions of the base.

    ◆ myRepeatedTwins

    NCollection_DataMap<TopoDS_Shape, NCollection_List<TopoDS_Shape>, TopTools_ShapeMapHasher> BOPAlgo_MakePeriodic::myRepeatedTwins
    protected

    Map of associations of the identical sub-shapes after repetition of the periodic shape.

    ◆ myRepeatPeriod

    double BOPAlgo_MakePeriodic::myRepeatPeriod[3]
    protected

    XYZ repeat period.

    ◆ myShape

    TopoDS_Shape BOPAlgo_MakePeriodic::myShape
    protected

    Resulting periodic shape (base for repetitions).

    ◆ mySplitHistory

    occ::handle<BRepTools_History> BOPAlgo_MakePeriodic::mySplitHistory
    protected

    Split history - history of shapes modification after the split for making the shape periodic.

    ◆ myTwins

    Map of associations of the identical sub-shapes located on the opposite sides of the shape.


    The documentation for this class was generated from the following file: