BRepPrimAPI
OCCT package BRepPrimAPI: BRepPrimAPI_MakeBox, BRepPrimAPI_MakeCone, BRepPrimAPI_MakeCylinder, BRepPrimAPI_MakeHalfSpace, and 8 more bound classes.
BRepPrimAPI_MakeBox
Describes functions to build parallelepiped boxes. A MakeBox object provides a framework for:
- defining the construction of a box,
- implementing the construction algorithm, and
- consulting the result. Constructs a box such that its sides are parallel to the axes of
- the global coordinate system, or
- the local coordinate system Axis. and
- with a corner at (0, 0, 0) and of size (dx, dy, dz), or
- with a corner at point P and of size (dx, dy, dz), or
- with corners at points P1 and P2. Exceptions Standard_DomainError if: dx, dy, dz are less than or equal to
Precision::Confusion(), or - the vector joining the points P1 and P2 has a component projected onto the global coordinate system less than or equal to
Precision::Confusion(). In these cases, the box would be flat.
Constructors(5)
Default constructor.
- constructor(P1: gp_Pnt, P2: gp_Pnt): BRepPrimAPI_MakeBox
Make a box with corners P1,P2.
Parameters (2)P1P2
- constructor(dx: number, dy: number, dz: number): BRepPrimAPI_MakeBox
Make a box with a corner at 0,0,0 and the other dx,dy,dz.
Parameters (3)dxdydz
- constructor(P: gp_Pnt, dx: number, dy: number, dz: number): BRepPrimAPI_MakeBox
Make a box with a corner at P and size dx, dy, dz.
Parameters (4)Pdxdydz
- constructor(Axes: gp_Ax2, dx: number, dy: number, dz: number): BRepPrimAPI_MakeBox
Make a box with Ax2 (the left corner and the axis) and size dx, dy, dz.
Parameters (4)Axesdxdydz
Instance methods(14)
Init a box with corners thePnt1, thePnt2.
Parameters (2)thePnt1thePnt2
- Init(theDX: number, theDY: number, theDZ: number): void
Init a box with a corner at 0,0,0 and the other theDX, theDY, theDZ.
Parameters (3)theDXtheDYtheDZ
Init a box with a corner at thePnt and size theDX, theDY, theDZ.
Parameters (4)thePnttheDXtheDYtheDZ
Init a box with Ax2 (the left corner and the theAxes) and size theDX, theDY, theDZ.
Parameters (4)theAxestheDXtheDYtheDZ
Returns the internal algorithm.
- Build(theRange?: Message_ProgressRange): void
Stores the solid in myShape.
Parameters (1)theRange
Returns the constructed box as a shell.
Returns the constructed box as a solid.
Returns ZMin face.
Returns XMin face.
Returns XMax face.
Returns YMin face.
Returns YMax face.
Returns ZMax face.
BRepPrimAPI_MakeCone
Describes functions to build cones or portions of cones. A MakeCone object provides a framework for:
- defining the construction of a cone,
- implementing the construction algorithm, and
- consulting the result.
Constructors(4)
- constructor(R1: number, R2: number, H: number): BRepPrimAPI_MakeCone
Make a cone.
Parameters (3)R1—cone bottom radius, may be null (z = 0)R2—cone top radius, may be null (z = H)H—cone height
- constructor(R1: number, R2: number, H: number, angle: number): BRepPrimAPI_MakeCone
Make a cone.
Parameters (4)R1—cone bottom radius, may be null (z = 0)R2—cone top radius, may be null (z = H)H—cone heightangle—angle to create a part cone
- constructor(Axes: gp_Ax2, R1: number, R2: number, H: number): BRepPrimAPI_MakeCone
Make a cone.
Parameters (4)AxesR1—cone bottom radius, may be null (z = 0)R2—cone top radius, may be null (z = H)H—cone height
- constructor(Axes: gp_Ax2, R1: number, R2: number, H: number, angle: number): BRepPrimAPI_MakeCone
Make a cone of height H radius R1 in the plane z = 0, R2 in the plane Z = H. R1 and R2 may be null. Take a section of <angle> Constructs a cone, or a portion of a cone, of height H, and radius R1 in the plane z = 0 and R2 in the plane z = H. The result is a sharp cone if R1 or R2 is equal to 0. The cone is constructed about the "Z Axis" of either:
- the global coordinate system, or
- the local coordinate system Axes. It is limited in these coordinate systems as follows:
- in the v parametric direction (the Z coordinate), by the two parameter values 0 and H,
- and in the u parametric direction (defined by the angle of rotation around the Z axis), in the case of a portion of a cone, by the two parameter values 0 and angle. Angle is given in radians. The resulting shape is composed of:
- a lateral conical face
- two planar faces in the planes z = 0 and z = H, or only one planar face in one of these two planes if a radius value is null (in the case of a complete cone, these faces are circles), and
- and in the case of a portion of a cone, two planar faces to close the shape. (either two parallelograms or two triangles, in the planes u = 0 and u = angle). Exceptions Standard_DomainError if:
- H is less than or equal to
Precision::Confusion(), or - the half-angle at the apex of the cone, defined by R1, R2 and H, is less than
Precision::Confusion()/H, or greater than (Pi/2)-Precision::Confusion()/H.f
Parameters (5)AxesR1R2Hangle
Instance methods(1)
Returns the algorithm.
BRepPrimAPI_MakeCylinder
Describes functions to build cylinders or portions of cylinders. A MakeCylinder object provides a framework for:
- defining the construction of a cylinder,
- implementing the construction algorithm, and
- consulting the result.
Constructors(4)
- constructor(R: number, H: number): BRepPrimAPI_MakeCylinder
Make a cylinder.
Parameters (2)R—cylinder radiusH—cylinder height
- constructor(R: number, H: number, Angle: number): BRepPrimAPI_MakeCylinder
Make a cylinder (part cylinder).
Parameters (3)R—cylinder radiusH—cylinder heightAngle—defines the missing portion of the cylinder
- constructor(Axes: gp_Ax2, R: number, H: number): BRepPrimAPI_MakeCylinder
Make a cylinder of radius R and length H.
Parameters (3)Axes—coordinate system for the construction of the cylinderR—cylinder radiusH—cylinder height
- constructor(Axes: gp_Ax2, R: number, H: number, Angle: number): BRepPrimAPI_MakeCylinder
Make a cylinder of radius R and length H with angle H. Constructs.
- a cylinder of radius R and height H, or
- a portion of cylinder of radius R and height H, and of the angle Angle defining the missing portion of the cylinder. The cylinder is constructed about the "Z Axis" of either:
- the global coordinate system, or
- the local coordinate system Axes. It is limited in this coordinate system as follows:
- in the v parametric direction (the Z axis), by the two parameter values 0 and H,
- and in the u parametric direction (the rotation angle around the Z Axis), in the case of a portion of a cylinder, by the two parameter values 0 and Angle. Angle is given in radians. The resulting shape is composed of:
- a lateral cylindrical face,
- two planar faces in the planes z = 0 and z = H (in the case of a complete cylinder, these faces are circles), and
- in case of a portion of a cylinder, two additional planar faces to close the shape.(two rectangles in the planes u = 0 and u = Angle). Exceptions Standard_DomainError if:
- R is less than or equal to
Precision::Confusion(), or - H is less than or equal to
Precision::Confusion().
Parameters (4)AxesRHAngle
Instance methods(1)
Returns the algorithm.
BRepPrimAPI_MakeHalfSpace
Describes functions to build half-spaces. A half-space is an infinite solid, limited by a surface. It is built from a face or a shell, which bounds it, and with a reference point, which specifies the side of the surface where the matter of the half-space is located. A half-space is a tool commonly used in topological operations to cut another shape. A MakeHalfSpace object provides a framework for:
- defining and implementing the construction of a half-space, and
- consulting the result.
Constructors(2)
- constructor(Face: TopoDS_Face, RefPnt: gp_Pnt): BRepPrimAPI_MakeHalfSpace
Make a HalfSpace defined with a Face and a Point.
Parameters (2)FaceRefPnt
- constructor(Shell: TopoDS_Shell, RefPnt: gp_Pnt): BRepPrimAPI_MakeHalfSpace
Make a HalfSpace defined with a Shell and a Point.
Parameters (2)ShellRefPnt
Instance methods(1)
Returns the constructed half-space as a solid.
BRepPrimAPI_MakeOneAxis
The abstract class MakeOneAxis is the root class of algorithms used to construct rotational primitives.
Instance methods(4)
- Build(theRange?: Message_ProgressRange): void
Stores the solid in myShape.
Parameters (1)theRange
- Face(): TopoDS_Face
Returns the lateral face of the rotational primitive.
Returns the constructed rotational primitive as a shell.
Returns the constructed rotational primitive as a solid.
BRepPrimAPI_MakePrism
Describes functions to build linear swept topologies, called prisms. A prism is defined by:
- a basis shape, which is swept, and
- a sweeping direction, which is:
- a vector for finite prisms, or
- a direction for infinite or semi-infinite prisms. The basis shape must not contain any solids. The profile generates objects according to the following rules:
- Vertices generate Edges
- Edges generate Faces.
- Wires generate Shells.
- Faces generate Solids.
- Shells generate Composite Solids A MakePrism object provides a framework for:
- defining the construction of a prism,
- implementing the construction algorithm, and
- consulting the result.
Constructors(2)
- constructor(S: TopoDS_Shape, V: gp_Vec, Copy?: boolean, Canonize?: boolean): BRepPrimAPI_MakePrism
Builds the prism of base S and vector V. If C is true, S is copied. If Canonize is true then generated surfaces are attempted to be canonized in simple types.
Parameters (4)SVCopyCanonize
- constructor(S: TopoDS_Shape, D: gp_Dir, Inf?: boolean, Copy?: boolean, Canonize?: boolean): BRepPrimAPI_MakePrism
Builds a semi-infinite or an infinite prism of base S. If Inf is true the prism is infinite, if Inf is false the prism is semi-infinite (in the direction D). If C is true S is copied (for semi-infinite prisms). If Canonize is true then generated surfaces are attempted to be canonized in simple types.
Parameters (5)SDInfCopyCanonize
Instance methods(8)
Returns the internal sweeping algorithm.
- Build(theRange?: Message_ProgressRange): void
Builds the resulting shape (redefined from MakeShape).
Parameters (1)theRange
Returns the
TopoDSShape of the bottom of the prism.- FirstShape(theShape: TopoDS_Shape): TopoDS_Shape
Returns the
TopoDSShape of the bottom of the prism. generated with theShape (subShape of the generating shape).Parameters (1)theShape
Returns the
TopoDSShape of the top of the prism. In the case of a finite prism, FirstShape returns the basis of the prism, in other words, S if Copy is false; otherwise, the copy of S belonging to the prism. LastShape returns the copy of S translated by V at the time of construction.- LastShape(theShape: TopoDS_Shape): TopoDS_Shape
Returns the
TopoDSShape of the top of the prism. generated with theShape (subShape of the generating shape).Parameters (1)theShape
Returns ListOfShape from
TopTools.Parameters (1)S
- IsDeleted(S: TopoDS_Shape): boolean
Returns true if the shape S has been deleted.
Parameters (1)S
BRepPrimAPI_MakeRevol
Class to make revolved sweep topologies.
a revolved sweep is defined by :
- A basis topology which is swept.
The basis topology must not contain solids (neither composite solids.).
The basis topology may be copied or shared in the result. - A rotation axis and angle :
- The axis is an Ax1 from gp.
- The angle is in [0, 2*Pi].
- The angle default value is 2*Pi.
The result is a topology with a higher dimension : - Vertex -> Edge.
- Edge -> Face.
- Wire -> Shell.
- Face -> Solid.
- Shell -> CompSolid.
Sweeping a Compound sweeps the elements of the compound and creates a compound with the results.
Constructors(2)
- constructor(S: TopoDS_Shape, A: gp_Ax1, Copy?: boolean): BRepPrimAPI_MakeRevol
Builds the Revol of base S, axis A and angle 2*Pi. If C is true, S is copied.
Parameters (3)SACopy
- constructor(S: TopoDS_Shape, A: gp_Ax1, D: number, Copy?: boolean): BRepPrimAPI_MakeRevol
Builds the Revol of base S, axis A and angle D. If C is true, S is copied.
Parameters (4)SADCopy
Instance methods(10)
Returns the internal sweeping algorithm.
- Build(theRange?: Message_ProgressRange): void
Builds the resulting shape (redefined from MakeShape).
Parameters (1)theRange
Returns the first shape of the revol (coinciding with the generating shape).
- FirstShape(theShape: TopoDS_Shape): TopoDS_Shape
Returns the
TopoDSShape of the beginning of the revolution, generated with theShape (subShape of the generating shape).Parameters (1)theShape
Returns the
TopoDSShape of the end of the revol.- LastShape(theShape: TopoDS_Shape): TopoDS_Shape
Returns the
TopoDSShape of the end of the revolution, generated with theShape (subShape of the generating shape).Parameters (1)theShape
Returns list of shape generated from shape S Warning: shape S must be shape of type VERTEX, EDGE, FACE, SOLID. For shapes of other types method always returns empty list.
Parameters (1)S
- IsDeleted(S: TopoDS_Shape): boolean
Returns true if the shape S has been deleted.
Parameters (1)S
- HasDegenerated(): boolean
Check if there are degenerated edges in the result.
Returns the list of degenerated edges.
BRepPrimAPI_MakeRevolution
Describes functions to build revolved shapes. A MakeRevolution object provides a framework for:
- defining the construction of a revolved shape,
- implementing the construction algorithm, and
- consulting the result.
Constructors(8)
- constructor(Meridian: Geom_Curve): BRepPrimAPI_MakeRevolution
Make a revolution body by rotating a curve around Z.
Parameters (1)Meridian
- constructor(Meridian: Geom_Curve, angle: number): BRepPrimAPI_MakeRevolution
Make a revolution body by rotating a curve around Z.
Parameters (2)Meridianangle
- constructor(Axes: gp_Ax2, Meridian: Geom_Curve): BRepPrimAPI_MakeRevolution
Make a revolution body by rotating a curve around Z.
Parameters (2)AxesMeridian
- constructor(Meridian: Geom_Curve, VMin: number, VMax: number): BRepPrimAPI_MakeRevolution
Make a revolution body by rotating a curve around Z.
Parameters (3)MeridianVMinVMax
- constructor(Axes: gp_Ax2, Meridian: Geom_Curve, angle: number): BRepPrimAPI_MakeRevolution
Make a revolution body by rotating a curve around Z.
Parameters (3)AxesMeridianangle
- constructor(Meridian: Geom_Curve, VMin: number, VMax: number, angle: number): BRepPrimAPI_MakeRevolution
Make a revolution body by rotating a curve around Z.
Parameters (4)MeridianVMinVMaxangle
- constructor(Axes: gp_Ax2, Meridian: Geom_Curve, VMin: number, VMax: number): BRepPrimAPI_MakeRevolution
Make a revolution body by rotating a curve around Z.
Parameters (4)AxesMeridianVMinVMax
- constructor(Axes: gp_Ax2, Meridian: Geom_Curve, VMin: number, VMax: number, angle: number): BRepPrimAPI_MakeRevolution
Make a revolution body by rotating a curve around Z. For all algorithms the resulting shape is composed of.
- a lateral revolved face,
- two planar faces in planes parallel to the plane z = 0, and passing by the extremities of the revolved portion of Meridian, if these points are not on the Z axis (in case of a complete revolved shape, these faces are circles),
- and in the case of a portion of a revolved shape, two planar faces to close the shape (in the planes u = 0 and u = angle).
Parameters (5)AxesMeridianVMinVMaxangle
Instance methods(1)
Returns the algorithm.
BRepPrimAPI_MakeSphere
Describes functions to build spheres or portions of spheres. A MakeSphere object provides a framework for:
- defining the construction of a sphere,
- implementing the construction algorithm, and
- consulting the result.
Constructors(12)
- constructor(R: number): BRepPrimAPI_MakeSphere
Make a sphere.
Parameters (1)R—sphere radius
- constructor(R: number, angle: number): BRepPrimAPI_MakeSphere
Make a sphere (spherical wedge).
Parameters (2)R—sphere radiusangle—angle between the radii lying within the bounding semidisks
- constructor(Center: gp_Pnt, R: number): BRepPrimAPI_MakeSphere
Make a sphere.
Parameters (2)Center—sphere center coordinatesR—sphere radius
- constructor(Axis: gp_Ax2, R: number): BRepPrimAPI_MakeSphere
Make a sphere.
Parameters (2)Axis—coordinate system for the construction of the sphereR—sphere radius
- constructor(R: number, angle1: number, angle2: number): BRepPrimAPI_MakeSphere
Make a sphere (spherical segment).
Parameters (3)R—sphere radiusangle1—first angle defining a spherical segmentangle2—second angle defining a spherical segment
- constructor(Center: gp_Pnt, R: number, angle: number): BRepPrimAPI_MakeSphere
Make a sphere (spherical wedge).
Parameters (3)Center—sphere center coordinatesR—sphere radiusangle—angle between the radii lying within the bounding semidisks
- constructor(Axis: gp_Ax2, R: number, angle: number): BRepPrimAPI_MakeSphere
Make a sphere (spherical wedge).
Parameters (3)Axis—coordinate system for the construction of the sphereR—sphere radiusangle—angle between the radii lying within the bounding semidisks
- constructor(R: number, angle1: number, angle2: number, angle3: number): BRepPrimAPI_MakeSphere
Make a sphere (spherical segment).
Parameters (4)R—sphere radiusangle1—first angle defining a spherical segmentangle2—second angle defining a spherical segmentangle3—angle between the radii lying within the bounding semidisks
- constructor(Center: gp_Pnt, R: number, angle1: number, angle2: number): BRepPrimAPI_MakeSphere
Make a sphere (spherical segment).
Parameters (4)Center—sphere center coordinatesR—sphere radiusangle1—first angle defining a spherical segmentangle2—second angle defining a spherical segment
- constructor(Axis: gp_Ax2, R: number, angle1: number, angle2: number): BRepPrimAPI_MakeSphere
Make a sphere (spherical segment).
Parameters (4)Axis—coordinate system for the construction of the sphereR—sphere radiusangle1—first angle defining a spherical segmentangle2—second angle defining a spherical segment
- constructor(Center: gp_Pnt, R: number, angle1: number, angle2: number, angle3: number): BRepPrimAPI_MakeSphere
Make a sphere (spherical segment).
Parameters (5)Center—sphere center coordinatesR—sphere radiusangle1—first angle defining a spherical segmentangle2—second angle defining a spherical segmentangle3—angle between the radii lying within the bounding semidisks
- constructor(Axis: gp_Ax2, R: number, angle1: number, angle2: number, angle3: number): BRepPrimAPI_MakeSphere
Make a sphere (spherical segment).
Parameters (5)AxisR—sphere radiusangle1—first angle defining a spherical segmentangle2—second angle defining a spherical segmentangle3—angle between the radii lying within the bounding semidisks
Instance methods(1)
Returns the algorithm.
BRepPrimAPI_MakeSweep
The abstract class MakeSweep is the root class of swept primitives. Sweeps are objects you obtain by sweeping a profile along a path. The profile can be any topology and the path is usually a curve or a wire. The profile generates objects according to the following rules:
- Vertices generate Edges
- Edges generate Faces.
- Wires generate Shells.
- Faces generate Solids.
- Shells generate Composite Solids. You are not allowed to sweep Solids and Composite Solids. Two kinds of sweeps are implemented in the BRepPrimAPI package:
- The linear sweep called a Prism
- The rotational sweep called a Revol Swept constructions along complex profiles such as BSpline curves are also available in the BRepOffsetAPI package..
Instance methods(2)
Returns the
TopoDSShape of the bottom of the sweep.Returns the
TopoDSShape of the top of the sweep.
BRepPrimAPI_MakeTorus
Describes functions to build tori or portions of tori. A MakeTorus object provides a framework for:
- defining the construction of a torus,
- implementing the construction algorithm, and
- consulting the result.
Constructors(8)
- constructor(R1: number, R2: number): BRepPrimAPI_MakeTorus
Make a torus.
Parameters (2)R1—distance from the center of the pipe to the center of the torusR2—radius of the pipe
- constructor(R1: number, R2: number, angle: number): BRepPrimAPI_MakeTorus
Make a section of a torus.
Parameters (3)R1—distance from the center of the pipe to the center of the torusR2—radius of the pipeangle—angle to create a torus pipe segment
- constructor(Axes: gp_Ax2, R1: number, R2: number): BRepPrimAPI_MakeTorus
Make a torus.
Parameters (3)Axes—coordinate system for the construction of the sphereR1—distance from the center of the pipe to the center of the torusR2—radius of the pipe
- constructor(R1: number, R2: number, angle1: number, angle2: number): BRepPrimAPI_MakeTorus
Make a torus with angles on the small circle.
Parameters (4)R1—distance from the center of the pipe to the center of the torusR2—radius of the pipeangle1—first angle to create a torus ring segmentangle2—second angle to create a torus ring segment
- constructor(Axes: gp_Ax2, R1: number, R2: number, angle: number): BRepPrimAPI_MakeTorus
Make a section of a torus.
Parameters (4)Axes—coordinate system for the construction of the sphereR1—distance from the center of the pipe to the center of the torusR2—radius of the pipeangle—angle to create a torus pipe segment
- constructor(R1: number, R2: number, angle1: number, angle2: number, angle: number): BRepPrimAPI_MakeTorus
Make a torus with angles on the small circle.
Parameters (5)R1—distance from the center of the pipe to the center of the torusR2—radius of the pipeangle1—first angle to create a torus ring segmentangle2—second angle to create a torus ring segmentangle—angle to create a torus pipe segment
- constructor(Axes: gp_Ax2, R1: number, R2: number, angle1: number, angle2: number): BRepPrimAPI_MakeTorus
Make a torus.
Parameters (5)Axes—coordinate system for the construction of the sphereR1—distance from the center of the pipe to the center of the torusR2—radius of the pipeangle1—first angle to create a torus ring segmentangle2—second angle to create a torus ring segment
- constructor(Axes: gp_Ax2, R1: number, R2: number, angle1: number, angle2: number, angle: number): BRepPrimAPI_MakeTorus
Make a section of a torus of radii R1 R2. For all algorithms The resulting shape is composed of.
- a lateral toroidal face,
- two conical faces (defined by the equation v = angle1 and v = angle2) if the sphere is truncated in the v parametric direction (they may be cylindrical faces in some particular conditions), and in case of a portion of torus, two planar faces to close the shape.(in the planes u = 0 and u = angle). Notes:
- The u parameter corresponds to a rotation angle around the Z axis.
- The circle whose radius is equal to the minor radius, located in the plane defined by the X axis and the Z axis, centered on the X axis, on its positive side, and positioned at a distance from the origin equal to the major radius, is the reference circle of the torus. The rotation around an axis parallel to the Y axis and passing through the center of the reference circle gives the v parameter on the reference circle. The X axis gives the origin of the v parameter. Near 0, as v increases, the Z coordinate increases (following the standard trigonometric convention: Z = r*sin(v)).
Parameters (6)AxesR1R2angle1angle2angle
Instance methods(1)
Returns the algorithm.
BRepPrimAPI_MakeWedge
Describes functions to build wedges, i.e. boxes with inclined faces. A MakeWedge object provides a framework for:
- defining the construction of a wedge,
- implementing the construction algorithm, and
- consulting the result.
Constructors(4)
- constructor(dx: number, dy: number, dz: number, ltx: number): BRepPrimAPI_MakeWedge
Make a STEP right angular wedge. (ltx >= 0).
Parameters (4)dxdydzltx
- constructor(Axes: gp_Ax2, dx: number, dy: number, dz: number, ltx: number): BRepPrimAPI_MakeWedge
Make a STEP right angular wedge. (ltx >= 0).
Parameters (5)Axesdxdydzltx
- constructor(dx: number, dy: number, dz: number, xmin: number, zmin: number, xmax: number, zmax: number): BRepPrimAPI_MakeWedge
Make a wedge. The face at dy is xmin,zmin xmax,zmax.
Parameters (7)dxdydzxminzminxmaxzmax
- constructor(Axes: gp_Ax2, dx: number, dy: number, dz: number, xmin: number, zmin: number, xmax: number, zmax: number): BRepPrimAPI_MakeWedge
Make a wedge. The face at dy is xmin,zmin xmax,zmax.
Parameters (8)Axesdxdydzxminzminxmaxzmax
Instance methods(4)
Returns the internal algorithm.
- Build(theRange?: Message_ProgressRange): void
Stores the solid in myShape.
Parameters (1)theRange
Returns the constructed box in the form of a shell.
Returns the constructed box in the form of a solid.