OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    BRepMesh_GeomTool Class Reference

    Tool class accumulating common geometrical functions as well as functionality using shape geometry to produce data necessary for tessellation. General aim is to calculate discretization points for the given curve or iso curve of surface according to the specified parameters. More...

    #include <BRepMesh_GeomTool.hxx>

    Public Types

    enum  IntFlag {
      NoIntersection , Cross , EndPointTouch , PointOnSegment ,
      Glued , Same
    }
     Enumerates states of segments intersection check. More...

    Public Member Functions

     BRepMesh_GeomTool (const BRepAdaptor_Curve &theCurve, const double theFirstParam, const double theLastParam, const double theLinDeflection, const double theAngDeflection, const int theMinPointsNb=2, const double theMinSize=Precision::Confusion())
     Constructor. Initiates discretization of the given geometric curve.
     BRepMesh_GeomTool (const occ::handle< BRepAdaptor_Surface > &theSurface, const GeomAbs_IsoType theIsoType, const double theParamIso, const double theFirstParam, const double theLastParam, const double theLinDeflection, const double theAngDeflection, const int theMinPointsNb=2, const double theMinSize=Precision::Confusion())
     Constructor. Initiates discretization of geometric curve corresponding to iso curve of the given surface.
    int AddPoint (const gp_Pnt &thePoint, const double theParam, const bool theIsReplace=true)
     Adds point to already calculated points (or replaces existing).
    int NbPoints () const
     Returns number of discretization points.
    bool Value (const int theIndex, const double theIsoParam, double &theParam, gp_Pnt &thePoint, gp_Pnt2d &theUV) const
     Gets parameters of discretization point with the given index.
    bool Value (const int theIndex, const occ::handle< BRepAdaptor_Surface > &theSurface, double &theParam, gp_Pnt &thePoint, gp_Pnt2d &theUV) const
     Gets parameters of discretization point with the given index.

    static API

    Computes normal to the given surface at the specified position in parametric space.

    Parameters
    theSurfacesurface the normal should be found for.
    theParamUU parameter in parametric space of the surface.
    theParamVV parameter in parametric space of the surface.
    [out]thePoint3d point corresponding to the given parameters.
    [out]theNormalnormal vector at the point specified by the parameters.
    Returns
    FALSE if the normal can not be computed, TRUE elsewhere.
    static bool Normal (const occ::handle< BRepAdaptor_Surface > &theSurface, const double theParamU, const double theParamV, gp_Pnt &thePoint, gp_Dir &theNormal)
     Checks intersection between two lines defined by two points.
    static IntFlag IntLinLin (const gp_XY &theStartPnt1, const gp_XY &theEndPnt1, const gp_XY &theStartPnt2, const gp_XY &theEndPnt2, gp_XY &theIntPnt, double(&theParamOnSegment)[2])
     Checks intersection between two lines defined by two points.
    static IntFlag IntSegSeg (const gp_XY &theStartPnt1, const gp_XY &theEndPnt1, const gp_XY &theStartPnt2, const gp_XY &theEndPnt2, const bool isConsiderEndPointTouch, const bool isConsiderPointOnSegment, gp_Pnt2d &theIntPnt)
     Checks intersection between the two segments. Checks that intersection point lies within ranges of both segments.
    static double SquareDeflectionOfSegment (const gp_Pnt &theFirstPoint, const gp_Pnt &theLastPoint, const gp_Pnt &theMidPoint)
     Compute deflection of the given segment.
    static std::pair< int, int > CellsCount (const occ::handle< Adaptor3d_Surface > &theSurface, const int theVerticesNb, const double theDeflection, const BRepMesh_DefaultRangeSplitter *theRangeSplitter)
     Checks intersection between two lines defined by two points.

    Detailed Description

    Tool class accumulating common geometrical functions as well as functionality using shape geometry to produce data necessary for tessellation. General aim is to calculate discretization points for the given curve or iso curve of surface according to the specified parameters.

    Member Enumeration Documentation

    ◆ IntFlag

    Enumerates states of segments intersection check.

    Enumerator
    NoIntersection 
    Cross 
    EndPointTouch 
    PointOnSegment 
    Glued 
    Same 

    Constructor & Destructor Documentation

    ◆ BRepMesh_GeomTool() [1/2]

    BRepMesh_GeomTool::BRepMesh_GeomTool ( const BRepAdaptor_Curve & theCurve,
    const double theFirstParam,
    const double theLastParam,
    const double theLinDeflection,
    const double theAngDeflection,
    const int theMinPointsNb = 2,
    const double theMinSize = Precision::Confusion() )

    Constructor. Initiates discretization of the given geometric curve.

    Parameters
    theCurvecurve to be discretized.
    theFirstParamfirst parameter of the curve.
    theLastParamlast parameter of the curve.
    theLinDeflectionlinear deflection.
    theAngDeflectionangular deflection.
    theMinPointsNbminimum number of points to be produced.

    ◆ BRepMesh_GeomTool() [2/2]

    BRepMesh_GeomTool::BRepMesh_GeomTool ( const occ::handle< BRepAdaptor_Surface > & theSurface,
    const GeomAbs_IsoType theIsoType,
    const double theParamIso,
    const double theFirstParam,
    const double theLastParam,
    const double theLinDeflection,
    const double theAngDeflection,
    const int theMinPointsNb = 2,
    const double theMinSize = Precision::Confusion() )

    Constructor. Initiates discretization of geometric curve corresponding to iso curve of the given surface.

    Parameters
    theSurfacesurface the iso curve to be taken from.
    theIsoTypetype of iso curve to be used, U or V.
    theParamIsoparameter on the surface specifying the iso curve.
    theFirstParamfirst parameter of the curve.
    theLastParamlast parameter of the curve.
    theLinDeflectionlinear deflection.
    theAngDeflectionangular deflection.
    theMinPointsNbminimum number of points to be produced.

    Member Function Documentation

    ◆ AddPoint()

    int BRepMesh_GeomTool::AddPoint ( const gp_Pnt & thePoint,
    const double theParam,
    const bool theIsReplace = true )
    inline

    Adds point to already calculated points (or replaces existing).

    Parameters
    thePointpoint to be added.
    theParamparameter on the curve corresponding to the given point.
    theIsReplaceif TRUE replaces existing point lying within parametric tolerance of the given point.
    Returns
    index of new added point or found with parametric tolerance

    ◆ CellsCount()

    std::pair< int, int > BRepMesh_GeomTool::CellsCount ( const occ::handle< Adaptor3d_Surface > & theSurface,
    const int theVerticesNb,
    const double theDeflection,
    const BRepMesh_DefaultRangeSplitter * theRangeSplitter )
    static

    Checks intersection between two lines defined by two points.

    Parameters
    theStartPnt1start point of first line.
    theEndPnt1end point of first line.
    theStartPnt2start point of second line.
    theEndPnt2end point of second line.
    [out]theIntPntpoint of intersection.
    [out]theParamOnSegmentparameters of intersection point corresponding to first and second segment.
    Returns
    status of intersection check.

    ◆ IntLinLin()

    IntFlag BRepMesh_GeomTool::IntLinLin ( const gp_XY & theStartPnt1,
    const gp_XY & theEndPnt1,
    const gp_XY & theStartPnt2,
    const gp_XY & theEndPnt2,
    gp_XY & theIntPnt,
    double(&) theParamOnSegment[2] )
    static

    Checks intersection between two lines defined by two points.

    Parameters
    theStartPnt1start point of first line.
    theEndPnt1end point of first line.
    theStartPnt2start point of second line.
    theEndPnt2end point of second line.
    [out]theIntPntpoint of intersection.
    [out]theParamOnSegmentparameters of intersection point corresponding to first and second segment.
    Returns
    status of intersection check.

    ◆ IntSegSeg()

    IntFlag BRepMesh_GeomTool::IntSegSeg ( const gp_XY & theStartPnt1,
    const gp_XY & theEndPnt1,
    const gp_XY & theStartPnt2,
    const gp_XY & theEndPnt2,
    const bool isConsiderEndPointTouch,
    const bool isConsiderPointOnSegment,
    gp_Pnt2d & theIntPnt )
    static

    Checks intersection between the two segments. Checks that intersection point lies within ranges of both segments.

    Parameters
    theStartPnt1start point of first segment.
    theEndPnt1end point of first segment.
    theStartPnt2start point of second segment.
    theEndPnt2end point of second segment.
    isConsiderEndPointTouchif TRUE EndPointTouch status will be returned in case if segments are touching by end points, if FALSE returns NoIntersection flag.
    isConsiderPointOnSegmentif TRUE PointOnSegment status will be returned in case if end point of one segment lies onto another one, if FALSE returns NoIntersection flag.
    [out]theIntPntpoint of intersection.
    Returns
    status of intersection check.

    ◆ NbPoints()

    int BRepMesh_GeomTool::NbPoints ( ) const
    inline

    Returns number of discretization points.

    ◆ Normal()

    bool BRepMesh_GeomTool::Normal ( const occ::handle< BRepAdaptor_Surface > & theSurface,
    const double theParamU,
    const double theParamV,
    gp_Pnt & thePoint,
    gp_Dir & theNormal )
    static

    Checks intersection between two lines defined by two points.

    Parameters
    theStartPnt1start point of first line.
    theEndPnt1end point of first line.
    theStartPnt2start point of second line.
    theEndPnt2end point of second line.
    [out]theIntPntpoint of intersection.
    [out]theParamOnSegmentparameters of intersection point corresponding to first and second segment.
    Returns
    status of intersection check.

    ◆ SquareDeflectionOfSegment()

    double BRepMesh_GeomTool::SquareDeflectionOfSegment ( const gp_Pnt & theFirstPoint,
    const gp_Pnt & theLastPoint,
    const gp_Pnt & theMidPoint )
    inlinestatic

    Compute deflection of the given segment.

    ◆ Value() [1/2]

    bool BRepMesh_GeomTool::Value ( const int theIndex,
    const double theIsoParam,
    double & theParam,
    gp_Pnt & thePoint,
    gp_Pnt2d & theUV ) const

    Gets parameters of discretization point with the given index.

    Parameters
    theIndexindex of discretization point.
    theIsoParamparameter on surface to be used as second coordinate of resulting 2d point.
    [out]theParamparameter of the point on the iso curve.
    [out]thePointdiscretization point.
    [out]theUVdiscretization point in parametric space of the surface.
    Returns
    TRUE on success, FALSE elsewhere.

    ◆ Value() [2/2]

    bool BRepMesh_GeomTool::Value ( const int theIndex,
    const occ::handle< BRepAdaptor_Surface > & theSurface,
    double & theParam,
    gp_Pnt & thePoint,
    gp_Pnt2d & theUV ) const

    Gets parameters of discretization point with the given index.

    Parameters
    theIndexindex of discretization point.
    theSurfacesurface the curve is lying onto.
    [out]theParamparameter of the point on the curve.
    [out]thePointdiscretization point.
    [out]theUVdiscretization point in parametric space of the surface.
    Returns
    TRUE on success, FALSE elsewhere.

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