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

    to remove Hidden lines on Shapes with Triangulations. A framework to compute the shape as seen in a projection plane. This is done by calculating the visible and the hidden parts of the shape. HLRBRep_PolyAlgo works with three types of entity: More...

    #include <HLRBRep_PolyAlgo.hxx>

    Inheritance diagram for HLRBRep_PolyAlgo:

    Public Member Functions

     HLRBRep_PolyAlgo ()
     Constructs an empty framework for the calculation of the visible and hidden lines of a shape in a projection. Use the functions:
     HLRBRep_PolyAlgo (const occ::handle< HLRBRep_PolyAlgo > &A)
     HLRBRep_PolyAlgo (const TopoDS_Shape &S)
    int NbShapes () const
    TopoDS_ShapeShape (const int I)
    void Remove (const int I)
     remove the Shape of Index .
    int Index (const TopoDS_Shape &S) const
     return the index of the Shape and return 0 if the Shape is not found.
    void Load (const TopoDS_Shape &theShape)
     Loads the shape S into this framework. Warning S must have already been triangulated.
    const occ::handle< HLRAlgo_PolyAlgo > & Algo () const
    const HLRAlgo_ProjectorProjector () const
     Sets the parameters of the view for this framework. These parameters are defined by an HLRAlgo_Projector object, which is returned by the Projector function on a Prs3d_Projector object.
    void Projector (const HLRAlgo_Projector &theProj)
    double TolAngular () const
    void TolAngular (const double theTol)
    double TolCoef () const
    void TolCoef (const double theTol)
    void Update ()
     Launches calculation of outlines of the shape visualized by this framework. Used after setting the point of view and defining the shape or shapes to be visualized.
    void InitHide ()
    bool MoreHide () const
    void NextHide ()
    HLRAlgo_BiPoint::PointsTHide (HLRAlgo_EdgeStatus &status, TopoDS_Shape &S, bool &reg1, bool &regn, bool &outl, bool &intl)
    void InitShow ()
    bool MoreShow () const
    void NextShow ()
    HLRAlgo_BiPoint::PointsTShow (TopoDS_Shape &S, bool &reg1, bool &regn, bool &outl, bool &intl)
    TopoDS_Shape OutLinedShape (const TopoDS_Shape &S) const
     Make a shape with the internal outlines in each face.
    bool Debug () const
    void Debug (const bool theDebug)
    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.

    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.

    Detailed Description

    to remove Hidden lines on Shapes with Triangulations. A framework to compute the shape as seen in a projection plane. This is done by calculating the visible and the hidden parts of the shape. HLRBRep_PolyAlgo works with three types of entity:

    • shapes to be visualized (these shapes must have already been triangulated.)
    • edges in these shapes (these edges are defined as polygonal lines on the triangulation of the shape, and are the basic entities which will be visualized or hidden), and
    • triangles in these shapes which hide the edges. HLRBRep_PolyAlgo is based on the principle of comparing each edge of the shape to be visualized with each of the triangles produced by the triangulation of the shape, and calculating the visible and the hidden parts of each edge. For a given projection, HLRBRep_PolyAlgo calculates a set of lines characteristic of the object being represented. It is also used in conjunction with the HLRBRep_PolyHLRToShape extraction utilities, which reconstruct a new, simplified shape from a selection of calculation results. This new shape is made up of edges, which represent the shape visualized in the projection. HLRBRep_PolyAlgo works with a polyhedral simplification of the shape whereas HLRBRep_Algo takes the shape itself into account. When you use HLRBRep_Algo, you obtain an exact result, whereas, when you use HLRBRep_PolyAlgo, you reduce computation time but obtain polygonal segments. An HLRBRep_PolyAlgo object provides a framework for:
    • defining the point of view
    • identifying the shape or shapes to be visualized
    • calculating the outlines
    • calculating the visible and hidden lines of the shape. Warning
    • Superimposed lines are not eliminated by this algorithm.
    • There must be no unfinished objects inside the shape you wish to visualize.
    • Points are not treated.
    • Note that this is not the sort of algorithm used in generating shading, which calculates the visible and hidden parts of each face in a shape to be visualized by comparing each face in the shape with every other face in the same shape.

    Constructor & Destructor Documentation

    ◆ HLRBRep_PolyAlgo() [1/3]

    HLRBRep_PolyAlgo::HLRBRep_PolyAlgo ( )

    Constructs an empty framework for the calculation of the visible and hidden lines of a shape in a projection. Use the functions:

    • Projector to define the point of view
    • Load to select the shape or shapes to be visualized
    • Update to compute the visible and hidden lines of the shape. Warning The shape or shapes to be visualized must have already been triangulated.

    ◆ HLRBRep_PolyAlgo() [2/3]

    HLRBRep_PolyAlgo::HLRBRep_PolyAlgo ( const occ::handle< HLRBRep_PolyAlgo > & A)

    ◆ HLRBRep_PolyAlgo() [3/3]

    HLRBRep_PolyAlgo::HLRBRep_PolyAlgo ( const TopoDS_Shape & S)

    Member Function Documentation

    ◆ Algo()

    const occ::handle< HLRAlgo_PolyAlgo > & HLRBRep_PolyAlgo::Algo ( ) const
    inline

    ◆ Debug() [1/2]

    bool HLRBRep_PolyAlgo::Debug ( ) const
    inline

    ◆ Debug() [2/2]

    void HLRBRep_PolyAlgo::Debug ( const bool theDebug)
    inline

    ◆ Hide()

    HLRAlgo_BiPoint::PointsT & HLRBRep_PolyAlgo::Hide ( HLRAlgo_EdgeStatus & status,
    TopoDS_Shape & S,
    bool & reg1,
    bool & regn,
    bool & outl,
    bool & intl )

    ◆ Index()

    int HLRBRep_PolyAlgo::Index ( const TopoDS_Shape & S) const

    return the index of the Shape and return 0 if the Shape is not found.

    ◆ InitHide()

    void HLRBRep_PolyAlgo::InitHide ( )
    inline

    ◆ InitShow()

    void HLRBRep_PolyAlgo::InitShow ( )
    inline

    ◆ Load()

    void HLRBRep_PolyAlgo::Load ( const TopoDS_Shape & theShape)
    inline

    Loads the shape S into this framework. Warning S must have already been triangulated.

    ◆ MoreHide()

    bool HLRBRep_PolyAlgo::MoreHide ( ) const
    inline

    ◆ MoreShow()

    bool HLRBRep_PolyAlgo::MoreShow ( ) const
    inline

    ◆ NbShapes()

    int HLRBRep_PolyAlgo::NbShapes ( ) const
    inline

    ◆ NextHide()

    void HLRBRep_PolyAlgo::NextHide ( )
    inline

    ◆ NextShow()

    void HLRBRep_PolyAlgo::NextShow ( )
    inline

    ◆ OutLinedShape()

    TopoDS_Shape HLRBRep_PolyAlgo::OutLinedShape ( const TopoDS_Shape & S) const

    Make a shape with the internal outlines in each face.

    ◆ Projector() [1/2]

    const HLRAlgo_Projector & HLRBRep_PolyAlgo::Projector ( ) const
    inline

    Sets the parameters of the view for this framework. These parameters are defined by an HLRAlgo_Projector object, which is returned by the Projector function on a Prs3d_Projector object.

    ◆ Projector() [2/2]

    void HLRBRep_PolyAlgo::Projector ( const HLRAlgo_Projector & theProj)
    inline

    ◆ Remove()

    void HLRBRep_PolyAlgo::Remove ( const int I)

    remove the Shape of Index .

    ◆ Shape()

    TopoDS_Shape & HLRBRep_PolyAlgo::Shape ( const int I)

    ◆ Show()

    HLRAlgo_BiPoint::PointsT & HLRBRep_PolyAlgo::Show ( TopoDS_Shape & S,
    bool & reg1,
    bool & regn,
    bool & outl,
    bool & intl )

    ◆ TolAngular() [1/2]

    double HLRBRep_PolyAlgo::TolAngular ( ) const
    inline

    ◆ TolAngular() [2/2]

    void HLRBRep_PolyAlgo::TolAngular ( const double theTol)
    inline

    ◆ TolCoef() [1/2]

    double HLRBRep_PolyAlgo::TolCoef ( ) const
    inline

    ◆ TolCoef() [2/2]

    void HLRBRep_PolyAlgo::TolCoef ( const double theTol)
    inline

    ◆ Update()

    void HLRBRep_PolyAlgo::Update ( )

    Launches calculation of outlines of the shape visualized by this framework. Used after setting the point of view and defining the shape or shapes to be visualized.


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