Open CASCADE Technology  6.9.0
Public Member Functions | Static Public Member Functions | Protected Attributes

ShapeAnalysis_Edge Class Reference

Tool for analyzing the edge. Queries geometrical representations of the edge (3d curve, pcurve on the given face or surface) and topological sub-shapes (bounding vertices). Provides methods for analyzing geometry and topology consistency (3d and pcurve(s) consistency, their adjacency to the vertices). More...

#include <ShapeAnalysis_Edge.hxx>

Public Member Functions

 ShapeAnalysis_Edge ()
 Empty constructor; initialises Status to OK. More...
 
Standard_Boolean HasCurve3d (const TopoDS_Edge &edge) const
 Tells if the edge has a 3d curve. More...
 
Standard_Boolean Curve3d (const TopoDS_Edge &edge, Handle< Geom_Curve > &C3d, Standard_Real &cf, Standard_Real &cl, const Standard_Boolean orient=Standard_True) const
 Returns the 3d curve and bounding parameteres for the edge Returns False if no 3d curve. If <orient> is True (default), takes orientation into account: if the edge is reversed, cf and cl are toggled. More...
 
Standard_Boolean IsClosed3d (const TopoDS_Edge &edge) const
 Gives True if the edge has a 3d curve, this curve is closed, and the edge has the same vertex at start and end. More...
 
Standard_Boolean HasPCurve (const TopoDS_Edge &edge, const TopoDS_Face &face) const
 Tells if the Edge has a pcurve on the face. More...
 
Standard_Boolean HasPCurve (const TopoDS_Edge &edge, const Handle< Geom_Surface > &surface, const TopLoc_Location &location) const
 Tells if the edge has a pcurve on the surface (with location). More...
 
Standard_Boolean PCurve (const TopoDS_Edge &edge, const TopoDS_Face &face, Handle< Geom2d_Curve > &C2d, Standard_Real &cf, Standard_Real &cl, const Standard_Boolean orient=Standard_True) const
 
Standard_Boolean PCurve (const TopoDS_Edge &edge, const Handle< Geom_Surface > &surface, const TopLoc_Location &location, Handle< Geom2d_Curve > &C2d, Standard_Real &cf, Standard_Real &cl, const Standard_Boolean orient=Standard_True) const
 Returns the pcurve and bounding parameteres for the edge lying on the surface. Returns False if the edge has no pcurve on this surface. If <orient> is True (default), takes orientation into account: if the edge is reversed, cf and cl are toggled. More...
 
Standard_Boolean BoundUV (const TopoDS_Edge &edge, const TopoDS_Face &face, gp_Pnt2d &first, gp_Pnt2d &last) const
 
Standard_Boolean BoundUV (const TopoDS_Edge &edge, const Handle< Geom_Surface > &surface, const TopLoc_Location &location, gp_Pnt2d &first, gp_Pnt2d &last) const
 Returns the ends of pcurve Calls method PCurve with <orient> equal to True. More...
 
Standard_Boolean IsSeam (const TopoDS_Edge &edge, const TopoDS_Face &face) const
 
Standard_Boolean IsSeam (const TopoDS_Edge &edge, const Handle< Geom_Surface > &surface, const TopLoc_Location &location) const
 Returns True if the edge has two pcurves on one surface. More...
 
TopoDS_Vertex FirstVertex (const TopoDS_Edge &edge) const
 Returns start vertex of the edge (taking edge orientation into account). More...
 
TopoDS_Vertex LastVertex (const TopoDS_Edge &edge) const
 Returns end vertex of the edge (taking edge orientation into account). More...
 
Standard_Boolean GetEndTangent2d (const TopoDS_Edge &edge, const TopoDS_Face &face, const Standard_Boolean atEnd, gp_Pnt2d &pos, gp_Vec2d &tang, const Standard_Real dparam=0.0) const
 
Standard_Boolean GetEndTangent2d (const TopoDS_Edge &edge, const Handle< Geom_Surface > &surface, const TopLoc_Location &location, const Standard_Boolean atEnd, gp_Pnt2d &pos, gp_Vec2d &tang, const Standard_Real dparam=0.0) const
 Returns tangent of the edge pcurve at its start (if atEnd is False) or end (if True), regarding the orientation of edge. If edge is REVERSED, tangent is reversed before return. Returns True if pcurve is available and tangent is computed and is not null, else False. More...
 
Standard_Boolean CheckVerticesWithCurve3d (const TopoDS_Edge &edge, const Standard_Real preci=-1, const Standard_Integer vtx=0)
 Checks the start and/or end vertex of the edge for matching with 3d curve with the given precision. <vtx> = 1 : start vertex only <vtx> = 2 : end vertex only <vtx> = 0 : both (default) If preci < 0 the vertices are considered with their own tolerances, else with the given <preci>. More...
 
Standard_Boolean CheckVerticesWithPCurve (const TopoDS_Edge &edge, const TopoDS_Face &face, const Standard_Real preci=-1, const Standard_Integer vtx=0)
 
Standard_Boolean CheckVerticesWithPCurve (const TopoDS_Edge &edge, const Handle< Geom_Surface > &surface, const TopLoc_Location &location, const Standard_Real preci=-1, const Standard_Integer vtx=0)
 Checks the start and/or end vertex of the edge for matching with pcurve with the given precision. <vtx> = 1 : start vertex <vtx> = 2 : end vertex <vtx> = 0 : both If preci < 0 the vertices are considered with their own tolerances, else with the given <preci>. More...
 
Standard_Boolean CheckVertexTolerance (const TopoDS_Edge &edge, const TopoDS_Face &face, Standard_Real &toler1, Standard_Real &toler2)
 
Standard_Boolean CheckVertexTolerance (const TopoDS_Edge &edge, Standard_Real &toler1, Standard_Real &toler2)
 Checks if it is necessary to increase tolerances of the edge vertices to comprise the ends of 3d curve and pcurve on the given face (first method) or all pcurves stored in an edge (second one) toler1 returns necessary tolerance for first vertex, toler2 returns necessary tolerance for last vertex. More...
 
Standard_Boolean CheckCurve3dWithPCurve (const TopoDS_Edge &edge, const TopoDS_Face &face)
 
Standard_Boolean CheckCurve3dWithPCurve (const TopoDS_Edge &edge, const Handle< Geom_Surface > &surface, const TopLoc_Location &location)
 Checks mutual orientation of 3d curve and pcurve on the analysis of curves bounding points. More...
 
Standard_Boolean Status (const ShapeExtend_Status status) const
 Returns the status (in the form of True/False) of last Check. More...
 
Standard_Boolean CheckSameParameter (const TopoDS_Edge &edge, Standard_Real &maxdev, const Standard_Integer NbControl=23)
 Checks the edge to be SameParameter. Calculates the maximal deviation between 3d curve and each pcurve of the edge on <NbControl> equidistant points (the same algorithm as in BRepCheck; default value is 23 as in BRepCheck). This deviation is returned in <maxdev> parameter. If deviation is greater than tolerance of the edge (i.e. incorrect flag) returns False, else returns True. More...
 
Standard_Boolean CheckOverlapping (const TopoDS_Edge &theEdge1, const TopoDS_Edge &theEdge2, Standard_Real &theTolOverlap, const Standard_Real theDomainDist=0.0)
 Checks the first edge is overlapped with second edge. If distance between two edges is less then theTolOverlap edges is overlapped. theDomainDis - length of part of edges on wich edges is overlapped. More...
 

Static Public Member Functions

static Standard_Boolean ComputeDeviation (const Adaptor3d_Curve &CRef, const Adaptor3d_Curve &Other, const Standard_Boolean SameParameter, Standard_Real &dev, const Standard_Integer NCONTROL)
 Computes the maximal deviation between the two curve representations. dev is an input/output parameter and contains the computed deviation (should be initialized with 0. for the first call). Used by CheckSameParameter(). More...
 

Protected Attributes

Standard_Integer myStatus
 

Detailed Description

Tool for analyzing the edge. Queries geometrical representations of the edge (3d curve, pcurve on the given face or surface) and topological sub-shapes (bounding vertices). Provides methods for analyzing geometry and topology consistency (3d and pcurve(s) consistency, their adjacency to the vertices).

Constructor & Destructor Documentation

ShapeAnalysis_Edge::ShapeAnalysis_Edge ( )

Empty constructor; initialises Status to OK.

Member Function Documentation

Standard_Boolean ShapeAnalysis_Edge::BoundUV ( const TopoDS_Edge edge,
const TopoDS_Face face,
gp_Pnt2d first,
gp_Pnt2d last 
) const
Standard_Boolean ShapeAnalysis_Edge::BoundUV ( const TopoDS_Edge edge,
const Handle< Geom_Surface > &  surface,
const TopLoc_Location location,
gp_Pnt2d first,
gp_Pnt2d last 
) const

Returns the ends of pcurve Calls method PCurve with <orient> equal to True.

Standard_Boolean ShapeAnalysis_Edge::CheckCurve3dWithPCurve ( const TopoDS_Edge edge,
const TopoDS_Face face 
)
Standard_Boolean ShapeAnalysis_Edge::CheckCurve3dWithPCurve ( const TopoDS_Edge edge,
const Handle< Geom_Surface > &  surface,
const TopLoc_Location location 
)

Checks mutual orientation of 3d curve and pcurve on the analysis of curves bounding points.

Standard_Boolean ShapeAnalysis_Edge::CheckOverlapping ( const TopoDS_Edge theEdge1,
const TopoDS_Edge theEdge2,
Standard_Real theTolOverlap,
const Standard_Real  theDomainDist = 0.0 
)

Checks the first edge is overlapped with second edge. If distance between two edges is less then theTolOverlap edges is overlapped. theDomainDis - length of part of edges on wich edges is overlapped.

Standard_Boolean ShapeAnalysis_Edge::CheckSameParameter ( const TopoDS_Edge edge,
Standard_Real maxdev,
const Standard_Integer  NbControl = 23 
)

Checks the edge to be SameParameter. Calculates the maximal deviation between 3d curve and each pcurve of the edge on <NbControl> equidistant points (the same algorithm as in BRepCheck; default value is 23 as in BRepCheck). This deviation is returned in <maxdev> parameter. If deviation is greater than tolerance of the edge (i.e. incorrect flag) returns False, else returns True.

Standard_Boolean ShapeAnalysis_Edge::CheckVertexTolerance ( const TopoDS_Edge edge,
const TopoDS_Face face,
Standard_Real toler1,
Standard_Real toler2 
)
Standard_Boolean ShapeAnalysis_Edge::CheckVertexTolerance ( const TopoDS_Edge edge,
Standard_Real toler1,
Standard_Real toler2 
)

Checks if it is necessary to increase tolerances of the edge vertices to comprise the ends of 3d curve and pcurve on the given face (first method) or all pcurves stored in an edge (second one) toler1 returns necessary tolerance for first vertex, toler2 returns necessary tolerance for last vertex.

Standard_Boolean ShapeAnalysis_Edge::CheckVerticesWithCurve3d ( const TopoDS_Edge edge,
const Standard_Real  preci = -1,
const Standard_Integer  vtx = 0 
)

Checks the start and/or end vertex of the edge for matching with 3d curve with the given precision. <vtx> = 1 : start vertex only <vtx> = 2 : end vertex only <vtx> = 0 : both (default) If preci < 0 the vertices are considered with their own tolerances, else with the given <preci>.

Standard_Boolean ShapeAnalysis_Edge::CheckVerticesWithPCurve ( const TopoDS_Edge edge,
const TopoDS_Face face,
const Standard_Real  preci = -1,
const Standard_Integer  vtx = 0 
)
Standard_Boolean ShapeAnalysis_Edge::CheckVerticesWithPCurve ( const TopoDS_Edge edge,
const Handle< Geom_Surface > &  surface,
const TopLoc_Location location,
const Standard_Real  preci = -1,
const Standard_Integer  vtx = 0 
)

Checks the start and/or end vertex of the edge for matching with pcurve with the given precision. <vtx> = 1 : start vertex <vtx> = 2 : end vertex <vtx> = 0 : both If preci < 0 the vertices are considered with their own tolerances, else with the given <preci>.

static Standard_Boolean ShapeAnalysis_Edge::ComputeDeviation ( const Adaptor3d_Curve CRef,
const Adaptor3d_Curve Other,
const Standard_Boolean  SameParameter,
Standard_Real dev,
const Standard_Integer  NCONTROL 
)
static

Computes the maximal deviation between the two curve representations. dev is an input/output parameter and contains the computed deviation (should be initialized with 0. for the first call). Used by CheckSameParameter().

Standard_Boolean ShapeAnalysis_Edge::Curve3d ( const TopoDS_Edge edge,
Handle< Geom_Curve > &  C3d,
Standard_Real cf,
Standard_Real cl,
const Standard_Boolean  orient = Standard_True 
) const

Returns the 3d curve and bounding parameteres for the edge Returns False if no 3d curve. If <orient> is True (default), takes orientation into account: if the edge is reversed, cf and cl are toggled.

TopoDS_Vertex ShapeAnalysis_Edge::FirstVertex ( const TopoDS_Edge edge) const

Returns start vertex of the edge (taking edge orientation into account).

Standard_Boolean ShapeAnalysis_Edge::GetEndTangent2d ( const TopoDS_Edge edge,
const TopoDS_Face face,
const Standard_Boolean  atEnd,
gp_Pnt2d pos,
gp_Vec2d tang,
const Standard_Real  dparam = 0.0 
) const
Standard_Boolean ShapeAnalysis_Edge::GetEndTangent2d ( const TopoDS_Edge edge,
const Handle< Geom_Surface > &  surface,
const TopLoc_Location location,
const Standard_Boolean  atEnd,
gp_Pnt2d pos,
gp_Vec2d tang,
const Standard_Real  dparam = 0.0 
) const

Returns tangent of the edge pcurve at its start (if atEnd is False) or end (if True), regarding the orientation of edge. If edge is REVERSED, tangent is reversed before return. Returns True if pcurve is available and tangent is computed and is not null, else False.

Standard_Boolean ShapeAnalysis_Edge::HasCurve3d ( const TopoDS_Edge edge) const

Tells if the edge has a 3d curve.

Standard_Boolean ShapeAnalysis_Edge::HasPCurve ( const TopoDS_Edge edge,
const TopoDS_Face face 
) const

Tells if the Edge has a pcurve on the face.

Standard_Boolean ShapeAnalysis_Edge::HasPCurve ( const TopoDS_Edge edge,
const Handle< Geom_Surface > &  surface,
const TopLoc_Location location 
) const

Tells if the edge has a pcurve on the surface (with location).

Standard_Boolean ShapeAnalysis_Edge::IsClosed3d ( const TopoDS_Edge edge) const

Gives True if the edge has a 3d curve, this curve is closed, and the edge has the same vertex at start and end.

Standard_Boolean ShapeAnalysis_Edge::IsSeam ( const TopoDS_Edge edge,
const TopoDS_Face face 
) const
Standard_Boolean ShapeAnalysis_Edge::IsSeam ( const TopoDS_Edge edge,
const Handle< Geom_Surface > &  surface,
const TopLoc_Location location 
) const

Returns True if the edge has two pcurves on one surface.

TopoDS_Vertex ShapeAnalysis_Edge::LastVertex ( const TopoDS_Edge edge) const

Returns end vertex of the edge (taking edge orientation into account).

Standard_Boolean ShapeAnalysis_Edge::PCurve ( const TopoDS_Edge edge,
const TopoDS_Face face,
Handle< Geom2d_Curve > &  C2d,
Standard_Real cf,
Standard_Real cl,
const Standard_Boolean  orient = Standard_True 
) const
Standard_Boolean ShapeAnalysis_Edge::PCurve ( const TopoDS_Edge edge,
const Handle< Geom_Surface > &  surface,
const TopLoc_Location location,
Handle< Geom2d_Curve > &  C2d,
Standard_Real cf,
Standard_Real cl,
const Standard_Boolean  orient = Standard_True 
) const

Returns the pcurve and bounding parameteres for the edge lying on the surface. Returns False if the edge has no pcurve on this surface. If <orient> is True (default), takes orientation into account: if the edge is reversed, cf and cl are toggled.

Standard_Boolean ShapeAnalysis_Edge::Status ( const ShapeExtend_Status  status) const

Returns the status (in the form of True/False) of last Check.

Field Documentation

Standard_Integer ShapeAnalysis_Edge::myStatus
protected

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