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
    ShapeFix_Shape Class Reference

    Fixing shape in general. More...

    #include <ShapeFix_Shape.hxx>

    Inheritance diagram for ShapeFix_Shape:

    Public Member Functions

     ShapeFix_Shape ()
     Empty Constructor.
     ShapeFix_Shape (const TopoDS_Shape &shape)
     Initislises by shape.
    void Init (const TopoDS_Shape &shape)
     Initislises by shape.
    bool Perform (const Message_ProgressRange &theProgress=Message_ProgressRange())
     Iterates on sub- shape and performs fixes.
    TopoDS_Shape Shape () const
     Returns resulting shape.
    occ::handle< ShapeFix_SolidFixSolidTool () const
     Returns tool for fixing solids.
    occ::handle< ShapeFix_ShellFixShellTool () const
     Returns tool for fixing shells.
    occ::handle< ShapeFix_FaceFixFaceTool () const
     Returns tool for fixing faces.
    occ::handle< ShapeFix_WireFixWireTool () const
     Returns tool for fixing wires.
    occ::handle< ShapeFix_EdgeFixEdgeTool () const
     Returns tool for fixing edges.
    bool Status (const ShapeExtend_Status status) const
     Returns the status of the last Fix. This can be a combination of the following flags: ShapeExtend_DONE1: some free edges were fixed ShapeExtend_DONE2: some free wires were fixed ShapeExtend_DONE3: some free faces were fixed ShapeExtend_DONE4: some free shells were fixed ShapeExtend_DONE5: some free solids were fixed ShapeExtend_DONE6: shapes in compound(s) were fixed.
    void SetMsgRegistrator (const occ::handle< ShapeExtend_BasicMsgRegistrator > &msgreg) override
     Sets message registrator.
    void SetPrecision (const double preci) override
     Sets basic precision value (also to FixSolidTool).
    void SetMinTolerance (const double mintol) override
     Sets minimal allowed tolerance (also to FixSolidTool).
    void SetMaxTolerance (const double maxtol) override
     Sets maximal allowed tolerance (also to FixSolidTool).
    int & FixSolidMode ()
     Returns (modifiable) the mode for applying fixes of ShapeFix_Solid, by default True.
    int & FixFreeShellMode ()
     Returns (modifiable) the mode for applying fixes of ShapeFix_Shell, by default True.
    int & FixFreeFaceMode ()
     Returns (modifiable) the mode for applying fixes of ShapeFix_Face, by default True.
    int & FixFreeWireMode ()
     Returns (modifiable) the mode for applying fixes of ShapeFix_Wire, by default True.
    int & FixSameParameterMode ()
     Returns (modifiable) the mode for applying ShapeFix::SameParameter after all fixes, by default True.
    int & FixVertexPositionMode ()
     Returns (modifiable) the mode for applying ShapeFix::FixVertexPosition before all fixes, by default False.
    int & FixVertexTolMode ()
     Returns (modifiable) the mode for fixing tolerances of vertices on whole shape after performing all fixes.
    Public Member Functions inherited from ShapeFix_Root
     ShapeFix_Root ()
     Empty Constructor (no context is created).
    virtual void Set (const occ::handle< ShapeFix_Root > &Root)
     Copy all fields from another Root object.
    virtual void SetContext (const occ::handle< ShapeBuild_ReShape > &context)
     Sets context.
    occ::handle< ShapeBuild_ReShapeContext () const
     Returns context.
    occ::handle< ShapeExtend_BasicMsgRegistratorMsgRegistrator () const
     Returns message registrator.
    double Precision () const
     Returns basic precision value.
    double MinTolerance () const
     Returns minimal allowed tolerance.
    double MaxTolerance () const
     Returns maximal allowed tolerance.
    double LimitTolerance (const double toler) const
     Returns tolerance limited by [myMinTol,myMaxTol].
    void SendMsg (const TopoDS_Shape &shape, const Message_Msg &messagemessage, const Message_Gravity gravity=Message_Info) const
     Sends a message to be attached to the shape. Calls corresponding message of message registrator.
    void SendMsg (const Message_Msg &messagemessage, const Message_Gravity gravity=Message_Info) const
     Sends a message to be attached to myShape. Calls previous method.
    void SendWarning (const TopoDS_Shape &shape, const Message_Msg &messagemessage) const
     Sends a warning to be attached to the shape. Calls SendMsg with gravity set to Message_Warning.
    void SendWarning (const Message_Msg &messagemessage) const
     Calls previous method for myShape.
    void SendFail (const TopoDS_Shape &shape, const Message_Msg &messagemessage) const
     Sends a fail to be attached to the shape. Calls SendMsg with gravity set to Message_Fail.
    void SendFail (const Message_Msg &messagemessage) const
     Calls previous method for myShape.
    Public Member Functions inherited from Standard_Transient
     Standard_Transient ()
     Empty constructor.
     Standard_Transient (const Standard_Transient &)
     Copy constructor – does nothing.
    Standard_Transientoperator= (const Standard_Transient &)
     Assignment operator, needed to avoid copying reference counter.
    virtual ~Standard_Transient ()=default
     Destructor must be virtual.
    virtual const opencascade::handle< Standard_Type > & DynamicType () const
     Returns a type descriptor about this object.
    bool IsInstance (const opencascade::handle< Standard_Type > &theType) const
     Returns a true value if this is an instance of Type.
    bool IsInstance (const char *const theTypeName) const
     Returns a true value if this is an instance of TypeName.
    bool IsKind (const opencascade::handle< Standard_Type > &theType) const
     Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
    bool IsKind (const char *const theTypeName) const
     Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
    Standard_TransientThis () const
     Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
    int GetRefCount () const noexcept
     Get the reference counter of this object.
    void IncrementRefCounter () noexcept
     Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations.
    int DecrementRefCounter () noexcept
     Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement.
    virtual void Delete () const
     Memory deallocator for transient classes.

    Protected Member Functions

    void SameParameter (const TopoDS_Shape &shape, const bool enforce, const Message_ProgressRange &theProgress=Message_ProgressRange())
     Fixes same parameterization problem on the passed shape by updating tolerances of the corresponding topological entities.

    Protected Attributes

    TopoDS_Shape myResult
    occ::handle< ShapeFix_SolidmyFixSolid
    NCollection_Map< TopoDS_Shape, TopTools_ShapeMapHashermyMapFixingShape
    int myFixSolidMode
    int myFixShellMode
    int myFixFaceMode
    int myFixWireMode
    int myFixSameParameterMode
    int myFixVertexPositionMode
    int myFixVertexTolMode
    int myStatus
    Protected Attributes inherited from ShapeFix_Root
    TopoDS_Shape myShape

    Additional Inherited Members

    typedef void base_type
     Returns a type descriptor about this object.
    static constexpr const char * get_type_name ()
     Returns a type descriptor about this object.
    static const opencascade::handle< Standard_Type > & get_type_descriptor ()
     Returns type descriptor of Standard_Transient class.
    Static Protected Member Functions inherited from ShapeFix_Root
    static bool NeedFix (const int flag, const bool def=true)
     Auxiliary method for work with three-position (on/off/default) flags (modes) in ShapeFix.

    Detailed Description

    Fixing shape in general.

    Constructor & Destructor Documentation

    ◆ ShapeFix_Shape() [1/2]

    ShapeFix_Shape::ShapeFix_Shape ( )

    Empty Constructor.

    ◆ ShapeFix_Shape() [2/2]

    ShapeFix_Shape::ShapeFix_Shape ( const TopoDS_Shape & shape)

    Initislises by shape.

    Member Function Documentation

    ◆ FixEdgeTool()

    occ::handle< ShapeFix_Edge > ShapeFix_Shape::FixEdgeTool ( ) const

    Returns tool for fixing edges.

    ◆ FixFaceTool()

    occ::handle< ShapeFix_Face > ShapeFix_Shape::FixFaceTool ( ) const

    Returns tool for fixing faces.

    ◆ FixFreeFaceMode()

    int & ShapeFix_Shape::FixFreeFaceMode ( )

    Returns (modifiable) the mode for applying fixes of ShapeFix_Face, by default True.

    ◆ FixFreeShellMode()

    int & ShapeFix_Shape::FixFreeShellMode ( )

    Returns (modifiable) the mode for applying fixes of ShapeFix_Shell, by default True.

    ◆ FixFreeWireMode()

    int & ShapeFix_Shape::FixFreeWireMode ( )

    Returns (modifiable) the mode for applying fixes of ShapeFix_Wire, by default True.

    ◆ FixSameParameterMode()

    int & ShapeFix_Shape::FixSameParameterMode ( )

    Returns (modifiable) the mode for applying ShapeFix::SameParameter after all fixes, by default True.

    ◆ FixShellTool()

    occ::handle< ShapeFix_Shell > ShapeFix_Shape::FixShellTool ( ) const

    Returns tool for fixing shells.

    ◆ FixSolidMode()

    int & ShapeFix_Shape::FixSolidMode ( )

    Returns (modifiable) the mode for applying fixes of ShapeFix_Solid, by default True.

    ◆ FixSolidTool()

    occ::handle< ShapeFix_Solid > ShapeFix_Shape::FixSolidTool ( ) const

    Returns tool for fixing solids.

    ◆ FixVertexPositionMode()

    int & ShapeFix_Shape::FixVertexPositionMode ( )

    Returns (modifiable) the mode for applying ShapeFix::FixVertexPosition before all fixes, by default False.

    ◆ FixVertexTolMode()

    int & ShapeFix_Shape::FixVertexTolMode ( )

    Returns (modifiable) the mode for fixing tolerances of vertices on whole shape after performing all fixes.

    ◆ FixWireTool()

    occ::handle< ShapeFix_Wire > ShapeFix_Shape::FixWireTool ( ) const

    Returns tool for fixing wires.

    ◆ Init()

    void ShapeFix_Shape::Init ( const TopoDS_Shape & shape)

    Initislises by shape.

    ◆ Perform()

    bool ShapeFix_Shape::Perform ( const Message_ProgressRange & theProgress = Message_ProgressRange())

    Iterates on sub- shape and performs fixes.

    ◆ SameParameter()

    void ShapeFix_Shape::SameParameter ( const TopoDS_Shape & shape,
    const bool enforce,
    const Message_ProgressRange & theProgress = Message_ProgressRange() )
    protected

    Fixes same parameterization problem on the passed shape by updating tolerances of the corresponding topological entities.

    ◆ SetMaxTolerance()

    void ShapeFix_Shape::SetMaxTolerance ( const double maxtol)
    overridevirtual

    Sets maximal allowed tolerance (also to FixSolidTool).

    Reimplemented from ShapeFix_Root.

    ◆ SetMinTolerance()

    void ShapeFix_Shape::SetMinTolerance ( const double mintol)
    overridevirtual

    Sets minimal allowed tolerance (also to FixSolidTool).

    Reimplemented from ShapeFix_Root.

    ◆ SetMsgRegistrator()

    void ShapeFix_Shape::SetMsgRegistrator ( const occ::handle< ShapeExtend_BasicMsgRegistrator > & msgreg)
    overridevirtual

    Sets message registrator.

    Reimplemented from ShapeFix_Root.

    ◆ SetPrecision()

    void ShapeFix_Shape::SetPrecision ( const double preci)
    overridevirtual

    Sets basic precision value (also to FixSolidTool).

    Reimplemented from ShapeFix_Root.

    ◆ Shape()

    TopoDS_Shape ShapeFix_Shape::Shape ( ) const

    Returns resulting shape.

    ◆ Status()

    bool ShapeFix_Shape::Status ( const ShapeExtend_Status status) const

    Returns the status of the last Fix. This can be a combination of the following flags: ShapeExtend_DONE1: some free edges were fixed ShapeExtend_DONE2: some free wires were fixed ShapeExtend_DONE3: some free faces were fixed ShapeExtend_DONE4: some free shells were fixed ShapeExtend_DONE5: some free solids were fixed ShapeExtend_DONE6: shapes in compound(s) were fixed.

    Field Documentation

    ◆ myFixFaceMode

    int ShapeFix_Shape::myFixFaceMode
    protected

    ◆ myFixSameParameterMode

    int ShapeFix_Shape::myFixSameParameterMode
    protected

    ◆ myFixShellMode

    int ShapeFix_Shape::myFixShellMode
    protected

    ◆ myFixSolid

    occ::handle<ShapeFix_Solid> ShapeFix_Shape::myFixSolid
    protected

    ◆ myFixSolidMode

    int ShapeFix_Shape::myFixSolidMode
    protected

    ◆ myFixVertexPositionMode

    int ShapeFix_Shape::myFixVertexPositionMode
    protected

    ◆ myFixVertexTolMode

    int ShapeFix_Shape::myFixVertexTolMode
    protected

    ◆ myFixWireMode

    int ShapeFix_Shape::myFixWireMode
    protected

    ◆ myMapFixingShape

    NCollection_Map<TopoDS_Shape, TopTools_ShapeMapHasher> ShapeFix_Shape::myMapFixingShape
    protected

    ◆ myResult

    TopoDS_Shape ShapeFix_Shape::myResult
    protected

    ◆ myStatus

    int ShapeFix_Shape::myStatus
    protected

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