OpenCascade.js
API ReferenceModelingAlgorithmsTKTopAlgo

BRepBuilderAPI

OCCT package BRepBuilderAPI: BRepBuilderAPI, BRepBuilderAPI_BndBoxTreeSelector, BRepBuilderAPI_Collect, BRepBuilderAPI_Command, and 26 more bound classes.

BRepBuilderAPI

The BRepBuilderAPI package provides an Application Programming Interface for the BRep topology data structure.
The API is a set of classes aiming to provide:

  • High level and simple calls for the most common operations.
  • Keeping an access on the low-level implementation of high-level calls.
  • Examples of programming of high-level operations from 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 the different constructions methods.
  • The class keeps as fields the different tools used to build the object.
  • The class provides a casting method to get automatically the result with a function-like call.
    For example to make a vertex <V> from a point
    one can write:
    V = BRepBuilderAPI_MakeVertex(P);
    or
    BRepBuilderAPI_MakeVertex MV(P); V = MV.Vertex();
    For tolerances a default precision is used which can be changed by the packahe method BRepBuilderAPI::Precision.
    For error handling the BRepBuilderAPI commands raise only the NotDone error. When Done is false on a command the error description can be asked to the command.
    In theory the commands can be called with any arguments, argument checking is performed by the command.

Constructors(1)

Static methods(4)

BRepBuilderAPI_BndBoxTreeSelector

Class BRepBuilderAPI_BndBoxTreeSelector derived from UBTree::Selector This class is used to select overlapping boxes, stored in NCollection::UBTree; contains methods to maintain the selection condition and to retrieve selected objects after search.

Constructors(1)

Instance methods(5)

  • Reject(argNo0: Bnd_Box): boolean

    Implementation of rejection method.

    Parameters (1)
    • argNo0
    Returns

    True if the bounding box does not intersect with the current

  • Accept(argNo0: number): boolean

    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.

    Parameters (1)
    • argNo0
    Returns

    True, because the object is accepted

  • ClearResList(): void

    Clear the list of intersecting boxes.

  • SetCurrent(theBox: Bnd_Box): void

    Set current box to search for overlapping with him.

    Parameters (1)
    • theBox
  • Get list of indexes of boxes intersecting with the current box.

BRepBuilderAPI_Collect

Constructors(1)

Instance methods(6)

BRepBuilderAPI_Command

Root class for all commands in BRepBuilderAPI.
Provides :

  • Managements of the notDone flag.
  • Catching of exceptions (not implemented).
  • Logging (not implemented).

Instance methods(2)

  • IsDone(): boolean
  • Check(): void

    Raises NotDone if done is false.

BRepBuilderAPI_Copy

Duplication of a shape. A Copy object provides a framework for:

  • defining the construction of a duplicate shape,
  • implementing the construction algorithm, and
  • consulting the result.

Constructors(2)

  • Constructs an empty copy framework. Use the function Perform to copy shapes.

  • constructor(S: TopoDS_Shape, copyGeom?: boolean, copyMesh?: boolean): BRepBuilderAPI_Copy

    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 (3)
    • S
    • copyGeom
    • copyMesh

Instance methods(1)

  • Perform(S: TopoDS_Shape, copyGeom?: boolean, copyMesh?: boolean): void

    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 (3)
    • S
    • copyGeom
    • copyMesh

BRepBuilderAPI_EdgeError

Properties(7)

BRepBuilderAPI_FastSewing

Created on: 2015-04-24 Created by: NIKOLAI BUKHALOV Copyright (c) 2015 OPEN CASCADE SAS.
This file is part of Open CASCADE Technology software library.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation, with special exception defined in the file OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT distribution for complete text of the license and disclaimer of any warranty.
Alternatively, this file may be used under the terms of Open CASCADE commercial license or contractual agreement. This class performs fast sewing of surfaces (faces). It supposes that all surfaces are finite and are naturally restricted by their bounds. Moreover, it supposes that stitched together surfaces have the same parameterization along common boundaries, therefore it does not perform time-consuming check for SameParameter property of edges.
For sewing, use this function as following:

  • set tolerance value (default tolerance is 1.E-06)
  • add all necessary surfaces (faces)
  • check status if adding is correctly completed.
  • compute -> Perform
  • retrieve the error status if any
  • retrieve the resulted shape

Constructors(1)

Static methods(2)

Instance methods(7)

BRepBuilderAPI_FindPlane

Describes functions to find the plane in which the edges of a given shape are located. A FindPlane object provides a framework for:

  • extracting the edges of a given shape,
  • implementing the construction algorithm, and
  • consulting the result.

Constructors(2)

  • Initializes an empty algorithm. The function Init is then used to define the shape.

  • 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 (2)
    • S
    • Tol

Instance methods(3)

  • Init(S: TopoDS_Shape, Tol?: number): void

    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 (2)
    • S
    • Tol
  • Found(): boolean

    Returns true if a plane containing the edges of the shape is found and built. Use the function Plane to consult the result.

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

BRepBuilderAPI_GTransform

Geometric transformation on a shape. The transformation to be applied is defined as a gp_GTrsf transformation. It may be:

  • a transformation equivalent to a gp_Trsf transformation, the most common case: you should , however, use a BRepAPI_Transform object to perform this kind of transformation; or
  • an affinity, or
  • more generally, any type of point transformation which may be defined by a three row, four column matrix of transformation. In the last two cases, the underlying geometry of the following shapes may change:
  • a curve which supports an edge of the shape, or
  • a surface which supports a face of the shape; For example, a circle may be transformed into an ellipse when applying an affinity transformation. The transformation is applied to:
  • all the curves which support edges of the shape, and
  • all the surfaces which support faces of the shape. A GTransform object provides a framework for:
  • defining the geometric transformation to be applied,
  • implementing the transformation algorithm, and
  • consulting the result.

Constructors(2)

  • Constructs a framework for applying the geometric transformation T to a shape. Use the function Perform to define the shape to transform.

    Parameters (1)
    • T
  • 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 (3)
    • S
    • T
    • Copy

Instance methods(3)

  • Perform(S: TopoDS_Shape, Copy?: boolean): void

    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 (2)
    • S
    • Copy
  • Returns the list of shapes modified from the shape .

    Parameters (1)
    • S
  • Returns the modified shape corresponding to .

    Parameters (1)
    • S

BRepBuilderAPI_MakeEdge

Provides methods to build edges.
The methods have the following syntax, where TheCurve is one of Lin, Circ, ...
Create(C : TheCurve)
Makes an edge on the whole curve. Add vertices on finite curves.
Create(C : TheCurve; p1,p2 : Real)
Make an edge on the curve between parameters p1 and p2. if p2 < p1 the edge will be REVERSED. If p1 or p2 is infinite the curve will be open in that direction. Vertices are created for finite values of p1 and p2.
Create(C : TheCurve; P1, P2 : Pnt from gp)
Make an edge on the curve between the points P1 and P2. The points are projected on the curve and the previous method is used. An error is raised if the points are not on the curve.
Create(C : TheCurve; V1, V2 : Vertex from TopoDS)
Make an edge on the curve between the vertices V1 and V2. Same as the previous but no vertices are created. If a vertex is Null the curve will be open in this direction.

Constructors(35)

Instance methods(17)

BRepBuilderAPI_MakeEdge2d

Provides methods to build edges.
The methods have the following syntax, where TheCurve is one of Lin2d, Circ2d, ...
Create(C : TheCurve)
Makes an edge on the whole curve. Add vertices on finite curves.
Create(C : TheCurve; p1,p2 : Real)
Make an edge on the curve between parameters p1 and p2. if p2 < p1 the edge will be REVERSED. If p1 or p2 is infinite the curve will be open in that direction. Vertices are created for finite values of p1 and p2.
Create(C : TheCurve; P1, P2 : Pnt2d from gp)
Make an edge on the curve between the points P1 and P2. The points are projected on the curve and the previous method is used. An error is raised if the points are not on the curve.
Create(C : TheCurve; V1, V2 : Vertex from TopoDS)
Make an edge on the curve between the vertices V1 and V2. Same as the previous but no vertices are created. If a vertex is Null the curve will be open in this direction.

Constructors(28)

Instance methods(11)

BRepBuilderAPI_MakeFace

Provides methods to build faces.
A face may be built:

  • From a surface.
  • Elementary surface from gp.
  • Surface from Geom.
  • From a surface and U,V values.
  • From a wire.
  • Find the surface automatically if possible.
  • From a surface and a wire.
  • A flag Inside is given, when this flag is True the wire is oriented to bound a finite area on the surface.
  • From a face and a wire.
  • The new wire is a perforation.

Constructors(22)

  • Not done.

  • Load a face. useful to add wires.

    Parameters (1)
    • F
  • Make a face from a plane.

    Parameters (1)
    • P
  • Make a face from a cylinder.

    Parameters (1)
    • C
  • Make a face from a cone.

    Parameters (1)
    • C
  • Make a face from a sphere.

    Parameters (1)
    • S
  • Make a face from a torus.

    Parameters (1)
    • C
  • Make a face from a Surface. Accepts tolerance value (TolDegen) for resolution of degenerated edges.

    Parameters (2)
    • S
    • TolDegen
  • 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 (2)
    • W
    • OnlyPlane
  • 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 (2)
    • F
    • W
  • Make a face from a plane and a wire.

    Parameters (3)
    • P
    • W
    • Inside
  • Make a face from a cylinder and a wire.

    Parameters (3)
    • C
    • W
    • Inside
  • Make a face from a cone and a wire.

    Parameters (3)
    • C
    • W
    • Inside
  • Make a face from a sphere and a wire.

    Parameters (3)
    • S
    • W
    • Inside
  • Make a face from a torus and a wire.

    Parameters (3)
    • C
    • W
    • Inside
  • Make a face from a Surface and a wire. If the surface S is not plane, it must contain pcurves for all edges in W, otherwise the wrong shape will be created.

    Parameters (3)
    • S
    • W
    • Inside
  • constructor(P: gp_Pln, UMin: number, UMax: number, VMin: number, VMax: number): BRepBuilderAPI_MakeFace

    Make a face from a plane.

    Parameters (5)
    • P
    • UMin
    • UMax
    • VMin
    • VMax
  • constructor(C: gp_Cylinder, UMin: number, UMax: number, VMin: number, VMax: number): BRepBuilderAPI_MakeFace

    Make a face from a cylinder.

    Parameters (5)
    • C
    • UMin
    • UMax
    • VMin
    • VMax
  • constructor(C: gp_Cone, UMin: number, UMax: number, VMin: number, VMax: number): BRepBuilderAPI_MakeFace

    Make a face from a cone.

    Parameters (5)
    • C
    • UMin
    • UMax
    • VMin
    • VMax
  • constructor(S: gp_Sphere, UMin: number, UMax: number, VMin: number, VMax: number): BRepBuilderAPI_MakeFace

    Make a face from a sphere.

    Parameters (5)
    • S
    • UMin
    • UMax
    • VMin
    • VMax
  • constructor(C: gp_Torus, UMin: number, UMax: number, VMin: number, VMax: number): BRepBuilderAPI_MakeFace

    Make a face from a torus.

    Parameters (5)
    • C
    • UMin
    • UMax
    • VMin
    • VMax
  • constructor(S: Geom_Surface, UMin: number, UMax: number, VMin: number, VMax: number, TolDegen: number): BRepBuilderAPI_MakeFace

    Make a face from a Surface. Accepts tolerance value (TolDegen) for resolution of degenerated edges.

    Parameters (6)
    • S
    • UMin
    • UMax
    • VMin
    • VMax
    • TolDegen

Instance methods(7)

  • Init(F: TopoDS_Face): void

    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 (1)
    • F
  • Init(S: Geom_Surface, Bound: boolean, TolDegen: number): void

    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 (3)
    • S
    • Bound
    • TolDegen
  • Init(S: Geom_Surface, UMin: number, UMax: number, VMin: number, VMax: number, TolDegen: number): void

    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 (6)
    • S
    • UMin
    • UMax
    • VMin
    • VMax
    • TolDegen
  • Add(W: TopoDS_Wire): void

    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 (1)
    • W
  • IsDone(): boolean

    Returns true if this algorithm has a valid face.

  • 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.
  • Returns the constructed face. Exceptions StdFail_NotDone if no face is built.

BRepBuilderAPI_MakePolygon

Describes functions to build polygonal wires. A polygonal wire can be built from any number of points or vertices, and consists of a sequence of connected rectilinear edges. When a point or vertex is added to the polygon if it is identic to the previous point no edge is built. The method added can be used to test it. Construction of a Polygonal Wire You can construct:

  • a complete polygonal wire by defining all its points or vertices (limited to four), or
  • an empty polygonal wire and add its points or vertices in sequence (unlimited number). A MakePolygon object provides a framework for:
  • initializing the construction of a polygonal wire,
  • adding points or vertices to the polygonal wire under construction, and
  • consulting the result.

Constructors(7)

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

  • Parameters (2)
    • P1
    • P2
  • Parameters (2)
    • V1
    • V2
  • constructor(P1: gp_Pnt, P2: gp_Pnt, P3: gp_Pnt, Close?: boolean): BRepBuilderAPI_MakePolygon
    Parameters (4)
    • P1
    • P2
    • P3
    • Close
  • Parameters (4)
    • V1
    • V2
    • V3
    • Close
  • constructor(P1: gp_Pnt, P2: gp_Pnt, P3: gp_Pnt, P4: gp_Pnt, Close?: boolean): BRepBuilderAPI_MakePolygon

    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 (5)
    • P1
    • P2
    • P3
    • P4
    • Close
  • 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,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 (5)
    • V1
    • V2
    • V3
    • V4
    • Close

Instance methods(9)

  • Add(P: gp_Pnt): void
    Parameters (1)
    • P
  • Add(V: TopoDS_Vertex): void

    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 (1)
    • V
  • Added(): boolean

    Returns true if the last vertex added to the constructed polygonal wire is not coincident with the previous one.

  • Close(): void

    Closes the polygonal wire under construction. Note - this is equivalent to adding the first vertex to the polygonal wire under construction.

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

  • IsDone(): boolean

    Returns true if this algorithm contains a valid polygonal wire (i.e. if there is at least one edge). IsDone returns false if fewer than two vertices have been chained together by this construction algorithm.

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

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

BRepBuilderAPI_MakeShape

This is the root class for all shape constructions. It stores the result.
It provides deferred methods to trace the history of sub-shapes.

Instance methods(5)

BRepBuilderAPI_MakeShapeOnMesh

Builds shape on per-facet basis on the input mesh. Resulting shape has shared edges by construction, but no maximization (unify same domain) is applied. No generation history is provided.

Constructors(1)

Instance methods(1)

BRepBuilderAPI_MakeShell

Describes functions to build a shape corresponding to the skin of a surface. Note that the term shell in the class name has the same definition as that of a shell in STEP, in other words the skin of a shape, and not a solid model defined by surface and thickness. If you want to build the second sort of shell, you must use BRepOffsetAPI_MakeOffsetShape. A shell is made of a series of faces connected by their common edges.
If the underlying surface of a face is not C2 continuous and the flag Segment is True, MakeShell breaks the surface down into several faces which are all C2 continuous and which are connected along the non-regular curves on the surface. The resulting shell contains all these faces. Construction of a Shell from a non-C2 continuous Surface A MakeShell object provides a framework for:

  • defining the construction of a shell,
  • implementing the construction algorithm, and
  • consulting the result. Warning The connected C2 faces in the shell resulting from a decomposition of the surface are not sewn. For a sewn result, you need to use BRepOffsetAPI_Sewing. For a shell with thickness, you need to use BRepOffsetAPI_MakeOffsetShape.

Constructors(3)

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

  • Constructs a shell from the surface S.

    Parameters (2)
    • S
    • Segment
  • constructor(S: Geom_Surface, UMin: number, UMax: number, VMin: number, VMax: number, Segment?: boolean): BRepBuilderAPI_MakeShell

    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 (6)
    • S
    • UMin
    • UMax
    • VMin
    • VMax
    • Segment

Instance methods(4)

  • Init(S: Geom_Surface, UMin: number, UMax: number, VMin: number, VMax: number, Segment?: boolean): void

    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 (6)
    • S
    • UMin
    • UMax
    • VMin
    • VMax
    • Segment
  • IsDone(): boolean

    Returns true if the shell is built.

  • 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.
  • Returns the new Shell.

BRepBuilderAPI_MakeSolid

Describes functions to build a solid from shells. A solid is made of one shell, or a series of shells, which do not intersect each other. One of these shells constitutes 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. A MakeSolid object provides a framework for:

  • defining and implementing the construction of a solid, and
  • consulting the result.

Constructors(7)

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

  • Make a solid from a CompSolid.

    Parameters (1)
    • S
  • Make a solid from a shell.

    Parameters (1)
    • S
  • Make a solid from a solid. useful for adding later.

    Parameters (1)
    • So
  • Make a solid from two shells.

    Parameters (2)
    • S1
    • S2
  • 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 (2)
    • So
    • S
  • 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 (3)
    • S1
    • S2
    • S3

Instance methods(4)

  • Add(S: TopoDS_Shell): void

    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 (1)
    • S
  • IsDone(): boolean

    Returns true if the solid is built. For this class, a solid under construction is always valid. If no shell has been added, it could be a whole-space solid. However, no check was done to verify the conditions of coherence of the resulting solid.

  • Returns the new Solid.

  • IsDeleted(S: TopoDS_Shape): boolean

    Returns true if the shape S has been deleted.

    Parameters (1)
    • S

BRepBuilderAPI_MakeVertex

Describes functions to build BRepBuilder vertices directly from 3D geometric points. A vertex built using a MakeVertex object is only composed of a 3D point and a default precision value (Precision::Confusion()). Later on, 2D representations can be added, for example, when inserting a vertex in an edge. A MakeVertex object provides a framework for:

  • defining and implementing the construction of a vertex, and
  • consulting the result.

Constructors(1)

Instance methods(1)

BRepBuilderAPI_MakeWire

Describes functions to build wires from edges. A wire can be built from any number of edges. To build a wire you first initialize the construction, then add edges in sequence. An unlimited number of edges can be added. The initialization of construction is done with:

  • no edge (an empty wire), or
  • edges of an existing wire, or
  • up to four connectable edges. In order to be added to a wire under construction, an edge (unless it is the first one) 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.
  • The given edge is shared by the wire if it contains:
  • two vertices, identical to two vertices of the wire under construction (a general case of the wire closure), or
  • one vertex, identical to a vertex of the wire under construction; the other vertex not being geometrically coincident with another vertex of the wire.
  • In other cases, when one of the vertices of the edge is simply geometrically coincident with a vertex of the wire under construction (provided that the highest tolerance factor is assigned to the two vertices), the given edge is first copied and the coincident vertex is replaced in this new edge, by the coincident vertex of the wire. Note: it is possible to build non manifold wires using this construction tool. A MakeWire object provides a framework for:
  • initializing the construction of a wire,
  • adding edges to the wire under construction, and
  • consulting the result.

Constructors(7)

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

  • Make a Wire from an edge.

    Parameters (1)
    • E
  • Make a Wire from a Wire. useful for adding later.

    Parameters (1)
    • W
  • Make a Wire from two edges.

    Parameters (2)
    • E1
    • E2
  • Add an edge to a wire.

    Parameters (2)
    • W
    • E
  • Make a Wire from three edges.

    Parameters (3)
    • E1
    • E2
    • E3
  • 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 (4)
    • E1
    • E2
    • E3
    • E4

Instance methods(8)

  • Add(E: TopoDS_Edge): void

    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 (1)
    • E
  • Add(W: TopoDS_Wire): void

    Add the edges of <W> to the current wire.

    Parameters (1)
    • W
  • 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. (i.e. connected to the first edgeof the list <L>).

    Parameters (1)
    • L
  • IsDone(): boolean

    Returns true if this algorithm contains a valid wire. IsDone returns false if:

    • there are no edges in the wire, or
    • the last edge which you tried to add was not connectable.
  • Returns the construction status.

    • BRepBuilderAPI_WireDone if the wire is built, or
    • another value of the BRepBuilderAPI_WireError enumeration indicating why the construction failed.
  • Returns the constructed wire; or the part of the wire under construction already built. Exceptions StdFail_NotDone if a wire is not built.

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

BRepBuilderAPI_ModifyShape

Implements the methods of MakeShape for the constant topology modifications. The methods are implemented when the modification uses a Modifier from BRepTools. Some of them have to be redefined if the modification is implemented with another tool (see Transform from BRepBuilderAPI for example). The BRepBuilderAPI package provides the following frameworks to perform modifications of this sort:

Instance methods(2)

  • Returns the list of shapes modified from the shape .

    Parameters (1)
    • S
  • Returns the modified shape corresponding to . 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 (1)
    • S

BRepBuilderAPI_NurbsConvert

Conversion of the complete geometry of a shape (all 3D analytical representation of surfaces and curves) into NURBS geometry (except for Planes). For example, all curves supporting edges of the basis shape are converted into BSpline curves, and all surfaces supporting its faces are converted into BSpline surfaces.

Constructors(2)

  • Constructs a framework for converting the geometry of a shape into NURBS geometry. Use the function Perform to define the shape to convert.

  • 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 (2)
    • S
    • Copy

Instance methods(3)

  • Perform(S: TopoDS_Shape, Copy?: boolean): void

    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 (2)
    • S
    • Copy
  • Returns the list of shapes modified from the shape .

    Parameters (1)
    • S
  • Returns the modified shape corresponding to . 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.

    Parameters (1)
    • S

BRepBuilderAPI_Sewing

Provides methods to.

  • identify possible contiguous boundaries (for control afterwards (of continuity: C0, C1, ...))
  • assemble contiguous shapes into one shape. Only manifold shapes will be found. Sewing will not be done in case of multiple edges.
    For sewing, use this function as following:
  • create an empty object
  • default tolerance 1.E-06
  • with face analysis on
  • with sewing operation on
  • set the cutting option as you need (default True)
  • define a tolerance
  • add shapes to be sewed -> Add
  • compute -> Perform
  • output the resulted shapes
  • output free edges if necessary
  • output multiple edges if necessary
  • output the problems if any

Constructors(1)

  • constructor(tolerance?: number, option1?: boolean, option2?: boolean, option3?: boolean, option4?: boolean): BRepBuilderAPI_Sewing

    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 (5)
    • tolerance
    • option1
    • option2
    • option3
    • option4

Static methods(2)

Instance methods(44)

  • Init(tolerance?: number, option1?: boolean, option2?: boolean, option3?: boolean, option4?: boolean): void

    initialize the parameters if necessary

    Parameters (5)
    • tolerance
    • option1
    • option2
    • option3
    • option4
  • Load(shape: TopoDS_Shape): void

    Loads the context shape.

    Parameters (1)
    • shape
  • Add(shape: TopoDS_Shape): void

    Defines the shapes to be sewed or controlled.

    Parameters (1)
    • shape
  • Perform(theProgress?: Message_ProgressRange): void

    Computing theProgress - progress indicator of algorithm.

    Parameters (1)
    • theProgress
  • Gives the sewed shape a null shape if nothing constructed may be a face, a shell, a solid or a compound.

  • SetContext(theContext: BRepTools_ReShape): void

    set context

    Parameters (1)
    • theContext
  • return context

  • NbFreeEdges(): number

    Gives the number of free edges (edge shared by one face).

  • FreeEdge(index: number): TopoDS_Edge

    Gives each free edge.

    Parameters (1)
    • index
  • NbMultipleEdges(): number

    Gives the number of multiple edges (edge shared by more than two faces).

  • MultipleEdge(index: number): TopoDS_Edge

    Gives each multiple edge.

    Parameters (1)
    • index
  • Gives the number of contiguous edges (edge shared by two faces).

  • ContigousEdge(index: number): TopoDS_Edge

    Gives each contiguous edge.

    Parameters (1)
    • index
  • Gives the sections (edge) belonging to a contiguous edge.

    Parameters (1)
    • index
  • IsSectionBound(section: TopoDS_Edge): boolean

    Indicates if a section is bound (before use SectionToBoundary).

    Parameters (1)
    • section
  • Gives the original edge (free boundary) which becomes the the section. Remember that sections constitute common edges. This information is important for control because with original edge we can find the surface to which the section is attached.

    Parameters (1)
    • section
  • Gives the number of degenerated shapes.

  • Gives each degenerated shape.

    Parameters (1)
    • index
  • IsDegenerated(shape: TopoDS_Shape): boolean

    Indicates if a input shape is degenerated.

    Parameters (1)
    • shape
  • IsModified(shape: TopoDS_Shape): boolean

    Indicates if a input shape has been modified.

    Parameters (1)
    • shape
  • Gives a modifieded shape.

    Parameters (1)
    • shape
  • Indicates if a input subshape has been modified.

    Parameters (1)
    • shape
  • Gives a modifieded subshape.

    Parameters (1)
    • shape
  • Dump(): void

    print the information

  • NbDeletedFaces(): number

    Gives the number of deleted faces (faces smallest than tolerance).

  • DeletedFace(index: number): TopoDS_Face

    Gives each deleted face.

    Parameters (1)
    • index
  • WhichFace(theEdg: TopoDS_Edge, index?: number): TopoDS_Face

    Gives a modified shape.

    Parameters (2)
    • theEdg
    • index
  • Gets same parameter mode.

  • SetSameParameterMode(SameParameterMode: boolean): void

    Sets same parameter mode.

    Parameters (1)
    • SameParameterMode
  • Tolerance(): number

    Gives set tolerance.

  • SetTolerance(theToler: number): void

    Sets tolerance.

    Parameters (1)
    • theToler
  • MinTolerance(): number

    Gives set min tolerance.

  • SetMinTolerance(theMinToler: number): void

    Sets min tolerance.

    Parameters (1)
    • theMinToler
  • MaxTolerance(): number

    Gives set max tolerance.

  • SetMaxTolerance(theMaxToler: number): void

    Sets max tolerance.

    Parameters (1)
    • theMaxToler
  • FaceMode(): boolean

    Returns mode for sewing faces By default - true.

  • SetFaceMode(theFaceMode: boolean): void

    Sets mode for sewing faces By default - true.

    Parameters (1)
    • theFaceMode
  • Returns mode for sewing floating edges By default - false.

  • SetFloatingEdgesMode(theFloatingEdgesMode: boolean): void

    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 (1)
    • theFloatingEdgesMode
  • Returns mode for accounting of local tolerances of edges and vertices during of merging.

  • SetLocalTolerancesMode(theLocalTolerancesMode: boolean): void

    Sets mode for accounting of local tolerances of edges and vertices during of merging in this case WorkTolerance = myTolerance + tolEdge1+ tolEdg2;.

    Parameters (1)
    • theLocalTolerancesMode
  • SetNonManifoldMode(theNonManifoldMode: boolean): void

    Sets mode for non-manifold sewing.

    Parameters (1)
    • theNonManifoldMode
  • NonManifoldMode(): boolean

    Gets mode for non-manifold sewing.
    INTERNAL FUNCTIONS --

BRepBuilderAPI_Transform

Geometric transformation on a shape. The transformation to be applied is defined as a gp_Trsf transformation, i.e. a transformation which does not modify the underlying geometry of shapes. The transformation is applied to:

  • all curves which support edges of a shape, and
  • all surfaces which support its faces. A Transform object provides a framework for:
  • defining the geometric transformation to be applied,
  • implementing the transformation algorithm, and
  • consulting the results.

Constructors(2)

  • Constructs a framework for applying the geometric transformation T to a shape. Use the function Perform to define the shape to transform.

    Parameters (1)
    • T
  • constructor(theShape: TopoDS_Shape, theTrsf: gp_Trsf, theCopyGeom?: boolean, theCopyMesh?: boolean): BRepBuilderAPI_Transform

    Creates a transformation from the gp_Trsf <theTrsf>, and applies it to the shape <theShape>. If the transformation is direct and isometric (determinant = 1) and <theCopyGeom> = false, the resulting shape is <theShape> on which a new location has been set. Otherwise, the transformation is applied on a duplication of <theShape>. If <theCopyMesh> is true, the triangulation will be copied, and the copy will be assigned to the result shape.

    Parameters (4)
    • theShape
    • theTrsf
    • theCopyGeom
    • theCopyMesh

Instance methods(3)

  • Perform(theShape: TopoDS_Shape, theCopyGeom?: boolean, theCopyMesh?: boolean): void

    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, in other words, if the determinant of the vectorial part of T is equal to 1., and if theCopyGeom 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 theShape.
    • If theCopyMesh is true, the triangulation will be copied, and the copy will be assigned to the result shape. 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 (3)
    • theShape
    • theCopyGeom
    • theCopyMesh
  • Returns the modified shape corresponding to .

    Parameters (1)
    • S
  • Returns the list of shapes modified from the shape .

    Parameters (1)
    • S

BRepBuilderAPI_VertexInspector

Inspector for CellFilter algorithm working with gp_XYZ points in 3d space. Used in search of coincidence points with a certain tolerance.

Constructors(1)

Static methods(2)

Instance methods(5)