OCC.BRepBuilderAPI module

The BRepBuilderAPI package provides an ApplicationProgramming Interface for the BRep topology datastructure.The API is a set of classes aiming to provide :* High level and simple calls for the most commonoperations.* Keeping an access on the low-levelimplementation of high-level calls.* Examples of programming of high-level operationsfrom low-level operations.* A complete coverage of modelling :- Creating vertices ,edges, faces, solids.- Sweeping operations.- Boolean operations.- Global properties computation.The API provides classes to build objects:* The constructors of the classes provides thedifferent constructions methods.* The class keeps as fields the different toolsused to build the object.* The class provides a casting method to getautomatically the result with a function-likecall.For example to make a vertex <V> from a point <P>one can writes :V = BRepBuilderAPI_MakeVertex(P);orBRepBuilderAPI_MakeVertex MV(P);V = MV.Vertex();For tolerances a default precision is used whichcan be changed by the packahe methodBRepBuilderAPI::Precision.For error handling the BRepBuilderAPI commands raise onlythe NotDone error. When Done is false on a commandthe error description can be asked to the command.In theory the comands can be called with anyarguments, argument checking is performed by thecommand.

class BRepBuilderAPI_BndBoxTreeSelector(*args)

Bases: object

  • Constructor; calls the base class constructor
Return type:None
Accept()
  • Implementation of acceptance method This method is called when the bounding box intersect with the current. It stores the object - the index of box in the list of accepted objects. returns True, because the object is accepted
Parameters:theObj (int &) –
Return type:bool
ClearResList()
  • Clear the list of intersecting boxes
Return type:None
Reject()
  • Implementation of rejection method returns True if the bounding box does not intersect with the current
Parameters:theBox (Bnd_Box &) –
Return type:bool
ResInd()
  • Get list of indexes of boxes intersecting with the current box
Return type:TColStd_ListOfInteger
SetCurrent()
  • Set current box to search for overlapping with him
Parameters:theBox (Bnd_Box &) –
Return type:None
thisown

The membership flag

class BRepBuilderAPI_Collect(*args)

Bases: object

Return type:None
Add()
Parameters:
  • SI (TopoDS_Shape &) –
  • MKS (BRepBuilderAPI_MakeShape &) –
Return type:

None

AddGenerated()
Parameters:
  • S (TopoDS_Shape &) –
  • Gen (TopoDS_Shape &) –
Return type:

None

AddModif()
Parameters:
  • S (TopoDS_Shape &) –
  • Mod (TopoDS_Shape &) –
Return type:

None

Filter()
Parameters:SF (TopoDS_Shape &) –
Return type:None
Generated()
Return type:TopTools_DataMapOfShapeListOfShape
Modification()
Return type:TopTools_DataMapOfShapeListOfShape
thisown

The membership flag

class BRepBuilderAPI_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 BRepBuilderAPI_Copy(*args)

Bases: OCC.BRepBuilderAPI.BRepBuilderAPI_ModifyShape

  • Constructs an empty copy framework. Use the function Perform to copy shapes.
Return type:None
  • Constructs a copy framework and copies the shape S. Use the function Shape to access the result. If copyMesh is True, triangulation contained in original shape will be copied along with geometry (by default, triangulation gets lost). If copyGeom is False, only topological objects will be copied, while geometry and triangulation will be shared with original shape. Note: the constructed framework can be reused to copy other shapes: just specify them with the function Perform.
Parameters:
  • S (TopoDS_Shape &) –
  • copyGeom (bool) – default value is Standard_True
  • copyMesh (bool) – default value is Standard_False
Return type:

None

Perform()
  • Copies the shape S. Use the function Shape to access the result. If copyMesh is True, triangulation contained in original shape will be copied along with geometry (by default, triangulation gets lost). If copyGeom is False, only topological objects will be copied, while geometry and triangulation will be shared with original shape.
Parameters:
  • S (TopoDS_Shape &) –
  • copyGeom (bool) – default value is Standard_True
  • copyMesh (bool) – default value is Standard_False
Return type:

None

thisown

The membership flag

class BRepBuilderAPI_FastSewing(*args)

Bases: OCC.Standard.Standard_Transient

  • Creates an object with tolerance of connexity
Parameters:theTolerance (float) – default value is 1.0e-06
Return type:None
Add()
  • Adds faces of a shape
Parameters:theShape (TopoDS_Shape &) –
Return type:bool
  • Adds a surface
Parameters:theSurface (Handle_Geom_Surface &) –
Return type:bool
FS_Degenerated = 1
FS_EmptyInput = 64
FS_Exception = 128
FS_FaceWithNullSurface = 8
FS_FindEdgeError = 4
FS_FindVertexError = 2
FS_InfiniteSurface = 32
FS_NotNaturalBoundsFace = 16
FS_OK = 0
GetHandle()
GetResult()
  • Returns resulted shape
Return type:TopoDS_Shape
GetTolerance()
  • Returns tolerance
Return type:float
Perform()
  • Compute resulted shape

:param : :type : void :rtype: None

SetTolerance()
  • Sets tolerance
Parameters:theToler (float) –
Return type:None
thisown

The membership flag

class BRepBuilderAPI_FindPlane(*args)

Bases: object

  • Initializes an empty algorithm. The function Init is then used to define the shape.
Return type:None
  • Constructs the plane containing the edges of the shape S. A plane is built only if all the edges are within a distance of less than or equal to tolerance from a planar surface. This tolerance value is equal to the larger of the following two values: - Tol, where the default value is negative, or - the largest of the tolerance values assigned to the individual edges of S. Use the function Found to verify that a plane is built. The resulting plane is then retrieved using the function Plane.
Parameters:
  • S (TopoDS_Shape &) –
  • Tol (float) – default value is -1
Return type:

None

Found()
  • Returns true if a plane containing the edges of the shape is found and built. Use the function Plane to consult the result.
Return type:bool
Init()
  • Constructs the plane containing the edges of the shape S. A plane is built only if all the edges are within a distance of less than or equal to tolerance from a planar surface. This tolerance value is equal to the larger of the following two values: - Tol, where the default value is negative, or - the largest of the tolerance values assigned to the individual edges of S. Use the function Found to verify that a plane is built. The resulting plane is then retrieved using the function Plane.
Parameters:
  • S (TopoDS_Shape &) –
  • Tol (float) – default value is -1
Return type:

None

Plane()
  • Returns the plane containing the edges of the shape. Warning Use the function Found to verify that the plane is built. If a plane is not found, Plane returns a null handle.
Return type:Handle_Geom_Plane
thisown

The membership flag

class BRepBuilderAPI_GTransform(*args)

Bases: OCC.BRepBuilderAPI.BRepBuilderAPI_ModifyShape

  • Constructs a framework for applying the geometric transformation T to a shape. Use the function Perform to define the shape to transform.
Parameters:T (gp_GTrsf) –
Return type:None
  • Constructs a framework for applying the geometric transformation T to a shape, and applies it to the shape S. - If the transformation T is direct and isometric (i.e. if the determinant of the vectorial part of T is equal to 1.), and if Copy equals false (default value), the resulting shape is the same as the original but with a new location assigned to it. - In all other cases, the transformation is applied to a duplicate of S. Use the function Shape to access the result. Note: the constructed framework can be reused to apply the same geometric transformation to other shapes: just specify them with the function Perform.
Parameters:
  • S (TopoDS_Shape &) –
  • T (gp_GTrsf) –
  • Copy (bool) – default value is Standard_False
Return type:

None

Perform()
  • Applies the geometric transformation defined at the time of construction of this framework to the shape S. - If the transformation T is direct and isometric (i.e. if the determinant of the vectorial part of T is equal to 1.), and if Copy equals false (default value), the resulting shape is the same as the original but with a new location assigned to it. - In all other cases, the transformation is applied to a duplicate of S. Use the function Shape to access the result. Note: this framework can be reused to apply the same geometric transformation to other shapes: just specify them by calling the function Perform again.
Parameters:
  • S (TopoDS_Shape &) –
  • Copy (bool) – default value is Standard_False
Return type:

None

thisown

The membership flag

class BRepBuilderAPI_MakeEdge(*args)

Bases: OCC.BRepBuilderAPI.BRepBuilderAPI_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
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

  • The general method to directly create an edge is to give - a 3D curve C as the support (geometric domain) of the edge, - two vertices V1 and V2 to limit the curve (definition of the restriction of the edge), and - two real values p1 and p2 which are the parameters for the vertices V1 and V2 on the curve. The curve may be defined as a 2d curve in the parametric space of a surface: a pcurve. The surface on which the edge is built is then kept at the level of the edge. The default tolerance will be associated with this edge. Rules applied to the arguments: For the curve: - The curve must not be a ‘null handle’. - If the curve is a trimmed curve the basis curve is used. For the vertices: - Vertices may be null shapes. When V1 or V2 is null the edge is open in the corresponding direction and the parameter value p1 or p2 must be infinite (remember that Precision::Infinite() defines an infinite value). - The two vertices must be identical if they have the same 3D location. Identical vertices are used in particular when the curve is closed. For the parameters: - The parameters must be in the parametric range of the curve (or the basis curve if the curve is trimmed). If this condition is not satisfied the edge is not built, and the Error function will return BRepAPI_ParameterOutOfRange. - Parameter values must not be equal. If this condition is not satisfied (i.e. if | p1 - p2 | ) the edge is not built, and the Error function will return BRepAPI_LineThroughIdenticPoints. Parameter values are expected to be given in increasing order: C->FirstParameter() - If the parameter values are given in decreasing order the vertices are switched, i.e. the ‘first vertex’ is on the point of parameter p2 and the ‘second vertex’ is on the point of parameter p1. In such a case, to keep the original intent of the construction, the edge will be oriented ‘reversed’. - On a periodic curve the parameter values p1 and p2 are adjusted by adding or subtracting the period to obtain p1 in the parametric range of the curve, and p2] such that [ p1 , where Period is the period of the curve. - A parameter value may be infinite. The edge is open in the corresponding direction. However the corresponding vertex must be a null shape. If this condition is not satisfied the edge is not built, and the Error function will return BRepAPI_PointWithInfiniteParameter. - The distance between the vertex and the point evaluated on the curve with the parameter, must be lower than the precision of the vertex. If this condition is not satisfied the edge is not built, and the Error function will return BRepAPI_DifferentsPointAndParameter. Other edge constructions - The parameter values can be omitted, they will be computed by projecting the vertices on the curve. Note that projection is the only way to evaluate the parameter values of the vertices on the curve: vertices must be given on the curve, i.e. the distance from a vertex to the curve must be less than or equal to the precision of the vertex. If this condition is not satisfied the edge is not built, and the Error function will return BRepAPI_PointProjectionFailed. - 3D points can be given in place of vertices. Vertices will be created from the points (with the default topological precision Precision::Confusion()). Note: - Giving vertices is useful when creating a connected edge. - If the parameter values correspond to the extremities of a closed curve, points must be identical, or at least coincident. If this condition is not satisfied the edge is not built, and the Error function will return BRepAPI_DifferentPointsOnClosedCurve. - The vertices or points can be omitted if the parameter values are given. The points will be computed from the parameters on the curve. The vertices or points and the parameter values can be omitted. The first and last parameters of the curve will then be used. //! Auxiliary methods
Parameters:
  • L (Handle_Geom2d_Curve &) –
  • S (Handle_Geom_Surface &) –
  • V1 (TopoDS_Vertex &) –
  • V2 (TopoDS_Vertex &) –
  • p1 (float) –
  • p2 (float) –
Return type:

None

Edge()
  • Returns the constructed edge. Exceptions StdFail_NotDone if the edge is not built.
Return type:TopoDS_Edge
Error()
  • Returns the construction status - BRepBuilderAPI_EdgeDone if the edge is built, or - another value of the BRepBuilderAPI_EdgeError enumeration indicating the reason of construction failure.
Return type:BRepBuilderAPI_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
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

  • Defines or redefines the arguments for the construction of an edge. This function is currently used after the empty constructor BRepAPI_MakeEdge().
Parameters:
  • C (Handle_Geom2d_Curve &) –
  • S (Handle_Geom_Surface &) –
  • V1 (TopoDS_Vertex &) –
  • V2 (TopoDS_Vertex &) –
  • p1 (float) –
  • p2 (float) –
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. //! Warning The returned vertex in each function corresponds respectively to - the lowest, or - the highest parameter on the curve along which the edge is built. It does not correspond to the first or second vertex given at the time of the construction, if the edge is oriented reversed. Exceptions StdFail_NotDone if the edge is not built.
Return type:TopoDS_Vertex
thisown

The membership flag

class BRepBuilderAPI_MakeEdge2d(*args)

Bases: OCC.BRepBuilderAPI.BRepBuilderAPI_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:BRepBuilderAPI_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 BRepBuilderAPI_MakeFace(*args)

Bases: OCC.BRepBuilderAPI.BRepBuilderAPI_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 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> A general method to create a face is to give - a surface S as the support (the geometric domain) of the face, - and a wire W to bound it. The bounds of the face can also be defined by four parameter values umin, umax, vmin, vmax which determine isoparametric limitations on the parametric space of the surface. In this way, a patch is defined. The parameter values are optional. If they are omitted, the natural bounds of the surface are used. A wire is automatically built using the defined bounds. Up to four edges and four vertices are created with this wire (no edge is created when the corresponding parameter value is infinite). Wires can then be added using the function Add to define other restrictions on the face. These restrictions represent holes. More than one wire may be added by this way, provided that the wires do not cross each other and that they define only one area on the surface. (Be careful, however, as this is not checked). Forbidden addition of wires Note that in this schema, the third case is valid if edges of the wire W are declared internal to the face. As a result, these edges are no longer bounds of the face. A default tolerance (Precision::Confusion()) is given to the face, this tolerance may be increased during construction of the face using various algorithms. Rules applied to the arguments For the surface: - The surface must not be a ‘null handle’. - If the surface is a trimmed surface, the basis surface is used. - For the wire: the wire is composed of connected edges, each edge having a parametric curve description in the parametric domain of the surface; in other words, as a pcurve. For the parameters: - The parameter values must be in the parametric range of the surface (or the basis surface, if the surface is trimmed). If this condition is not satisfied, the face is not built, and the Error function will return BRepBuilderAPI_ParametersOutOfRange. - The bounding parameters p1 and p2 are adjusted on a periodic surface in a given parametric direction by adding or subtracting the period to obtain p1 in the parametric range of the surface and such p2, that p2 - p1 <= Period, where Period is the period of the surface in this parametric direction. - A parameter value may be infinite. There will be no edge and no vertex in the corresponding direction.
Parameters:
  • F (TopoDS_Face &) –
  • W (TopoDS_Wire &) –
Return type:

None

Add()
  • Adds the wire W to the constructed face as a hole. Warning W must not cross the other bounds of the face, and all the bounds must define only one area on the surface. (Be careful, however, as this is not checked.) Example // a cylinder gp_Cylinder C = ..; // a wire TopoDS_Wire W = …; BRepBuilderAPI_MakeFace MF(C); MF.Add(W); TopoDS_Face F = MF;
Parameters:W (TopoDS_Wire &) –
Return type:None
Error()
  • Returns the construction status BRepBuilderAPI_FaceDone if the face is built, or - another value of the BRepBuilderAPI_FaceError enumeration indicating why the construction failed, in particular when the given parameters are outside the bounds of the surface.
Return type:BRepBuilderAPI_FaceError
Face()
  • Returns the constructed face. Exceptions StdFail_NotDone if no face is built.
Return type:TopoDS_Face
Init()
  • Initializes (or reinitializes) the construction of a face by creating a new object which is a copy of the face F, in order to add wires to it, using the function Add. Note: this complete copy of the geometry is only required if you want to work on the geometries of the two faces independently.
Parameters:F (TopoDS_Face &) –
Return type:None
  • Initializes (or reinitializes) the construction of a face on the surface S. If Bound is true, a wire is automatically created from the natural bounds of the surface S and added to the face in order to bound it. If Bound is false, no wire is added. This option is used when real bounds are known. These will be added to the face after this initialization, using the function Add. TolDegen parameter is used for resolution of degenerated edges if calculation of natural bounds is turned on.
Parameters:
  • S (Handle_Geom_Surface &) –
  • Bound (bool) –
  • TolDegen (float) –
Return type:

None

  • Initializes (or reinitializes) the construction of a face on the surface S, limited in the u parametric direction by the two parameter values UMin and UMax and in the v parametric direction by the two parameter values VMin and VMax. Warning Error returns: - BRepBuilderAPI_ParametersOutOfRange when the parameters given are outside the bounds of the surface or the basis surface of a trimmed surface. TolDegen parameter is used for resolution of degenerated edges.
Parameters:
Return type:

None

thisown

The membership flag

class BRepBuilderAPI_MakePolygon(*args)

Bases: OCC.BRepBuilderAPI.BRepBuilderAPI_MakeShape

  • Initializes an empty polygonal wire, to which points or vertices are added using the Add function. As soon as the polygonal wire under construction contains vertices, it can be consulted using the Wire function.
Return type:

None

Parameters:
  • P1 (gp_Pnt) –
  • P2 (gp_Pnt) –
  • P1
  • P2
  • P3 (gp_Pnt) –
  • Close (bool) – default value is Standard_False
Return type:

None

Return type:

None

  • Constructs a polygonal wire from 2, 3 or 4 points. Vertices are automatically created on the given points. The polygonal wire is closed if Close is true; otherwise it is open. Further vertices can be added using the Add function. The polygonal wire under construction can be consulted at any time by using the Wire function. Example //an open polygon from four points TopoDS_Wire W = BRepBuilderAPI_MakePolygon(P1,P2,P3,P4); Warning: The process is equivalent to: - initializing an empty polygonal wire, - and adding the given points in sequence. Consequently, be careful when using this function: if the sequence of points p1 - p2 - p1 is found among the arguments of the constructor, you will create a polygonal wire with two consecutive coincident edges.
Parameters:
  • P1 (gp_Pnt) –
  • P2 (gp_Pnt) –
  • P3 (gp_Pnt) –
  • P4 (gp_Pnt) –
  • Close (bool) – default value is Standard_False
  • V1 (TopoDS_Vertex &) –
  • V2 (TopoDS_Vertex &) –
  • V1
  • V2
  • V3 (TopoDS_Vertex &) –
  • Close – default value is Standard_False
Return type:

None

Return type:

None

Return type:

None

  • Constructs a polygonal wire from 2, 3 or 4 vertices. The polygonal wire is closed if Close is true; otherwise it is open (default value). Further vertices can be added using the Add function. The polygonal wire under construction can be consulted at any time by using the Wire function. Example //a closed triangle from three vertices TopoDS_Wire W = BRepBuilderAPI_MakePolygon(V1,V2,V3,Standard_True); Warning The process is equivalent to: - initializing an empty polygonal wire, - then adding the given points in sequence. So be careful, as when using this function, you could create a polygonal wire with two consecutive coincident edges if the sequence of vertices v1 - v2 - v1 is found among the constructor’s arguments.
Parameters:
  • V1 (TopoDS_Vertex &) –
  • V2 (TopoDS_Vertex &) –
  • V3 (TopoDS_Vertex &) –
  • V4 (TopoDS_Vertex &) –
  • Close (bool) – default value is Standard_False
Return type:

None

Add()
Parameters:P (gp_Pnt) –
Return type:None
  • Adds the point P or the vertex V at the end of the polygonal wire under construction. A vertex is automatically created on the point P. Warning - When P or V is coincident to the previous vertex, no edge is built. The method Added can be used to test for this. Neither P nor V is checked to verify that it is coincident with another vertex than the last one, of the polygonal wire under construction. It is also possible to add vertices on a closed polygon (built for example by using a constructor which declares the polygon closed, or after the use of the Close function). Consequently, be careful using this function: you might create: - a polygonal wire with two consecutive coincident edges, or - a non manifold polygonal wire. - P or V is not checked to verify if it is coincident with another vertex but the last one, of the polygonal wire under construction. It is also possible to add vertices on a closed polygon (built for example by using a constructor which declares the polygon closed, or after the use of the Close function). Consequently, be careful when using this function: you might create: - a polygonal wire with two consecutive coincident edges, or - a non-manifold polygonal wire.
Parameters:V (TopoDS_Vertex &) –
Return type:None
Added()
  • Returns true if the last vertex added to the constructed polygonal wire is not coincident with the previous one.
Return type:bool
Close()
  • Closes the polygonal wire under construction. Note - this is equivalent to adding the first vertex to the polygonal wire under construction.
Return type:None
Edge()
  • Returns the edge built between the last two points or vertices added to the constructed polygonal wire under construction. Warning If there is only one vertex in the polygonal wire, the result is a null edge.
Return type:TopoDS_Edge
FirstVertex()
Return type:TopoDS_Vertex
LastVertex()
  • Returns the first or the last vertex of the polygonal wire under construction. If the constructed polygonal wire is closed, the first and the last vertices are identical.
Return type:TopoDS_Vertex
Wire()
  • Returns the constructed polygonal wire, or the already built part of the polygonal wire under construction. Exceptions StdFail_NotDone if the wire is not built, i.e. if fewer than two vertices have been chained together by this construction algorithm.
Return type:TopoDS_Wire
thisown

The membership flag

class BRepBuilderAPI_MakeShape(*args, **kwargs)

Bases: OCC.BRepBuilderAPI.BRepBuilderAPI_Command

Build()
  • This is called by Shape(). It does nothing but may be redefined.
Return type:void
Generated()
  • Returns the list of shapes generated from the shape <S>.
Parameters:S (TopoDS_Shape &) –
Return type:TopTools_ListOfShape
IsDeleted()
  • Returns true if the shape S has been deleted.
Parameters:S (TopoDS_Shape &) –
Return type:bool
Modified()
  • Returns the list of shapes modified from the shape <S>.
Parameters:S (TopoDS_Shape &) –
Return type:TopTools_ListOfShape
Shape()
  • Returns a shape built by the shape construction algorithm. Raises exception StdFail_NotDone if the shape was not built.
Return type:TopoDS_Shape
thisown

The membership flag

class BRepBuilderAPI_MakeShell(*args)

Bases: OCC.BRepBuilderAPI.BRepBuilderAPI_MakeShape

  • Constructs an empty shell framework. The Init function is used to define the construction arguments. Warning The function Error will return BRepBuilderAPI_EmptyShell if it is called before the function Init.
Return type:None
  • Constructs a shell from the surface S.
Parameters:
  • S (Handle_Geom_Surface &) –
  • Segment (bool) – default value is Standard_False
Return type:

None

  • Constructs a shell from the surface S, limited in the u parametric direction by the two parameter values UMin and UMax, and limited in the v parametric direction by the two parameter values VMin and VMax.
Parameters:
  • S (Handle_Geom_Surface &) –
  • UMin (float) –
  • UMax (float) –
  • VMin (float) –
  • VMax (float) –
  • Segment (bool) – default value is Standard_False
Return type:

None

Error()
  • Returns the construction status: - BRepBuilderAPI_ShellDone if the shell is built, or - another value of the BRepBuilderAPI_ShellError enumeration indicating why the construction failed. This is frequently BRepBuilderAPI_ShellParametersOutOfRange indicating that the given parameters are outside the bounds of the surface.
Return type:BRepBuilderAPI_ShellError
Init()
  • Defines or redefines the arguments for the construction of a shell. The construction is initialized with the surface S, limited in the u parametric direction by the two parameter values UMin and UMax, and in the v parametric direction by the two parameter values VMin and VMax. Warning The function Error returns: - BRepBuilderAPI_ShellParametersOutOfRange when the given parameters are outside the bounds of the surface or the basis surface if S is trimmed
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 BRepBuilderAPI_MakeSolid(*args)

Bases: OCC.BRepBuilderAPI.BRepBuilderAPI_MakeShape

  • Initializes the construction of a solid. An empty solid is considered to cover the whole space. The Add function is used to define shells to bound it.
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. Constructs a solid - covering the whole space, or - from shell S, or - from two shells S1 and S2, or - from three shells S1, S2 and S3, or Warning No check is done to verify the conditions of coherence of the resulting solid. In particular, S1, S2 (and S3) must not intersect each other. Besides, after all shells have been added using the Add function, one of these shells should constitute the outside skin of the solid; it may be closed (a finite solid) or open (an infinite solid). Other shells form hollows (cavities) in these previous ones. Each must bound a closed volume.
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. //! Constructs a solid: - from the solid So, to which shells can be added, or - by adding the shell S to the solid So. Warning No check is done to verify the conditions of coherence of the resulting solid. In particular S must not intersect the solid S0. Besides, after all shells have been added using the Add function, one of these shells should constitute the outside skin of the solid. It may be closed (a finite solid) or open (an infinite solid). Other shells form hollows (cavities) in the previous ones. Each must bound a closed volume.
Parameters:
  • So (TopoDS_Solid &) –
  • S (TopoDS_Shell &) –
Return type:

None

Add()
  • Adds the shell to the current solid. Warning No check is done to verify the conditions of coherence of the resulting solid. In particular, S must not intersect other shells of the solid under construction. Besides, after all shells have been added, one of these shells should constitute the outside skin of the solid. It may be closed (a finite solid) or open (an infinite solid). Other shells form hollows (cavities) in these previous ones. Each must bound a closed volume.
Parameters:S (TopoDS_Shell &) –
Return type:None
Solid()
  • Returns the new Solid.
Return type:TopoDS_Solid
thisown

The membership flag

class BRepBuilderAPI_MakeVertex(*args)

Bases: OCC.BRepBuilderAPI.BRepBuilderAPI_MakeShape

  • Constructs a vertex from point P. Example create a vertex from a 3D point. gp_Pnt P(0,0,10); TopoDS_Vertex V = BRepBuilderAPI_MakeVertex(P);
Parameters:P (gp_Pnt) –
Return type:None
Vertex()
  • Returns the constructed vertex.
Return type:TopoDS_Vertex
thisown

The membership flag

class BRepBuilderAPI_MakeWire(*args)

Bases: OCC.BRepBuilderAPI.BRepBuilderAPI_MakeShape

  • Constructs an empty wire framework, to which edges are added using the Add function. As soon as the wire contains one edge, it can return with the use of the function Wire. Warning The function Error will return BRepBuilderAPI_EmptyWire if it is called before at least one edge is added to the wire under construction.
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. Constructs a wire - from the TopoDS_Wire W composed of the edge E, or - from edge E, or - from two edges E1 and E2, or - from three edges E1, E2 and E3, or - from four edges E1, E2, E3 and E4. Further edges can be added using the function Add. Given edges are added in a sequence. Each of them must be connectable to the wire under construction, and so must satisfy the following condition (unless it is the first edge of the wire): one of its vertices must be geometrically coincident with one of the vertices of the wire (provided that the highest tolerance factor is assigned to the two vertices). It could also be the same vertex. Warning If an edge is not connectable to the wire under construction it is not added. The function Error will return BRepBuilderAPI_DisconnectedWire, the function IsDone will return false and the function Wire will raise an error, until a new connectable edge is added.
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()
  • Adds the edge E to the wire under construction. E must be connectable to the wire under construction, and, unless it is the first edge of the wire, must satisfy the following condition: one of its vertices must be geometrically coincident with one of the vertices of the wire (provided that the highest tolerance factor is assigned to the two vertices). It could also be the same vertex. Warning If E is not connectable to the wire under construction it is not added. The function Error will return BRepBuilderAPI_DisconnectedWire, the function IsDone will return false and the function Wire will raise an error, until a new connectable edge is added.
Parameters:E (TopoDS_Edge &) –
Return type:None
  • Add the edges of <W> to the current wire.
Parameters:W (TopoDS_Wire &) –
Return type:None
  • Adds 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. If some of them are not connected the Status give DisconnectedWire but the ‘Maker’ is Done() and you can get the partial result. (ie connected to the first edgeof the list <L>)
Parameters:L (TopTools_ListOfShape &) –
Return type:None
Edge()
  • Returns the last edge added to the wire under construction. Warning - This edge can be different from the original one (the argument of the function Add, for instance,) - A null edge is returned if there are no edges in the wire under construction, or if the last edge which you tried to add was not connectable..
Return type:TopoDS_Edge
Error()
  • Returns the construction status - BRepBuilderAPI_WireDone if the wire is built, or - another value of the BRepBuilderAPI_WireError enumeration indicating why the construction failed.
Return type:BRepBuilderAPI_WireError
Vertex()
  • Returns the last vertex of the last edge added to the wire under construction. Warning A null vertex is returned if there are no edges in the wire under construction, or if the last edge which you tried to add was not connectableR
Return type:TopoDS_Vertex
Wire()
  • Returns the constructed wire; or the part of the wire under construction already built. Exceptions StdFail_NotDone if a wire is not built.
Return type:TopoDS_Wire
thisown

The membership flag

class BRepBuilderAPI_ModifyShape(*args, **kwargs)

Bases: OCC.BRepBuilderAPI.BRepBuilderAPI_MakeShape

ModifiedShape()
  • Returns the modified shape corresponding to <S>. S can correspond to the entire initial shape or to its subshape. Exceptions Standard_NoSuchObject if S is not the initial shape or a subshape of the initial shape to which the transformation has been applied. Raises NoSuchObject from Standard if S is not the initial shape or a sub-shape of the initial shape.
Parameters:S (TopoDS_Shape &) –
Return type:TopoDS_Shape
thisown

The membership flag

class BRepBuilderAPI_NurbsConvert(*args)

Bases: OCC.BRepBuilderAPI.BRepBuilderAPI_ModifyShape

  • Constructs a framework for converting the geometry of a shape into NURBS geometry. Use the function Perform to define the shape to convert.
Return type:None
  • Builds a new shape by converting the geometry of the shape S into NURBS geometry. Specifically, all curves supporting edges of S are converted into BSpline curves, and all surfaces supporting its faces are converted into BSpline surfaces. Use the function Shape to access the new shape. Note: the constructed framework can be reused to convert other shapes. You specify these with the function Perform.
Parameters:
  • S (TopoDS_Shape &) –
  • Copy (bool) – default value is Standard_False
Return type:

None

Perform()
  • Builds a new shape by converting the geometry of the shape S into NURBS geometry. Specifically, all curves supporting edges of S are converted into BSpline curves, and all surfaces supporting its faces are converted into BSpline surfaces. Use the function Shape to access the new shape. Note: this framework can be reused to convert other shapes: you specify them by calling the function Perform again.
Parameters:
  • S (TopoDS_Shape &) –
  • Copy (bool) – default value is Standard_False
Return type:

None

thisown

The membership flag

class BRepBuilderAPI_Sewing(*args)

Bases: OCC.MMgt.MMgt_TShared

  • Creates an object with tolerance of connexity option for sewing (if false only control) option for analysis of degenerated shapes option for cutting of free edges. option for non manifold processing
Parameters:
  • tolerance (float) – default value is 1.0e-06
  • option1 (bool) – default value is Standard_True
  • option2 (bool) – default value is Standard_True
  • option3 (bool) – default value is Standard_True
  • option4 (bool) – default value is Standard_False
Return type:

None

Add()
  • Defines the shapes to be sewed or controlled
Parameters:shape (TopoDS_Shape &) –
Return type:None
ContigousEdge()
  • Gives each contigous edge
Parameters:index (int) –
Return type:TopoDS_Edge
ContigousEdgeCouple()
  • Gives the sections (edge) belonging to a contigous edge
Parameters:index (int) –
Return type:TopTools_ListOfShape
DegeneratedShape()
  • Gives each degenerated shape
Parameters:index (int) –
Return type:TopoDS_Shape
DeletedFace()
  • Gives each deleted face
Parameters:index (int) –
Return type:TopoDS_Face
Dump()
  • print the informations
Return type:None
FaceMode()
  • Returns mode for sewing faces By default - true.
Return type:bool
FloatingEdgesMode()
  • Returns mode for sewing floating edges By default - false.
Return type:bool
FreeEdge()
  • Gives each free edge
Parameters:index (int) –
Return type:TopoDS_Edge
GetContext()
  • return context
Return type:Handle_BRepTools_ReShape
GetHandle()
Init()
  • initialize the parameters if necessary
Parameters:
  • tolerance (float) – default value is 1.0e-06
  • option1 (bool) – default value is Standard_True
  • option2 (bool) – default value is Standard_True
  • option3 (bool) – default value is Standard_True
  • option4 (bool) – default value is Standard_False
Return type:

None

IsDegenerated()
  • Indicates if a input shape is degenerated
Parameters:shape (TopoDS_Shape &) –
Return type:bool
IsModified()
  • Indicates if a input shape has been modified
Parameters:shape (TopoDS_Shape &) –
Return type:bool
IsModifiedSubShape()
  • Indicates if a input subshape has been modified
Parameters:shape (TopoDS_Shape &) –
Return type:bool
IsSectionBound()
  • Indicates if a section is bound (before use SectionToBoundary)
Parameters:section (TopoDS_Edge &) –
Return type:bool
Load()
  • Loades the context shape.
Parameters:shape (TopoDS_Shape &) –
Return type:None
LocalTolerancesMode()
  • Returns mode for accounting of local tolerances of edges and vertices during of merging.
Return type:bool
MaxTolerance()
  • Gives set max tolerance
Return type:float
MinTolerance()
  • Gives set min tolerance.
Return type:float
Modified()
  • Gives a modifieded shape
Parameters:shape (TopoDS_Shape &) –
Return type:TopoDS_Shape
ModifiedSubShape()
  • Gives a modifieded subshape
Parameters:shape (TopoDS_Shape &) –
Return type:TopoDS_Shape
MultipleEdge()
  • Gives each multiple edge
Parameters:index (int) –
Return type:TopoDS_Edge
NbContigousEdges()
  • Gives the number of contigous edges (edge shared by two faces)
Return type:int
NbDegeneratedShapes()
  • Gives the number of degenerated shapes
Return type:int
NbDeletedFaces()
  • Gives the number of deleted faces (faces smallest than tolerance)
Return type:int
NbFreeEdges()
  • Gives the number of free edges (edge shared by one face)
Return type:int
NbMultipleEdges()
  • Gives the number of multiple edges (edge shared by more than two faces)
Return type:int
NonManifoldMode()
  • Gets mode for non-manifold sewing. //! INTERNAL FUCTIONS —
Return type:bool
Perform()
  • Computing thePI - progress indicator of algorithm
Parameters:thePI (Handle_Message_ProgressIndicator &) – default value is 0
Return type:None
SameParameterMode()
  • Gets same parameter mode.
Return type:bool
SectionToBoundary()
  • Gives the original edge (free boundary) which becomes the the section. Remember that sections constitute common edges. This imformation is important for control because with original edge we can find the surface to which the section is attached.
Parameters:section (TopoDS_Edge &) –
Return type:TopoDS_Edge
SetContext()
  • set context
Parameters:theContext (Handle_BRepTools_ReShape &) –
Return type:None
SetFaceMode()
  • Sets mode for sewing faces By default - true.
Parameters:theFaceMode (bool) –
Return type:None
SetFloatingEdgesMode()
  • Sets mode for sewing floating edges By default - false. Returns mode for cutting floating edges By default - false. Sets mode for cutting floating edges By default - false.
Parameters:theFloatingEdgesMode (bool) –
Return type:None
SetLocalTolerancesMode()
  • Sets mode for accounting of local tolerances of edges and vertices during of merging in this case WorkTolerance = myTolerance + tolEdge1+ tolEdg2;
Parameters:theLocalTolerancesMode (bool) –
Return type:None
SetMaxTolerance()
  • Sets max tolerance.
Parameters:theMaxToler (float) –
Return type:None
SetMinTolerance()
  • Sets min tolerance
Parameters:theMinToler (float) –
Return type:None
SetNonManifoldMode()
  • Sets mode for non-manifold sewing.
Parameters:theNonManifoldMode (bool) –
Return type:None
SetSameParameterMode()
  • Sets same parameter mode.
Parameters:SameParameterMode (bool) –
Return type:None
SetTolerance()
  • Sets tolerance
Parameters:theToler (float) –
Return type:None
SewedShape()
  • Gives the sewed shape a null shape if nothing constructed may be a face, a shell, a solid or a compound
Return type:TopoDS_Shape
Tolerance()
  • Gives set tolerance.
Return type:float
WhichFace()
  • Gives a modified shape
Parameters:
  • theEdg (TopoDS_Edge &) –
  • index (int) – default value is 1
Return type:

TopoDS_Face

thisown

The membership flag

class BRepBuilderAPI_Transform(*args)

Bases: OCC.BRepBuilderAPI.BRepBuilderAPI_ModifyShape

  • Constructs a framework for applying the geometric transformation T to a shape. Use the function Perform to define the shape to transform.
Parameters:T (gp_Trsf) –
Return type:None
  • Creates a transformation from the gp_Trsf <T>, and applies it to the shape <S>. If the transformation is direct and isometric (determinant = 1) and <Copy> = Standard_False, the resulting shape is <S> on which a new location has been set. Otherwise, the transformation is applied on a duplication of <S>.
Parameters:
  • S (TopoDS_Shape &) –
  • T (gp_Trsf) –
  • Copy (bool) – default value is Standard_False
Return type:

None

Perform()
  • pplies the geometric transformation defined at the time of construction of this framework to the shape S. - If the transformation T is direct and isometric, in other words, if the determinant of the vectorial part of T is equal to 1., and if Copy equals false (the default value), the resulting shape is the same as the original but with a new location assigned to it. - In all other cases, the transformation is applied to a duplicate of S. Use the function Shape to access the result. Note: this framework can be reused to apply the same geometric transformation to other shapes. You only need to specify them by calling the function Perform again.
Parameters:
  • S (TopoDS_Shape &) –
  • Copy (bool) – default value is Standard_False
Return type:

None

thisown

The membership flag

class BRepBuilderAPI_VertexInspector(*args)

Bases: object

  • Constructor; remembers the tolerance
Parameters:theTol (float) –
Return type:None
Add()
  • Keep the points used for comparison
Parameters:thePnt (gp_XYZ) –
Return type:None
ClearResList()
  • Clear the list of adjacent points
Return type:None
Inspect()
  • Implementation of inspection method
Parameters:theTarget (int) –
Return type:NCollection_CellFilter_Action
ResInd()
  • Get list of indexes of points adjacent with the current
Return type:TColStd_ListOfInteger
SetCurrent()
  • Set current point to search for coincidence
Parameters:theCurPnt (gp_XYZ) –
Return type:None
thisown

The membership flag

class Handle_BRepBuilderAPI_FastSewing(*args)

Bases: OCC.Standard.Handle_Standard_Transient

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class Handle_BRepBuilderAPI_Sewing(*args)

Bases: OCC.MMgt.Handle_MMgt_TShared

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class SwigPyIterator(*args, **kwargs)

Bases: object

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

The membership flag

value()
class brepbuilderapi

Bases: object

Plane()
  • Sets the current plane.
Parameters:P (Handle_Geom_Plane &) –
Return type:void
  • Returns the current plane.
Return type:Handle_Geom_Plane
static Precision()
  • Sets the default precision. The current Precision is returned.
Parameters:P (float) –
Return type:void
  • Returns the default precision.
Return type:float
thisown

The membership flag

brepbuilderapi_Precision()
  • Sets the default precision. The current Precision is returned.
Parameters:P (float) –
Return type:void
  • Returns the default precision.
Return type:float
new_instancemethod(func, inst, cls)
register_handle(handle, base_object)

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