OCC.BRepLib module

The BRepLib package provides general utilities forBRep.* FindSurface : Class to compute a surface througha set of edges.* Compute missing 3d curve on an edge.

class BRepLib_CheckCurveOnSurface(*args)

Bases: object

  • Empty contructor
Return type:None
  • Contructor
Parameters:
  • theEdge (TopoDS_Edge &) –
  • theFace (TopoDS_Face &) –
Return type:

None

  • Contructor
Parameters:
  • theCurve (Handle_Geom_Curve &) –
  • thePCurve (Handle_Geom2d_Curve &) –
  • theSurface (Handle_Geom_Surface &) –
  • theFirst (float) –
  • theLast (float) –
Return type:

None

Curve()
  • Returns my3DCurve
Return type:Handle_Geom_Curve
ErrorStatus()
  • Returns error status The possible values are: 0 - OK; 1 - null curve or surface or 2d curve; 2 - invalid parametric range; 3 - error in calculations.
Return type:int
Init()
  • Sets the data for the algorithm
Parameters:
  • theEdge (TopoDS_Edge &) –
  • theFace (TopoDS_Face &) –
Return type:

None

  • Sets the data for the algorithm
Parameters:
  • theCurve (Handle_Geom_Curve &) –
  • thePCurve (Handle_Geom2d_Curve &) –
  • theSurface (Handle_Geom_Surface &) –
  • theFirst (float) –
  • theLast (float) –
Return type:

None

IsDone()
  • Returns true if the max distance has been found
Return type:bool
MaxDistance()
  • Returns max distance
Return type:float
MaxParameter()
  • Returns parameter in which the distance is maximal
Return type:float
PCurve()
  • Returns my2DCurve
Return type:Handle_Geom2d_Curve
PCurve2()
  • Returns my2DCurve
Return type:Handle_Geom2d_Curve
Perform()
  • Performs the calculation If isTheMultyTheadDisabled == True then computation will be made without any parallelization.
Parameters:isTheMultyTheradDisabled (bool) – default value is Standard_False
Return type:None
Range()
  • Returns the range
Parameters:
  • theFirst (float &) –
  • theLast (float &) –
Return type:

None

Surface()
  • Returns mySurface
Return type:Handle_Geom_Surface
thisown

The membership flag

class BRepLib_Command(*args, **kwargs)

Bases: object

Check()
  • Raises NotDone if done is false.
Return type:None
Delete()
Return type:void
IsDone()
Return type:bool
thisown

The membership flag

class BRepLib_FindSurface(*args)

Bases: object

Return type:None
  • Computes the Surface from the edges of <S> with the given tolerance. if <OnlyPlane> is true, the computed surface will be a plane. If it is not possible to find a plane, the flag NotDone will be set. If <OnlyClosed> is true, then S sould be a wire and the existing surface, on which wire S is not closed in 2D, will be ignored.
Parameters:
  • S (TopoDS_Shape &) –
  • Tol (float) – default value is -1
  • OnlyPlane (bool) – default value is Standard_False
  • OnlyClosed (bool) – default value is Standard_False
Return type:

None

Existed()
Return type:bool
Found()
Return type:bool
Init()
  • Computes the Surface from the edges of <S> with the given tolerance. if <OnlyPlane> is true, the computed surface will be a plane. If it is not possible to find a plane, the flag NotDone will be set. If <OnlyClosed> is true, then S sould be a wire and the existing surface, on which wire S is not closed in 2D, will be ignored.
Parameters:
  • S (TopoDS_Shape &) –
  • Tol (float) – default value is -1
  • OnlyPlane (bool) – default value is Standard_False
  • OnlyClosed (bool) – default value is Standard_False
Return type:

None

Location()
Return type:TopLoc_Location
Surface()
Return type:Handle_Geom_Surface
Tolerance()
Return type:float
ToleranceReached()
Return type:float
thisown

The membership flag

class BRepLib_FuseEdges(*args)

Bases: object

  • Initialise members and build construction of map of ancestors.
Parameters:
  • theShape (TopoDS_Shape &) –
  • PerformNow (bool) – default value is Standard_False
Return type:

None

AvoidEdges()
  • set edges to avoid being fused
Parameters:theMapEdg (TopTools_IndexedMapOfShape &) –
Return type:None
Edges()
  • returns all the list of edges to be fused each list of the map represent a set of connex edges that can be fused.
Parameters:theMapLstEdg (TopTools_DataMapOfIntegerListOfShape &) –
Return type:None
Faces()
  • returns the map of modified faces.
Parameters:theMapFac (TopTools_DataMapOfShapeShape &) –
Return type:None
NbVertices()
  • returns the number of vertices candidate to be removed
Return type:int
Perform()
  • Using map of list of connex edges, fuse each list to one edge and then update myShape
Return type:None
ResultEdges()
  • returns all the fused edges. each integer entry in the map corresponds to the integer in the DataMapOfIntegerListOfShape we get in method Edges. That is to say, to the list of edges in theMapLstEdg(i) corresponds the resulting edge theMapEdge(i)
Parameters:theMapEdg (TopTools_DataMapOfIntegerShape &) –
Return type:None
SetConcatBSpl()
  • set mode to enable concatenation G1 BSpline edges in one End Modified by IFV 19.04.07
Parameters:theConcatBSpl (bool) – default value is Standard_True
Return type:None
Shape()
  • returns myShape modified with the list of internal edges removed from it.
Return type:TopoDS_Shape
thisown

The membership flag

class BRepLib_MakeEdge(*args)

Bases: OCC.BRepLib.BRepLib_MakeShape

Return type:

None

Parameters:
  • V1 (TopoDS_Vertex &) –
  • V2 (TopoDS_Vertex &) –
  • P1 (gp_Pnt) –
  • P2 (gp_Pnt) –
  • L (Handle_Geom2d_Curve &) –
  • L
  • p1 (float) –
  • p2 (float) –
  • L
  • P1
  • P2
  • L
  • V1
  • V2
  • L
  • L
  • p1
  • p2
  • L
  • P1
  • P2
  • L
  • V1
  • V2
  • L
  • L
  • p1
  • p2
  • L
  • P1
  • P2
  • L
  • V1
  • V2
  • L
  • L
  • p1
  • p2
  • L
  • P1
  • P2
  • L
  • V1
  • V2
  • L
  • L
  • p1
  • p2
  • L
  • P1
  • P2
  • L
  • V1
  • V2
  • L
  • L
  • p1
  • p2
  • L
  • P1
  • P2
  • L
  • V1
  • V2
  • L
  • P1
  • P2
  • p1
  • p2
  • L
  • V1
  • V2
  • p1
  • p2
  • L
  • S (Handle_Geom_Surface &) –
  • L
  • S
  • p1
  • p2
  • L
  • S
  • P1
  • P2
  • L
  • S
  • V1
  • V2
  • L
  • S
  • P1
  • P2
  • p1
  • p2
  • L
  • S
  • V1
  • V2
  • p1
  • p2
Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Edge()
Return type:TopoDS_Edge
Error()
  • Returns the error description when NotDone.
Return type:BRepLib_EdgeError
Init()
Parameters:
  • C (Handle_Geom2d_Curve &) –
  • C
  • p1 (float) –
  • p2 (float) –
  • C
  • P1 (gp_Pnt) –
  • P2 (gp_Pnt) –
  • C
  • V1 (TopoDS_Vertex &) –
  • V2 (TopoDS_Vertex &) –
  • C
  • P1
  • P2
  • p1
  • p2
  • C
  • V1
  • V2
  • p1
  • p2
  • C
  • S (Handle_Geom_Surface &) –
  • C
  • S
  • p1
  • p2
  • C
  • S
  • P1
  • P2
  • C
  • S
  • V1
  • V2
  • C
  • S
  • P1
  • P2
  • p1
  • p2
  • C
  • S
  • V1
  • V2
  • p1
  • p2
Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Vertex1()
  • Returns the first vertex of the edge. May be Null.
Return type:TopoDS_Vertex
Vertex2()
  • Returns the second vertex of the edge. May be Null.
Return type:TopoDS_Vertex
thisown

The membership flag

class BRepLib_MakeEdge2d(*args)

Bases: OCC.BRepLib.BRepLib_MakeShape

Parameters:
  • V1 (TopoDS_Vertex &) –
  • V2 (TopoDS_Vertex &) –
  • P1 (gp_Pnt2d) –
  • P2 (gp_Pnt2d) –
  • L (Handle_Geom2d_Curve &) –
  • L
  • p1 (float) –
  • p2 (float) –
  • L
  • P1
  • P2
  • L
  • V1
  • V2
  • L
  • L
  • p1
  • p2
  • L
  • P1
  • P2
  • L
  • V1
  • V2
  • L
  • L
  • p1
  • p2
  • L
  • P1
  • P2
  • L
  • V1
  • V2
  • L
  • L
  • p1
  • p2
  • L
  • P1
  • P2
  • L
  • V1
  • V2
  • L
  • L
  • p1
  • p2
  • L
  • P1
  • P2
  • L
  • V1
  • V2
  • L
  • L
  • p1
  • p2
  • L
  • P1
  • P2
  • L
  • V1
  • V2
  • L
  • P1
  • P2
  • p1
  • p2
  • L
  • V1
  • V2
  • p1
  • p2
Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Edge()
Return type:TopoDS_Edge
Error()
  • Returns the error description when NotDone.
Return type:BRepLib_EdgeError
Init()
Parameters:
  • C (Handle_Geom2d_Curve &) –
  • C
  • p1 (float) –
  • p2 (float) –
  • C
  • P1 (gp_Pnt2d) –
  • P2 (gp_Pnt2d) –
  • C
  • V1 (TopoDS_Vertex &) –
  • V2 (TopoDS_Vertex &) –
  • C
  • P1
  • P2
  • p1
  • p2
  • C
  • V1
  • V2
  • p1
  • p2
Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Vertex1()
  • Returns the first vertex of the edge. May be Null.
Return type:TopoDS_Vertex
Vertex2()
  • Returns the second vertex of the edge. May be Null.
Return type:TopoDS_Vertex
thisown

The membership flag

class BRepLib_MakeFace(*args)

Bases: OCC.BRepLib.BRepLib_MakeShape

  • Not done.
Return type:None
  • Load a face. Usefull to add wires.
Parameters:F (TopoDS_Face &) –
Return type:None
  • Make a face from a plane.
Parameters:P (gp_Pln) –
Return type:None
  • Make a face from a cylinder.
Parameters:C (gp_Cylinder) –
Return type:None
  • Make a face from a cone.
Parameters:C (gp_Cone) –
Return type:None
  • Make a face from a sphere.
Parameters:S (gp_Sphere) –
Return type:None
  • Make a face from a torus.
Parameters:C (gp_Torus) –
Return type:None
  • Make a face from a Surface. Accepts tolerance value (TolDegen) for resolution of degenerated edges.
Parameters:
  • S (Handle_Geom_Surface &) –
  • TolDegen (float) –
Return type:

None

  • Make a face from a plane.
Parameters:
Return type:

None

  • Make a face from a cylinder.
Parameters:
Return type:

None

  • Make a face from a cone.
Parameters:
Return type:

None

  • Make a face from a sphere.
Parameters:
Return type:

None

  • Make a face from a torus.
Parameters:
Return type:

None

  • Make a face from a Surface. Accepts min & max parameters to construct the face’s bounds. Also accepts tolerance value (TolDegen) for resolution of degenerated edges.
Parameters:
Return type:

None

  • Find a surface from the wire and make a face. if <OnlyPlane> is true, the computed surface will be a plane. If it is not possible to find a plane, the flag NotDone will be set.
Parameters:
  • W (TopoDS_Wire &) –
  • OnlyPlane (bool) – default value is Standard_False
Return type:

None

  • Make a face from a plane and a wire.
Parameters:
  • P (gp_Pln) –
  • W (TopoDS_Wire &) –
  • Inside (bool) – default value is Standard_True
Return type:

None

  • Make a face from a cylinder and a wire.
Parameters:
  • C (gp_Cylinder) –
  • W (TopoDS_Wire &) –
  • Inside (bool) – default value is Standard_True
Return type:

None

  • Make a face from a cone and a wire.
Parameters:
  • C (gp_Cone) –
  • W (TopoDS_Wire &) –
  • Inside (bool) – default value is Standard_True
Return type:

None

  • Make a face from a sphere and a wire.
Parameters:
  • S (gp_Sphere) –
  • W (TopoDS_Wire &) –
  • Inside (bool) – default value is Standard_True
Return type:

None

  • Make a face from a torus and a wire.
Parameters:
  • C (gp_Torus) –
  • W (TopoDS_Wire &) –
  • Inside (bool) – default value is Standard_True
Return type:

None

  • Make a face from a Surface and a wire.
Parameters:
  • S (Handle_Geom_Surface &) –
  • W (TopoDS_Wire &) –
  • Inside (bool) – default value is Standard_True
Return type:

None

  • Adds the wire <W> in the face <F>
Parameters:
  • F (TopoDS_Face &) –
  • W (TopoDS_Wire &) –
Return type:

None

Add()
  • Adds the wire <W> in the current face.
Parameters:W (TopoDS_Wire &) –
Return type:None
Error()
Return type:BRepLib_FaceError
Face()
  • Returns the new face.
Return type:TopoDS_Face
Init()
  • Load the face.
Parameters:F (TopoDS_Face &) –
Return type:None
  • Creates the face from the surface. If Bound is True a wire is made from the natural bounds. Accepts tolerance value (TolDegen) for resolution of degenerated edges.
Parameters:
  • S (Handle_Geom_Surface &) –
  • Bound (bool) –
  • TolDegen (float) –
Return type:

None

  • Creates the face from the surface and the min-max values. Accepts tolerance value (TolDegen) for resolution of degenerated edges.
Parameters:
Return type:

None

static IsDegenerated()
  • Checks the specified curve is degenerated according to specified tolerance. Returns <theActTol> less than <theMaxTol>, which shows actual tolerance to decide the curve is degenerated. Warning: For internal use of BRepLib_MakeFace and BRepLib_MakeShell.
Parameters:
  • theCurve (Handle_Geom_Curve &) –
  • theMaxTol (float) –
  • theActTol (float &) –
Return type:

bool

thisown

The membership flag

BRepLib_MakeFace_IsDegenerated()
  • Checks the specified curve is degenerated according to specified tolerance. Returns <theActTol> less than <theMaxTol>, which shows actual tolerance to decide the curve is degenerated. Warning: For internal use of BRepLib_MakeFace and BRepLib_MakeShell.
Parameters:
  • theCurve (Handle_Geom_Curve &) –
  • theMaxTol (float) –
  • theActTol (float &) –
Return type:

bool

class BRepLib_MakePolygon(*args)

Bases: OCC.BRepLib.BRepLib_MakeShape

  • Creates an empty MakePolygon.
Return type:

None

Parameters:
  • P1 (gp_Pnt) –
  • P2 (gp_Pnt) –
  • P1
  • P2
  • P3 (gp_Pnt) –
  • Close (bool) – default value is Standard_False
  • P1
  • P2
  • P3
  • P4 (gp_Pnt) –
  • Close – default value is Standard_False
  • V1 (TopoDS_Vertex &) –
  • V2 (TopoDS_Vertex &) –
  • V1
  • V2
  • V3 (TopoDS_Vertex &) –
  • Close – default value is Standard_False
  • V1
  • V2
  • V3
  • V4 (TopoDS_Vertex &) –
  • Close – default value is Standard_False
Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Add()
Parameters:
  • P (gp_Pnt) –
  • V (TopoDS_Vertex &) –
Return type:

None

Return type:

None

Added()
  • Returns True if the last vertex or point was succesfully added.
Return type:bool
Close()
Return type:None
Edge()
  • Returns the last edge added to the polygon.
Return type:TopoDS_Edge
FirstVertex()
Return type:TopoDS_Vertex
LastVertex()
Return type:TopoDS_Vertex
Wire()
Return type:TopoDS_Wire
thisown

The membership flag

class BRepLib_MakeShape(*args, **kwargs)

Bases: OCC.BRepLib.BRepLib_Command

Build()
  • This is called by Shape(). It does nothing but may be redefined.
Return type:None
DescendantFaces()
  • returns the list of generated Faces.
Parameters:F (TopoDS_Face &) –
Return type:TopTools_ListOfShape
FaceStatus()
  • returns the status of the Face after the shape creation.
Parameters:F (TopoDS_Face &) –
Return type:BRepLib_ShapeModification
FacesFromEdges()
  • returns a list of the created faces from the edge <E>.
Parameters:E (TopoDS_Edge &) –
Return type:TopTools_ListOfShape
HasDescendants()
  • Returns True if the Face generates new topology.
Parameters:F (TopoDS_Face &) –
Return type:bool
NbSurfaces()
  • returns the number of surfaces after the shape creation.
Return type:int
NewFaces()
  • Return the faces created for surface I.
Parameters:I (int) –
Return type:TopTools_ListOfShape
Shape()
Return type:TopoDS_Shape
thisown

The membership flag

class BRepLib_MakeShell(*args)

Bases: OCC.BRepLib.BRepLib_MakeShape

  • Not done.
Return type:

None

Parameters:
  • S (Handle_Geom_Surface &) –
  • Segment (bool) – default value is Standard_False
  • S
  • UMin (float) –
  • UMax (float) –
  • VMin (float) –
  • VMax (float) –
  • Segment – default value is Standard_False
Return type:

None

Return type:

None

Error()
Return type:BRepLib_ShellError
Init()
  • Creates the shell from the surface and the min-max values.
Parameters:
  • S (Handle_Geom_Surface &) –
  • UMin (float) –
  • UMax (float) –
  • VMin (float) –
  • VMax (float) –
  • Segment (bool) – default value is Standard_False
Return type:

None

Shell()
  • Returns the new Shell.
Return type:TopoDS_Shell
thisown

The membership flag

class BRepLib_MakeSolid(*args)

Bases: OCC.BRepLib.BRepLib_MakeShape

  • Solid covers whole space.
Return type:None
  • Make a solid from a CompSolid.
Parameters:S (TopoDS_CompSolid &) –
Return type:None
  • Make a solid from a shell.
Parameters:S (TopoDS_Shell &) –
Return type:None
  • Make a solid from two shells.
Parameters:
  • S1 (TopoDS_Shell &) –
  • S2 (TopoDS_Shell &) –
Return type:

None

  • Make a solid from three shells.
Parameters:
  • S1 (TopoDS_Shell &) –
  • S2 (TopoDS_Shell &) –
  • S3 (TopoDS_Shell &) –
Return type:

None

  • Make a solid from a solid. Usefull for adding later.
Parameters:So (TopoDS_Solid &) –
Return type:None
  • Add a shell to a solid.
Parameters:
  • So (TopoDS_Solid &) –
  • S (TopoDS_Shell &) –
Return type:

None

Add()
  • Add the shell to the current solid.
Parameters:S (TopoDS_Shell &) –
Return type:None
Solid()
  • Returns the new Solid.
Return type:TopoDS_Solid
thisown

The membership flag

class BRepLib_MakeVertex(*args)

Bases: OCC.BRepLib.BRepLib_MakeShape

Parameters:P (gp_Pnt) –
Return type:None
Vertex()
Return type:TopoDS_Vertex
thisown

The membership flag

class BRepLib_MakeWire(*args)

Bases: OCC.BRepLib.BRepLib_MakeShape

  • NotDone MakeWire.
Return type:None
  • Make a Wire from an edge.
Parameters:E (TopoDS_Edge &) –
Return type:None
  • Make a Wire from two edges.
Parameters:
  • E1 (TopoDS_Edge &) –
  • E2 (TopoDS_Edge &) –
Return type:

None

  • Make a Wire from three edges.
Parameters:
  • E1 (TopoDS_Edge &) –
  • E2 (TopoDS_Edge &) –
  • E3 (TopoDS_Edge &) –
Return type:

None

  • Make a Wire from four edges.
Parameters:
  • E1 (TopoDS_Edge &) –
  • E2 (TopoDS_Edge &) –
  • E3 (TopoDS_Edge &) –
  • E4 (TopoDS_Edge &) –
Return type:

None

  • Make a Wire from a Wire. Usefull for adding later.
Parameters:W (TopoDS_Wire &) –
Return type:None
  • Add an edge to a wire.
Parameters:
  • W (TopoDS_Wire &) –
  • E (TopoDS_Edge &) –
Return type:

None

Add()
  • Add the edge <E> to the current wire.
Parameters:E (TopoDS_Edge &) –
Return type:None
  • Add the edges of <W> to the current wire.
Parameters:W (TopoDS_Wire &) –
Return type:None
  • Add the edges of <L> to the current wire. The edges are not to be consecutive. But they are to be all connected geometrically or topologically.
Parameters:L (TopTools_ListOfShape &) –
Return type:None
Edge()
  • Returns the last edge added to the wire.
Return type:TopoDS_Edge
Error()
Return type:BRepLib_WireError
Vertex()
  • Returns the last connecting vertex.
Return type:TopoDS_Vertex
Wire()
  • Returns the new wire.
Return type:TopoDS_Wire
thisown

The membership flag

class SwigPyIterator(*args, **kwargs)

Bases: object

advance()
copy()
decr()
distance()
equal()
incr()
next()
previous()
thisown

The membership flag

value()
class breplib

Bases: object

static BuildCurve3d()
  • 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
Parameters:
  • E (TopoDS_Edge &) –
  • Tolerance (float) – default value is 1.0e-5
  • Continuity (GeomAbs_Shape) – default value is GeomAbs_C1
  • MaxDegree (int) – default value is 14
  • MaxSegment (int) – default value is 0
Return type:

bool

static BuildCurves3d()
  • Computes the 3d curves for all the edges of <S> return False if one of the computation failed. <MaxSegment> >= 30 in approximation
Parameters:
  • S (TopoDS_Shape &) –
  • Tolerance (float) –
  • Continuity (GeomAbs_Shape) – default value is GeomAbs_C1
  • MaxDegree (int) – default value is 14
  • MaxSegment (int) – default value is 0
Return type:

bool

  • Computes the 3d curves for all the edges of <S> return False if one of the computation failed.
Parameters:S (TopoDS_Shape &) –
Return type:bool
static CheckSameRange()
  • 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
Parameters:
  • E (TopoDS_Edge &) –
  • Confusion (float) – default value is 1.0e-12
Return type:

bool

static EncodeRegularity()
  • 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.
Parameters:
  • S (TopoDS_Shape &) –
  • TolAng (float) – default value is 1.0e-10
Return type:

void

  • 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.
Parameters:
  • S (TopoDS_Edge &) –
  • F1 (TopoDS_Face &) –
  • F2 (TopoDS_Face &) –
  • TolAng (float) – default value is 1.0e-10
Return type:

void

static EnsureNormalConsistency()
  • 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.
Parameters:
  • S (TopoDS_Shape &) –
  • theAngTol (float) – default value is 0.001
  • ForceComputeNormals (bool) – default value is Standard_False
Return type:

bool

static OrientClosedSolid()
  • 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)
Parameters:solid (TopoDS_Solid &) –
Return type:bool
Plane()
  • Sets the current plane to P.
Parameters:P (Handle_Geom_Plane &) –
Return type:void
  • Returns the current plane.
Return type:Handle_Geom_Plane
static Precision()
  • Computes the max distance between edge and its 2d representation on the face. Sets the default precision. The current Precision is returned.
Parameters:P (float) –
Return type:void
  • Returns the default precision.
Return type:float
static ReverseSortFaces()
  • Sorts in LF the Faces of S on the reverse complexity of their surfaces (other,Torus,Sphere,Cone,Cylinder,Plane)
Parameters:
  • S (TopoDS_Shape &) –
  • LF (TopTools_ListOfShape &) –
Return type:

void

static SameParameter()
  • 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.
Parameters:
  • E (TopoDS_Edge &) –
  • Tolerance (float) – default value is 1.0e-5
Return type:

void

  • 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.
Parameters:
  • S (TopoDS_Shape &) –
  • Tolerance (float) – default value is 1.0e-5
  • forced (bool) – default value is Standard_False
Return type:

void

static SameRange()
  • 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.
Parameters:
  • E (TopoDS_Edge &) –
  • Tolerance (float) – default value is 1.0e-5
Return type:

void

static SortFaces()
  • Sorts in LF the Faces of S on the complexity of their surfaces (Plane,Cylinder,Cone,Sphere,Torus,other)
Parameters:
  • S (TopoDS_Shape &) –
  • LF (TopTools_ListOfShape &) –
Return type:

void

static UpdateEdgeTol()
  • 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
Parameters:
  • E (TopoDS_Edge &) –
  • MinToleranceRequest (float) –
  • MaxToleranceToCheck (float) –
Return type:

bool

static UpdateEdgeTolerance()
  • – 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
Parameters:
  • S (TopoDS_Shape &) –
  • MinToleranceRequest (float) –
  • MaxToleranceToCheck (float) –
Return type:

bool

static UpdateTolerances()
  • 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)
Parameters:
  • S (TopoDS_Shape &) –
  • verifyFaceTolerance (bool) – default value is Standard_False
Return type:

void

thisown

The membership flag

breplib_BuildCurve3d()
  • 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
Parameters:
  • E (TopoDS_Edge &) –
  • Tolerance (float) – default value is 1.0e-5
  • Continuity (GeomAbs_Shape) – default value is GeomAbs_C1
  • MaxDegree (int) – default value is 14
  • MaxSegment (int) – default value is 0
Return type:

bool

breplib_BuildCurves3d()
  • Computes the 3d curves for all the edges of <S> return False if one of the computation failed. <MaxSegment> >= 30 in approximation
Parameters:
  • S (TopoDS_Shape &) –
  • Tolerance (float) –
  • Continuity (GeomAbs_Shape) – default value is GeomAbs_C1
  • MaxDegree (int) – default value is 14
  • MaxSegment (int) – default value is 0
Return type:

bool

  • Computes the 3d curves for all the edges of <S> return False if one of the computation failed.
Parameters:S (TopoDS_Shape &) –
Return type:bool
breplib_CheckSameRange()
  • 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
Parameters:
  • E (TopoDS_Edge &) –
  • Confusion (float) – default value is 1.0e-12
Return type:

bool

breplib_EncodeRegularity()
  • 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.
Parameters:
  • S (TopoDS_Shape &) –
  • TolAng (float) – default value is 1.0e-10
Return type:

void

  • 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.
Parameters:
  • S (TopoDS_Edge &) –
  • F1 (TopoDS_Face &) –
  • F2 (TopoDS_Face &) –
  • TolAng (float) – default value is 1.0e-10
Return type:

void

breplib_EnsureNormalConsistency()
  • 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.
Parameters:
  • S (TopoDS_Shape &) –
  • theAngTol (float) – default value is 0.001
  • ForceComputeNormals (bool) – default value is Standard_False
Return type:

bool

breplib_OrientClosedSolid()
  • 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)
Parameters:solid (TopoDS_Solid &) –
Return type:bool
breplib_Precision()
  • Computes the max distance between edge and its 2d representation on the face. Sets the default precision. The current Precision is returned.
Parameters:P (float) –
Return type:void
  • Returns the default precision.
Return type:float
breplib_ReverseSortFaces()
  • Sorts in LF the Faces of S on the reverse complexity of their surfaces (other,Torus,Sphere,Cone,Cylinder,Plane)
Parameters:
  • S (TopoDS_Shape &) –
  • LF (TopTools_ListOfShape &) –
Return type:

void

breplib_SameParameter()
  • 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.
Parameters:
  • E (TopoDS_Edge &) –
  • Tolerance (float) – default value is 1.0e-5
Return type:

void

  • 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.
Parameters:
  • S (TopoDS_Shape &) –
  • Tolerance (float) – default value is 1.0e-5
  • forced (bool) – default value is Standard_False
Return type:

void

breplib_SameRange()
  • 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.
Parameters:
  • E (TopoDS_Edge &) –
  • Tolerance (float) – default value is 1.0e-5
Return type:

void

breplib_SortFaces()
  • Sorts in LF the Faces of S on the complexity of their surfaces (Plane,Cylinder,Cone,Sphere,Torus,other)
Parameters:
  • S (TopoDS_Shape &) –
  • LF (TopTools_ListOfShape &) –
Return type:

void

breplib_UpdateEdgeTol()
  • 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
Parameters:
  • E (TopoDS_Edge &) –
  • MinToleranceRequest (float) –
  • MaxToleranceToCheck (float) –
Return type:

bool

breplib_UpdateEdgeTolerance()
  • – 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
Parameters:
  • S (TopoDS_Shape &) –
  • MinToleranceRequest (float) –
  • MaxToleranceToCheck (float) –
Return type:

bool

breplib_UpdateTolerances()
  • 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)
Parameters:
  • S (TopoDS_Shape &) –
  • verifyFaceTolerance (bool) – default value is Standard_False
Return type:

void

new_instancemethod(func, inst, cls)
register_handle(handle, base_object)

Inserts the handle into the base object to prevent memory corruption in certain cases