OCC.BRepLib module

class OCC.BRepLib.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 OCC.BRepLib.BRepLib_FindSurface(*args)

Bases: object

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

  • 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

  • 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

  • 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 OCC.BRepLib.BRepLib_FuseEdges(*args)

Bases: object

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
  • 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 OCC.BRepLib.BRepLib_MakeEdge(*args)

Bases: OCC.BRepLib.BRepLib_MakeShape

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 OCC.BRepLib.BRepLib_MakeEdge2d(*args)

Bases: OCC.BRepLib.BRepLib_MakeShape

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 OCC.BRepLib.BRepLib_MakeFace(*args)

Bases: OCC.BRepLib.BRepLib_MakeShape

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:
  • S (Handle_Geom_Surface &) –
  • UMin (float) –
  • UMax (float) –
  • VMin (float) –
  • VMax (float) –
  • TolDegen (float) –
Return type:

None

thisown

The membership flag

class OCC.BRepLib.BRepLib_MakePolygon(*args)

Bases: OCC.BRepLib.BRepLib_MakeShape

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 OCC.BRepLib.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 (Standard_Integer) –
Return type:TopTools_ListOfShape
Shape()
Return type:TopoDS_Shape
thisown

The membership flag

class OCC.BRepLib.BRepLib_MakeShell(*args)

Bases: OCC.BRepLib.BRepLib_MakeShape

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

  • 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 OCC.BRepLib.BRepLib_MakeSolid(*args)

Bases: OCC.BRepLib.BRepLib_MakeShape

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 OCC.BRepLib.BRepLib_MakeVertex(*args)

Bases: OCC.BRepLib.BRepLib_MakeShape

Vertex()
Return type:TopoDS_Vertex
thisown

The membership flag

class OCC.BRepLib.BRepLib_MakeWire(*args)

Bases: OCC.BRepLib.BRepLib_MakeShape

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 OCC.BRepLib.SwigPyIterator(*args, **kwargs)

Bases: object

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

The membership flag

value()
class OCC.BRepLib.breplib(*args, **kwargs)

Bases: object

static BuildCurve3d(*args)
  • 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 (Standard_Integer) – default value is 14
  • MaxSegment (Standard_Integer) – default value is 0
Return type:

bool

  • 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 (Standard_Integer) – default value is 14
  • MaxSegment (Standard_Integer) – default value is 0
Return type:

bool

  • 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 (Standard_Integer) – default value is 14
  • MaxSegment (Standard_Integer) – default value is 0
Return type:

bool

  • 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 (Standard_Integer) – default value is 14
  • MaxSegment (Standard_Integer) – default value is 0
Return type:

bool

  • 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 (Standard_Integer) – default value is 14
  • MaxSegment (Standard_Integer) – default value is 0
Return type:

bool

static BuildCurves3d(*args)
  • 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 (Standard_Integer) – default value is 14
  • MaxSegment (Standard_Integer) – 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. <MaxSegment> >= 30 in approximation
Parameters:
  • S (TopoDS_Shape &) –
  • Tolerance (float) –
  • Continuity (GeomAbs_Shape) – default value is GeomAbs_C1
  • MaxDegree (Standard_Integer) – default value is 14
  • MaxSegment (Standard_Integer) – 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. <MaxSegment> >= 30 in approximation
Parameters:
  • S (TopoDS_Shape &) –
  • Tolerance (float) –
  • Continuity (GeomAbs_Shape) – default value is GeomAbs_C1
  • MaxDegree (Standard_Integer) – default value is 14
  • MaxSegment (Standard_Integer) – 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. <MaxSegment> >= 30 in approximation
Parameters:
  • S (TopoDS_Shape &) –
  • Tolerance (float) –
  • Continuity (GeomAbs_Shape) – default value is GeomAbs_C1
  • MaxDegree (Standard_Integer) – default value is 14
  • MaxSegment (Standard_Integer) – 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(*args)
  • 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

  • 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(*args)
  • 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 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

  • 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 OrientClosedSolid(*args)
  • 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
static Plane(*args)
  • 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(*args)
  • Sets the default precision. The current Precision is returned.
Parameters:P (float) –
Return type:void
  • Returns the default precision.
Return type:float
static ReverseSortFaces(*args)
  • 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(*args)
  • 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 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

  • 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

  • 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(*args)
  • 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

  • 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(*args)
  • 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(*args)
  • 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(*args)
  • – 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(*args)
  • 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

  • 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

OCC.BRepLib.breplib_BuildCurve3d(*args)
  • 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 (Standard_Integer) – default value is 14
  • MaxSegment (Standard_Integer) – default value is 0
Return type:

bool

  • 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 (Standard_Integer) – default value is 14
  • MaxSegment (Standard_Integer) – default value is 0
Return type:

bool

  • 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 (Standard_Integer) – default value is 14
  • MaxSegment (Standard_Integer) – default value is 0
Return type:

bool

  • 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 (Standard_Integer) – default value is 14
  • MaxSegment (Standard_Integer) – default value is 0
Return type:

bool

  • 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 (Standard_Integer) – default value is 14
  • MaxSegment (Standard_Integer) – default value is 0
Return type:

bool

OCC.BRepLib.breplib_BuildCurves3d(*args)
  • 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 (Standard_Integer) – default value is 14
  • MaxSegment (Standard_Integer) – 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. <MaxSegment> >= 30 in approximation
Parameters:
  • S (TopoDS_Shape &) –
  • Tolerance (float) –
  • Continuity (GeomAbs_Shape) – default value is GeomAbs_C1
  • MaxDegree (Standard_Integer) – default value is 14
  • MaxSegment (Standard_Integer) – 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. <MaxSegment> >= 30 in approximation
Parameters:
  • S (TopoDS_Shape &) –
  • Tolerance (float) –
  • Continuity (GeomAbs_Shape) – default value is GeomAbs_C1
  • MaxDegree (Standard_Integer) – default value is 14
  • MaxSegment (Standard_Integer) – 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. <MaxSegment> >= 30 in approximation
Parameters:
  • S (TopoDS_Shape &) –
  • Tolerance (float) –
  • Continuity (GeomAbs_Shape) – default value is GeomAbs_C1
  • MaxDegree (Standard_Integer) – default value is 14
  • MaxSegment (Standard_Integer) – 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
OCC.BRepLib.breplib_CheckSameRange(*args)
  • 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

  • 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

OCC.BRepLib.breplib_EncodeRegularity(*args)
  • 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 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

  • 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

OCC.BRepLib.breplib_OrientClosedSolid(*args)
  • 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
OCC.BRepLib.breplib_Plane(*args)
  • Sets the current plane to P.
Parameters:P (Handle_Geom_Plane &) –
Return type:void
  • Returns the current plane.
Return type:Handle_Geom_Plane
OCC.BRepLib.breplib_Precision(*args)
  • Sets the default precision. The current Precision is returned.
Parameters:P (float) –
Return type:void
  • Returns the default precision.
Return type:float
OCC.BRepLib.breplib_ReverseSortFaces(*args)
  • 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

OCC.BRepLib.breplib_SameParameter(*args)
  • 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 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

  • 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

  • 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

OCC.BRepLib.breplib_SameRange(*args)
  • 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

  • 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

OCC.BRepLib.breplib_SortFaces(*args)
  • 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

OCC.BRepLib.breplib_UpdateEdgeTol(*args)
  • 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

OCC.BRepLib.breplib_UpdateEdgeTolerance(*args)
  • – 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

OCC.BRepLib.breplib_UpdateTolerances(*args)
  • 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

  • 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