Open CASCADE Technology  7.1.0.beta
Static Public Member Functions

BRepLib Class Reference

The BRepLib package provides general utilities for BRep. More...

#include <BRepLib.hxx>

Static Public Member Functions

static void Precision (const Standard_Real P)
 Computes the max distance between edge and its 2d representation on the face. Sets the default precision. The current Precision is returned. More...
 
static Standard_Real Precision ()
 Returns the default precision. More...
 
static void Plane (const Handle< Geom_Plane > &P)
 Sets the current plane to P. More...
 
static const Handle< Geom_Plane > & Plane ()
 Returns the current plane. More...
 
static Standard_Boolean CheckSameRange (const TopoDS_Edge &E, const Standard_Real Confusion=1.0e-12)
 checks if the Edge is same range IGNORING the same range flag of the edge Confusion argument is to compare real numbers idenpendently of any model space tolerance More...
 
static void SameRange (const TopoDS_Edge &E, const Standard_Real Tolerance=1.0e-5)
 will make all the curve representation have the same range domain for the parameters. This will IGNORE the same range flag value to proceed. If there is a 3D curve there it will the range of that curve. If not the first curve representation encountered in the list will give its range to the all the other curves. More...
 
static Standard_Boolean BuildCurve3d (const TopoDS_Edge &E, const Standard_Real Tolerance=1.0e-5, const GeomAbs_Shape Continuity=GeomAbs_C1, const Standard_Integer MaxDegree=14, const Standard_Integer MaxSegment=0)
 Computes the 3d curve for the edge <E> if it does not exist. Returns True if the curve was computed or existed. Returns False if there is no planar pcurve or the computation failed. <MaxSegment> >= 30 in approximation. More...
 
static Standard_Boolean BuildCurves3d (const TopoDS_Shape &S, const Standard_Real Tolerance, const GeomAbs_Shape Continuity=GeomAbs_C1, const Standard_Integer MaxDegree=14, const Standard_Integer MaxSegment=0)
 Computes the 3d curves for all the edges of <S> return False if one of the computation failed. <MaxSegment> >= 30 in approximation. More...
 
static Standard_Boolean BuildCurves3d (const TopoDS_Shape &S)
 Computes the 3d curves for all the edges of <S> return False if one of the computation failed. More...
 
static Standard_Boolean UpdateEdgeTol (const TopoDS_Edge &E, const Standard_Real MinToleranceRequest, const Standard_Real MaxToleranceToCheck)
 Checks if the edge has a Tolerance smaller than – – – – MaxToleranceToCheck if so it will compute the radius of – the cylindrical pipe surface that MinToleranceRequest is the minimum tolerance before it is usefull to start testing. Usually it should be arround 10e-5 contains all – the curve represenation of the edge returns True if the Edge tolerance had to be updated. More...
 
static Standard_Boolean UpdateEdgeTolerance (const TopoDS_Shape &S, const Standard_Real MinToleranceRequest, const Standard_Real MaxToleranceToCheck)
 – Checks all the edges of the shape whose – – – Tolerance is smaller than MaxToleranceToCheck – Returns True if at least one edge was updated – MinToleranceRequest is the minimum tolerance before – it – is usefull to start testing. Usually it should be arround – 10e-5– More...
 
static void SameParameter (const TopoDS_Edge &E, const Standard_Real Tolerance=1.0e-5)
 Computes new 2d curve(s) for the edge <E> to have the same parameter as the 3d curve. The algorithm is not done if the flag SameParameter was True on the Edge. More...
 
static void SameParameter (const TopoDS_Shape &S, const Standard_Real Tolerance=1.0e-5, const Standard_Boolean forced=Standard_False)
 Computes new 2d curve(s) for all the edges of <S> to have the same parameter as the 3d curve. The algorithm is not done if the flag SameParameter was True on an Edge. More...
 
static void UpdateTolerances (const TopoDS_Shape &S, const Standard_Boolean verifyFaceTolerance=Standard_False)
 Replaces tolerance of FACE EDGE VERTEX by the tolerance Max of their connected handling shapes. It is not necessary to use this call after SameParameter. (called in) More...
 
static void UpdateInnerTolerances (const TopoDS_Shape &S)
 Checks tolerances of edges (including inner points) and vertices of a shape and updates them to satisfy "SameParameter" condition. More...
 
static Standard_Boolean OrientClosedSolid (TopoDS_Solid &solid)
 Orients the solid forward and the shell with the orientation to have matter in the solid. Returns False if the solid is unOrientable (open or incoherent) More...
 
static void EncodeRegularity (const TopoDS_Shape &S, const Standard_Real TolAng=1.0e-10)
 Encodes the Regularity of edges on a Shape. Warning: <TolAng> is an angular tolerance, expressed in Rad. Warning: If the edges's regularity are coded before, nothing is done. More...
 
static void EncodeRegularity (TopoDS_Edge &S, const TopoDS_Face &F1, const TopoDS_Face &F2, const Standard_Real TolAng=1.0e-10)
 Encodes the Regularity beetween <F1> and <F2> by <E> Warning: <TolAng> is an angular tolerance, expressed in Rad. Warning: If the edge's regularity is coded before, nothing is done. More...
 
static void SortFaces (const TopoDS_Shape &S, TopTools_ListOfShape &LF)
 Sorts in LF the Faces of S on the complexity of their surfaces (Plane,Cylinder,Cone,Sphere,Torus,other) More...
 
static void ReverseSortFaces (const TopoDS_Shape &S, TopTools_ListOfShape &LF)
 Sorts in LF the Faces of S on the reverse complexity of their surfaces (other,Torus,Sphere,Cone,Cylinder,Plane) More...
 
static Standard_Boolean EnsureNormalConsistency (const TopoDS_Shape &S, const Standard_Real theAngTol=0.001, const Standard_Boolean ForceComputeNormals=Standard_False)
 Corrects the normals in Poly_Triangulation of faces, in such way that normals at nodes lying along smooth edges have the same value on both adjacent triangulations. Returns TRUE if any correction is done. More...
 
static void BoundingVertex (const NCollection_List< TopoDS_Shape > &theLV, gp_Pnt &theNewCenter, Standard_Real &theNewTol)
 Calculates the bounding sphere around the set of vertexes from the theLV list. Returns the center (theNewCenter) and the radius (theNewTol) of this sphere. This can be used to construct the new vertex which covers the given set of other vertices. More...
 

Detailed Description

The BRepLib package provides general utilities for BRep.

Member Function Documentation

static void BRepLib::BoundingVertex ( const NCollection_List< TopoDS_Shape > &  theLV,
gp_Pnt theNewCenter,
Standard_Real theNewTol 
)
static

Calculates the bounding sphere around the set of vertexes from the theLV list. Returns the center (theNewCenter) and the radius (theNewTol) of this sphere. This can be used to construct the new vertex which covers the given set of other vertices.

static Standard_Boolean BRepLib::BuildCurve3d ( const TopoDS_Edge E,
const Standard_Real  Tolerance = 1.0e-5,
const GeomAbs_Shape  Continuity = GeomAbs_C1,
const Standard_Integer  MaxDegree = 14,
const Standard_Integer  MaxSegment = 0 
)
static

Computes the 3d curve for the edge <E> if it does not exist. Returns True if the curve was computed or existed. Returns False if there is no planar pcurve or the computation failed. <MaxSegment> >= 30 in approximation.

static Standard_Boolean BRepLib::BuildCurves3d ( const TopoDS_Shape S,
const Standard_Real  Tolerance,
const GeomAbs_Shape  Continuity = GeomAbs_C1,
const Standard_Integer  MaxDegree = 14,
const Standard_Integer  MaxSegment = 0 
)
static

Computes the 3d curves for all the edges of <S> return False if one of the computation failed. <MaxSegment> >= 30 in approximation.

static Standard_Boolean BRepLib::BuildCurves3d ( const TopoDS_Shape S)
static

Computes the 3d curves for all the edges of <S> return False if one of the computation failed.

static Standard_Boolean BRepLib::CheckSameRange ( const TopoDS_Edge E,
const Standard_Real  Confusion = 1.0e-12 
)
static

checks if the Edge is same range IGNORING the same range flag of the edge Confusion argument is to compare real numbers idenpendently of any model space tolerance

static void BRepLib::EncodeRegularity ( const TopoDS_Shape S,
const Standard_Real  TolAng = 1.0e-10 
)
static

Encodes the Regularity of edges on a Shape. Warning: <TolAng> is an angular tolerance, expressed in Rad. Warning: If the edges's regularity are coded before, nothing is done.

static void BRepLib::EncodeRegularity ( TopoDS_Edge S,
const TopoDS_Face F1,
const TopoDS_Face F2,
const Standard_Real  TolAng = 1.0e-10 
)
static

Encodes the Regularity beetween <F1> and <F2> by <E> Warning: <TolAng> is an angular tolerance, expressed in Rad. Warning: If the edge's regularity is coded before, nothing is done.

static Standard_Boolean BRepLib::EnsureNormalConsistency ( const TopoDS_Shape S,
const Standard_Real  theAngTol = 0.001,
const Standard_Boolean  ForceComputeNormals = Standard_False 
)
static

Corrects the normals in Poly_Triangulation of faces, in such way that normals at nodes lying along smooth edges have the same value on both adjacent triangulations. Returns TRUE if any correction is done.

static Standard_Boolean BRepLib::OrientClosedSolid ( TopoDS_Solid solid)
static

Orients the solid forward and the shell with the orientation to have matter in the solid. Returns False if the solid is unOrientable (open or incoherent)

static void BRepLib::Plane ( const Handle< Geom_Plane > &  P)
static

Sets the current plane to P.

static const Handle< Geom_Plane >& BRepLib::Plane ( )
static

Returns the current plane.

static void BRepLib::Precision ( const Standard_Real  P)
static

Computes the max distance between edge and its 2d representation on the face. Sets the default precision. The current Precision is returned.

static Standard_Real BRepLib::Precision ( )
static

Returns the default precision.

static void BRepLib::ReverseSortFaces ( const TopoDS_Shape S,
TopTools_ListOfShape LF 
)
static

Sorts in LF the Faces of S on the reverse complexity of their surfaces (other,Torus,Sphere,Cone,Cylinder,Plane)

static void BRepLib::SameParameter ( const TopoDS_Edge E,
const Standard_Real  Tolerance = 1.0e-5 
)
static

Computes new 2d curve(s) for the edge <E> to have the same parameter as the 3d curve. The algorithm is not done if the flag SameParameter was True on the Edge.

static void BRepLib::SameParameter ( const TopoDS_Shape S,
const Standard_Real  Tolerance = 1.0e-5,
const Standard_Boolean  forced = Standard_False 
)
static

Computes new 2d curve(s) for all the edges of <S> to have the same parameter as the 3d curve. The algorithm is not done if the flag SameParameter was True on an Edge.

static void BRepLib::SameRange ( const TopoDS_Edge E,
const Standard_Real  Tolerance = 1.0e-5 
)
static

will make all the curve representation have the same range domain for the parameters. This will IGNORE the same range flag value to proceed. If there is a 3D curve there it will the range of that curve. If not the first curve representation encountered in the list will give its range to the all the other curves.

static void BRepLib::SortFaces ( const TopoDS_Shape S,
TopTools_ListOfShape LF 
)
static

Sorts in LF the Faces of S on the complexity of their surfaces (Plane,Cylinder,Cone,Sphere,Torus,other)

static Standard_Boolean BRepLib::UpdateEdgeTol ( const TopoDS_Edge E,
const Standard_Real  MinToleranceRequest,
const Standard_Real  MaxToleranceToCheck 
)
static

Checks if the edge has a Tolerance smaller than – – – – MaxToleranceToCheck if so it will compute the radius of – the cylindrical pipe surface that MinToleranceRequest is the minimum tolerance before it is usefull to start testing. Usually it should be arround 10e-5 contains all – the curve represenation of the edge returns True if the Edge tolerance had to be updated.

static Standard_Boolean BRepLib::UpdateEdgeTolerance ( const TopoDS_Shape S,
const Standard_Real  MinToleranceRequest,
const Standard_Real  MaxToleranceToCheck 
)
static

– Checks all the edges of the shape whose – – – Tolerance is smaller than MaxToleranceToCheck – Returns True if at least one edge was updated – MinToleranceRequest is the minimum tolerance before – it – is usefull to start testing. Usually it should be arround – 10e-5–

Warning :The method is very slow as it checks all. Use only in interfaces or processing assimilate batch

static void BRepLib::UpdateInnerTolerances ( const TopoDS_Shape S)
static

Checks tolerances of edges (including inner points) and vertices of a shape and updates them to satisfy "SameParameter" condition.

static void BRepLib::UpdateTolerances ( const TopoDS_Shape S,
const Standard_Boolean  verifyFaceTolerance = Standard_False 
)
static

Replaces tolerance of FACE EDGE VERTEX by the tolerance Max of their connected handling shapes. It is not necessary to use this call after SameParameter. (called in)


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