Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
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.
 
bool HasCurve3d (const TopoDS_Edge &edge) const
 Tells if the edge has a 3d curve.
 
bool Curve3d (const TopoDS_Edge &edge, occ::handle< Geom_Curve > &C3d, double &cf, double &cl, const bool orient=true) const
 Returns the 3d curve and bounding parameters 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.
 
bool 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.
 
bool HasPCurve (const TopoDS_Edge &edge, const TopoDS_Face &face) const
 Tells if the Edge has a pcurve on the face.
 
bool HasPCurve (const TopoDS_Edge &edge, const occ::handle< Geom_Surface > &surface, const TopLoc_Location &location) const
 Tells if the edge has a pcurve on the surface (with location).
 
bool PCurve (const TopoDS_Edge &edge, const TopoDS_Face &face, occ::handle< Geom2d_Curve > &C2d, double &cf, double &cl, const bool orient=true) const
 
bool PCurve (const TopoDS_Edge &edge, const occ::handle< Geom_Surface > &surface, const TopLoc_Location &location, occ::handle< Geom2d_Curve > &C2d, double &cf, double &cl, const bool orient=true) const
 Returns the pcurve and bounding parameters 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.
 
bool BoundUV (const TopoDS_Edge &edge, const TopoDS_Face &face, gp_Pnt2d &first, gp_Pnt2d &last) const
 
bool BoundUV (const TopoDS_Edge &edge, const occ::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.
 
bool IsSeam (const TopoDS_Edge &edge, const TopoDS_Face &face) const
 
bool IsSeam (const TopoDS_Edge &edge, const occ::handle< Geom_Surface > &surface, const TopLoc_Location &location) const
 Returns True if the edge has two pcurves on one surface.
 
TopoDS_Vertex FirstVertex (const TopoDS_Edge &edge) const
 Returns start vertex of the edge (taking edge orientation into account).
 
TopoDS_Vertex LastVertex (const TopoDS_Edge &edge) const
 Returns end vertex of the edge (taking edge orientation into account).
 
bool GetEndTangent2d (const TopoDS_Edge &edge, const TopoDS_Face &face, const bool atEnd, gp_Pnt2d &pos, gp_Vec2d &tang, const double dparam=0.0) const
 
bool GetEndTangent2d (const TopoDS_Edge &edge, const occ::handle< Geom_Surface > &surface, const TopLoc_Location &location, const bool atEnd, gp_Pnt2d &pos, gp_Vec2d &tang, const double 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.
 
bool CheckVerticesWithCurve3d (const TopoDS_Edge &edge, const double preci=-1, const int 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>.
 
bool CheckVerticesWithPCurve (const TopoDS_Edge &edge, const TopoDS_Face &face, const double preci=-1, const int vtx=0)
 
bool CheckVerticesWithPCurve (const TopoDS_Edge &edge, const occ::handle< Geom_Surface > &surface, const TopLoc_Location &location, const double preci=-1, const int 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>.
 
bool CheckVertexTolerance (const TopoDS_Edge &edge, const TopoDS_Face &face, double &toler1, double &toler2)
 
bool CheckVertexTolerance (const TopoDS_Edge &edge, double &toler1, double &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.
 
bool CheckCurve3dWithPCurve (const TopoDS_Edge &edge, const TopoDS_Face &face)
 
bool CheckCurve3dWithPCurve (const TopoDS_Edge &edge, const occ::handle< Geom_Surface > &surface, const TopLoc_Location &location)
 Checks mutual orientation of 3d curve and pcurve on the analysis of curves bounding points.
 
bool Status (const ShapeExtend_Status status) const
 Returns the status (in the form of True/False) of last Check.
 
bool CheckSameParameter (const TopoDS_Edge &edge, double &maxdev, const int 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.
 
bool CheckSameParameter (const TopoDS_Edge &theEdge, const TopoDS_Face &theFace, double &theMaxdev, const int theNbControl=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.
 
bool CheckPCurveRange (const double theFirst, const double theLast, const occ::handle< Geom2d_Curve > &thePC)
 Checks possibility for pcurve thePC to have range [theFirst, theLast] (edge range) having respect to real first, last parameters of thePC.
 
bool CheckOverlapping (const TopoDS_Edge &theEdge1, const TopoDS_Edge &theEdge2, double &theTolOverlap, const double theDomainDist=0.0)
 Checks the first edge is overlapped with second edge. If distance between two edges is less then theTolOverlap edges are overlapped. theDomainDis - length of part of edges on which edges are overlapped.
 

Protected Attributes

int 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::ShapeAnalysis_Edge ( )

Empty constructor; initialises Status to OK.

Member Function Documentation

◆ BoundUV() [1/2]

bool ShapeAnalysis_Edge::BoundUV ( const TopoDS_Edge & edge,
const occ::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.

◆ BoundUV() [2/2]

bool ShapeAnalysis_Edge::BoundUV ( const TopoDS_Edge & edge,
const TopoDS_Face & face,
gp_Pnt2d & first,
gp_Pnt2d & last ) const

◆ CheckCurve3dWithPCurve() [1/2]

bool ShapeAnalysis_Edge::CheckCurve3dWithPCurve ( const TopoDS_Edge & edge,
const occ::handle< Geom_Surface > & surface,
const TopLoc_Location & location )

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

◆ CheckCurve3dWithPCurve() [2/2]

bool ShapeAnalysis_Edge::CheckCurve3dWithPCurve ( const TopoDS_Edge & edge,
const TopoDS_Face & face )

◆ CheckOverlapping()

bool ShapeAnalysis_Edge::CheckOverlapping ( const TopoDS_Edge & theEdge1,
const TopoDS_Edge & theEdge2,
double & theTolOverlap,
const double theDomainDist = 0.0 )

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

◆ CheckPCurveRange()

bool ShapeAnalysis_Edge::CheckPCurveRange ( const double theFirst,
const double theLast,
const occ::handle< Geom2d_Curve > & thePC )

Checks possibility for pcurve thePC to have range [theFirst, theLast] (edge range) having respect to real first, last parameters of thePC.

◆ CheckSameParameter() [1/2]

bool ShapeAnalysis_Edge::CheckSameParameter ( const TopoDS_Edge & edge,
double & maxdev,
const int 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.

◆ CheckSameParameter() [2/2]

bool ShapeAnalysis_Edge::CheckSameParameter ( const TopoDS_Edge & theEdge,
const TopoDS_Face & theFace,
double & theMaxdev,
const int theNbControl = 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.

◆ CheckVertexTolerance() [1/2]

bool ShapeAnalysis_Edge::CheckVertexTolerance ( const TopoDS_Edge & edge,
const TopoDS_Face & face,
double & toler1,
double & toler2 )

◆ CheckVertexTolerance() [2/2]

bool ShapeAnalysis_Edge::CheckVertexTolerance ( const TopoDS_Edge & edge,
double & toler1,
double & 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.

◆ CheckVerticesWithCurve3d()

bool ShapeAnalysis_Edge::CheckVerticesWithCurve3d ( const TopoDS_Edge & edge,
const double preci = -1,
const int 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>.

◆ CheckVerticesWithPCurve() [1/2]

bool ShapeAnalysis_Edge::CheckVerticesWithPCurve ( const TopoDS_Edge & edge,
const occ::handle< Geom_Surface > & surface,
const TopLoc_Location & location,
const double preci = -1,
const int 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>.

◆ CheckVerticesWithPCurve() [2/2]

bool ShapeAnalysis_Edge::CheckVerticesWithPCurve ( const TopoDS_Edge & edge,
const TopoDS_Face & face,
const double preci = -1,
const int vtx = 0 )

◆ Curve3d()

bool ShapeAnalysis_Edge::Curve3d ( const TopoDS_Edge & edge,
occ::handle< Geom_Curve > & C3d,
double & cf,
double & cl,
const bool orient = true ) const

Returns the 3d curve and bounding parameters 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.

◆ FirstVertex()

TopoDS_Vertex ShapeAnalysis_Edge::FirstVertex ( const TopoDS_Edge & edge) const

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

◆ GetEndTangent2d() [1/2]

bool ShapeAnalysis_Edge::GetEndTangent2d ( const TopoDS_Edge & edge,
const occ::handle< Geom_Surface > & surface,
const TopLoc_Location & location,
const bool atEnd,
gp_Pnt2d & pos,
gp_Vec2d & tang,
const double 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.

◆ GetEndTangent2d() [2/2]

bool ShapeAnalysis_Edge::GetEndTangent2d ( const TopoDS_Edge & edge,
const TopoDS_Face & face,
const bool atEnd,
gp_Pnt2d & pos,
gp_Vec2d & tang,
const double dparam = 0.0 ) const

◆ HasCurve3d()

bool ShapeAnalysis_Edge::HasCurve3d ( const TopoDS_Edge & edge) const

Tells if the edge has a 3d curve.

◆ HasPCurve() [1/2]

bool ShapeAnalysis_Edge::HasPCurve ( const TopoDS_Edge & edge,
const occ::handle< Geom_Surface > & surface,
const TopLoc_Location & location ) const

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

◆ HasPCurve() [2/2]

bool ShapeAnalysis_Edge::HasPCurve ( const TopoDS_Edge & edge,
const TopoDS_Face & face ) const

Tells if the Edge has a pcurve on the face.

◆ IsClosed3d()

bool 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.

◆ IsSeam() [1/2]

bool ShapeAnalysis_Edge::IsSeam ( const TopoDS_Edge & edge,
const occ::handle< Geom_Surface > & surface,
const TopLoc_Location & location ) const

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

◆ IsSeam() [2/2]

bool ShapeAnalysis_Edge::IsSeam ( const TopoDS_Edge & edge,
const TopoDS_Face & face ) const

◆ LastVertex()

TopoDS_Vertex ShapeAnalysis_Edge::LastVertex ( const TopoDS_Edge & edge) const

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

◆ PCurve() [1/2]

bool ShapeAnalysis_Edge::PCurve ( const TopoDS_Edge & edge,
const occ::handle< Geom_Surface > & surface,
const TopLoc_Location & location,
occ::handle< Geom2d_Curve > & C2d,
double & cf,
double & cl,
const bool orient = true ) const

Returns the pcurve and bounding parameters 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.

◆ PCurve() [2/2]

bool ShapeAnalysis_Edge::PCurve ( const TopoDS_Edge & edge,
const TopoDS_Face & face,
occ::handle< Geom2d_Curve > & C2d,
double & cf,
double & cl,
const bool orient = true ) const

◆ Status()

bool ShapeAnalysis_Edge::Status ( const ShapeExtend_Status status) const

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

Field Documentation

◆ myStatus

int ShapeAnalysis_Edge::myStatus
protected

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