OpenCascade.js
API ReferenceModelingAlgorithmsTKPrim

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)

Instance methods(14)

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 height
    • angle
      angle to create a part cone
  • constructor(Axes: gp_Ax2, R1: number, R2: number, H: number): BRepPrimAPI_MakeCone

    Make a cone.

    Parameters (4)
    • Axes
    • R1
      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)
    • Axes
    • R1
    • R2
    • H
    • angle

Instance methods(1)

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 radius
    • H
      cylinder height
  • constructor(R: number, H: number, Angle: number): BRepPrimAPI_MakeCylinder

    Make a cylinder (part cylinder).

    Parameters (3)
    • R
      cylinder radius
    • H
      cylinder height
    • Angle
      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 cylinder
    • R
      cylinder radius
    • H
      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)
    • Axes
    • R
    • H
    • Angle

Instance methods(1)

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)

Instance methods(1)

BRepPrimAPI_MakeOneAxis

The abstract class MakeOneAxis is the root class of algorithms used to construct rotational primitives.

Instance methods(4)

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)
    • S
    • V
    • Copy
    • Canonize
  • 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)
    • S
    • D
    • Inf
    • Copy
    • Canonize

Instance methods(8)

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)

Instance methods(10)

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)

Instance methods(1)

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)

  • Make a sphere.

    Parameters (1)
    • R
      sphere radius
  • constructor(R: number, angle: number): BRepPrimAPI_MakeSphere

    Make a sphere (spherical wedge).

    Parameters (2)
    • R
      sphere radius
    • angle
      angle between the radii lying within the bounding semidisks
  • Make a sphere.

    Parameters (2)
    • Center
      sphere center coordinates
    • R
      sphere radius
  • Make a sphere.

    Parameters (2)
    • Axis
      coordinate system for the construction of the sphere
    • R
      sphere radius
  • constructor(R: number, angle1: number, angle2: number): BRepPrimAPI_MakeSphere

    Make a sphere (spherical segment).

    Parameters (3)
    • R
      sphere radius
    • angle1
      first angle defining a spherical segment
    • angle2
      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 coordinates
    • R
      sphere radius
    • angle
      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 sphere
    • R
      sphere radius
    • angle
      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 radius
    • angle1
      first angle defining a spherical segment
    • angle2
      second angle defining a spherical segment
    • angle3
      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 coordinates
    • R
      sphere radius
    • angle1
      first angle defining a spherical segment
    • angle2
      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 sphere
    • R
      sphere radius
    • angle1
      first angle defining a spherical segment
    • angle2
      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 coordinates
    • R
      sphere radius
    • angle1
      first angle defining a spherical segment
    • angle2
      second angle defining a spherical segment
    • angle3
      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)
    • Axis
    • R
      sphere radius
    • angle1
      first angle defining a spherical segment
    • angle2
      second angle defining a spherical segment
    • angle3
      angle between the radii lying within the bounding semidisks

Instance methods(1)

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)

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 torus
    • R2
      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 torus
    • R2
      radius of the pipe
    • angle
      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 sphere
    • R1
      distance from the center of the pipe to the center of the torus
    • R2
      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 torus
    • R2
      radius of the pipe
    • angle1
      first angle to create a torus ring segment
    • angle2
      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 sphere
    • R1
      distance from the center of the pipe to the center of the torus
    • R2
      radius of the pipe
    • angle
      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 torus
    • R2
      radius of the pipe
    • angle1
      first angle to create a torus ring segment
    • angle2
      second angle to create a torus ring segment
    • angle
      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 sphere
    • R1
      distance from the center of the pipe to the center of the torus
    • R2
      radius of the pipe
    • angle1
      first angle to create a torus ring segment
    • angle2
      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)
    • Axes
    • R1
    • R2
    • angle1
    • angle2
    • angle

Instance methods(1)

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)
    • dx
    • dy
    • dz
    • ltx
  • constructor(Axes: gp_Ax2, dx: number, dy: number, dz: number, ltx: number): BRepPrimAPI_MakeWedge

    Make a STEP right angular wedge. (ltx >= 0).

    Parameters (5)
    • Axes
    • dx
    • dy
    • dz
    • ltx
  • 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)
    • dx
    • dy
    • dz
    • xmin
    • zmin
    • xmax
    • zmax
  • 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)
    • Axes
    • dx
    • dy
    • dz
    • xmin
    • zmin
    • xmax
    • zmax

Instance methods(4)