BRepPrim
OCCT package BRepPrim: BRepPrim_Builder, BRepPrim_Cone, BRepPrim_Cylinder, BRepPrim_Direction, and 7 more bound classes.
BRepPrim_Builder
implements the abstract Builder with the BRep Builder
Constructors(2)
Creates an empty, useless Builder. Necesseray for compilation.
Creates from a Builder.
Parameters (1)B
Instance methods(22)
- MakeShell(S: TopoDS_Shell): void
Make a empty Shell.
Parameters (1)S—Mutated in place; read the updated value from this argument after the call.
- MakeFace(F: TopoDS_Face, P: gp_Pln): void
Returns in <F> a Face built with the plane equation.
. Used by all primitives.Parameters (2)F—Mutated in place; read the updated value from this argument after the call.P
- MakeWire(W: TopoDS_Wire): void
Returns in <W> an empty Wire.
Parameters (1)W—Mutated in place; read the updated value from this argument after the call.
- MakeDegeneratedEdge(E: TopoDS_Edge): void
Returns in <E> a degenerated edge.
Parameters (1)E—Mutated in place; read the updated value from this argument after the call.
- MakeEdge(E: TopoDS_Edge, L: gp_Lin): void
Returns in <E> an Edge built with the line equation <L>.
Parameters (2)E—Mutated in place; read the updated value from this argument after the call.L
- MakeEdge(E: TopoDS_Edge, C: gp_Circ): void
Returns in <E> an Edge built with the circle equation
.Parameters (2)E—Mutated in place; read the updated value from this argument after the call.C
- SetPCurve(E: TopoDS_Edge, F: TopoDS_Face, L: gp_Lin2d): void
Sets the line <L> to be the curve representing the edge <E> in the parametric space of the surface of <F>.
Parameters (3)E—Mutated in place; read the updated value from this argument after the call.FL
- SetPCurve(E: TopoDS_Edge, F: TopoDS_Face, C: gp_Circ2d): void
Sets the circle
to be the curve representing the edge <E> in the parametric space of the surface of <F>.Parameters (3)E—Mutated in place; read the updated value from this argument after the call.FC
- SetPCurve(E: TopoDS_Edge, F: TopoDS_Face, L1: gp_Lin2d, L2: gp_Lin2d): void
Sets the lines <L1,L2> to be the curves representing the edge <E> in the parametric space of the closed surface of <F>.
Parameters (4)E—Mutated in place; read the updated value from this argument after the call.FL1L2
- MakeVertex(V: TopoDS_Vertex, P: gp_Pnt): void
Returns in <V> a Vertex built with the point.
.Parameters (2)V—Mutated in place; read the updated value from this argument after the call.P
- ReverseFace(F: TopoDS_Face): void
Reverses the Face <F>.
Parameters (1)F—Mutated in place; read the updated value from this argument after the call.
- AddEdgeVertex(E: TopoDS_Edge, V: TopoDS_Vertex, P: number, direct: boolean): void
Adds the Vertex <V> in the Edge <E>.
is the parameter of the vertex on the edge. If direct is False the Vertex is reversed.Parameters (4)E—Mutated in place; read the updated value from this argument after the call.VPdirect
- AddEdgeVertex(E: TopoDS_Edge, V: TopoDS_Vertex, P1: number, P2: number): void
Adds the Vertex <V> in the Edge <E>. <P1,P2> are the parameters of the vertex on the closed edge.
Parameters (4)E—Mutated in place; read the updated value from this argument after the call.VP1P2
- SetParameters(E: TopoDS_Edge, V: TopoDS_Vertex, P1: number, P2: number): void
<P1,P2> are the parameters of the vertex on the edge. The edge is a closed curve.
Parameters (4)E—Mutated in place; read the updated value from this argument after the call.VP1P2
- AddWireEdge(W: TopoDS_Wire, E: TopoDS_Edge, direct: boolean): void
Adds the Edge <E> in the Wire <W>, if direct is False the Edge is reversed.
Parameters (3)W—Mutated in place; read the updated value from this argument after the call.Edirect
- AddFaceWire(F: TopoDS_Face, W: TopoDS_Wire): void
Adds the Wire <W> in the Face <F>.
Parameters (2)F—Mutated in place; read the updated value from this argument after the call.W
- AddShellFace(Sh: TopoDS_Shell, F: TopoDS_Face): void
Adds the Face <F> in the Shell <Sh>.
Parameters (2)Sh—Mutated in place; read the updated value from this argument after the call.F
- CompleteEdge(E: TopoDS_Edge): void
This is called once an edge is completed. It gives the opportunity to perform any post treatment.
Parameters (1)E—Mutated in place; read the updated value from this argument after the call.
- CompleteWire(W: TopoDS_Wire): void
This is called once a wire is completed. It gives the opportunity to perform any post treatment.
Parameters (1)W—Mutated in place; read the updated value from this argument after the call.
- CompleteFace(F: TopoDS_Face): void
This is called once a face is completed. It gives the opportunity to perform any post treatment.
Parameters (1)F—Mutated in place; read the updated value from this argument after the call.
- CompleteShell(S: TopoDS_Shell): void
This is called once a shell is completed. It gives the opportunity to perform any post treatment.
Parameters (1)S—Mutated in place; read the updated value from this argument after the call.
BRepPrim_Cone
Implement the cone primitive.
Constructors(7)
- constructor(Angle: number): BRepPrim_Cone
infinite cone at origin on Z negative
Parameters (1)Angle
- constructor(Angle: number, Apex: gp_Pnt): BRepPrim_Cone
infinite cone at Apex on Z negative
Parameters (2)AngleApex
- constructor(Angle: number, Axes: gp_Ax2): BRepPrim_Cone
infinite cone with Axes
Parameters (2)AngleAxes
- constructor(R1: number, R2: number, H: number): BRepPrim_Cone
create a Cone at origin on Z axis, of height H, radius R1 at Z = 0, R2 at Z = H, X is the origin of angles. If R1 or R2 is 0 there is an apex. Otherwise, it is a truncated cone.
Error : R1 and R2 < Resolution R1 or R2 negative std::abs(R1-R2) < Resolution H < Resolution H negativeParameters (3)R1R2H
- constructor(Angle: number, Position: gp_Ax2, Height: number, Radius?: number): BRepPrim_Cone
the STEP definition Angle = semi-angle of the cone Position : the coordinate system Height : height of the cone. Radius : radius of truncated face at z = 0
The apex is on z < 0
Errors : Height < Resolution Angle < Resolution / Height Angle > PI/2 - Resolution / HeightParameters (4)AnglePositionHeightRadius
- constructor(Center: gp_Pnt, R1: number, R2: number, H: number): BRepPrim_Cone
same as above but at a given point
Parameters (4)CenterR1R2H
- constructor(Axes: gp_Ax2, R1: number, R2: number, H: number): BRepPrim_Cone
same as above with given axes system.
Parameters (4)AxesR1R2H
Instance methods(1)
The surface normal should be directed towards the outside.
BRepPrim_Cylinder
Cylinder primitive.
Constructors(6)
- constructor(Radius: number): BRepPrim_Cylinder
infinite Cylinder at origin on Z negative
Parameters (1)Radius
- constructor(Center: gp_Pnt, Radius: number): BRepPrim_Cylinder
infinite Cylinder at Center on Z negative
Parameters (2)CenterRadius
- constructor(Axes: gp_Ax2, Radius: number): BRepPrim_Cylinder
infinite Cylinder at Axes on Z negative
Parameters (2)AxesRadius
- constructor(R: number, H: number): BRepPrim_Cylinder
create a Cylinder at origin on Z axis, of height H and radius R Error : Radius < Resolution H < Resolution H negative
Parameters (2)RH
- constructor(Position: gp_Ax2, Radius: number, Height: number): BRepPrim_Cylinder
the STEP definition Position : center of a Face and Axis Radius : radius of cylinder Height : distance between faces on positive side
Errors : Height < Resolution Radius < ResolutionParameters (3)PositionRadiusHeight
- constructor(Center: gp_Pnt, R: number, H: number): BRepPrim_Cylinder
same as above but at a given point
Parameters (3)CenterRH
Instance methods(1)
The surface normal should be directed towards the outside.
BRepPrim_Direction
Properties(6)
BRepPrim_FaceBuilder
The FaceBuilder is an algorithm to build a BRep Face from a Geom Surface.
The face covers the whole surface or the area delimited by UMin, UMax, VMin, VMax
Constructors(3)
- Parameters (2)
BS
- constructor(B: BRep_Builder, S: Geom_Surface, UMin: number, UMax: number, VMin: number, VMax: number): BRepPrim_FaceBuilderParameters (6)
BSUMinUMaxVMinVMax
Instance methods(5)
- Init(B: BRep_Builder, S: Geom_Surface): voidParameters (2)
BS
- Init(B: BRep_Builder, S: Geom_Surface, UMin: number, UMax: number, VMin: number, VMax: number): voidParameters (6)
BSUMinUMaxVMinVMax
- Face(): TopoDS_Face
- Edge(I: number): TopoDS_Edge
Returns the edge of index 1 - Edge VMin 2 - Edge UMax 3 - Edge VMax 4 - Edge UMin.
Parameters (1)I
- Vertex(I: number): TopoDS_Vertex
Returns the vertex of index 1 - Vertex UMin,VMin 2 - Vertex UMax,VMin 3 - Vertex UMax,VMax 4 - Vertex UMin,VMax.
Parameters (1)I
BRepPrim_GWedge
A wedge is defined by:
Axes: an Axis2 (coordinate system)
YMin, YMax the coordinates of the ymin and ymax rectangular faces parallel to the ZX plane (of the coordinate systems)
ZMin, ZMax, XMin, XMax the rectangular left (YMin) face parallel to the Z and X axes.
Z2Min, Z2Max, X2Min, X2Max the rectangular right (YMax) face parallel to the Z and X axes.
For a box Z2Min = ZMin, Z2Max = ZMax, X2Min = XMin, X2Max = XMax
The wedge can be open in the corresponding direction of its Boolean myInfinite
Constructors(4)
Default constructor.
- constructor(B: BRepPrim_Builder, Axes: gp_Ax2, dx: number, dy: number, dz: number): BRepPrim_GWedge
Creates a GWedge algorithm. <Axes> is the axis system for the primitive.
XMin, YMin, ZMin are set to 0 XMax, YMax, ZMax are set to dx, dy, dz Z2Min = ZMin Z2Max = ZMax X2Min = XMin X2Max = XMax The result is a box dx,dy,dz should be positiveParameters (5)BAxesdxdydz
- constructor(B: BRepPrim_Builder, Axes: gp_Ax2, dx: number, dy: number, dz: number, ltx: number): BRepPrim_GWedge
Creates a GWedge primitive. <Axes> is the axis system for the primitive.
XMin, YMin, ZMin are set to 0 XMax, YMax, ZMax are set to dx, dy, dz Z2Min = ZMin Z2Max = ZMax X2Min = ltx X2Max = ltx The result is a STEP right angular wedge dx,dy,dz should be positive ltx should not be negativeParameters (6)BAxesdxdydzltx
- constructor(B: BRepPrim_Builder, Axes: gp_Ax2, xmin: number, ymin: number, zmin: number, z2min: number, x2min: number, xmax: number, ymax: number, zmax: number, z2max: number, x2max: number): BRepPrim_GWedge
Create a GWedge primitive. <Axes> is the axis system for the primitive.
all the fields are set to the corresponding value XYZMax - XYZMin should be positive ZX2Max - ZX2Min should not be negativeParameters (12)BAxesxminyminzminz2minx2minxmaxymaxzmaxz2maxx2max
Instance methods(27)
Returns the coordinates system from <me>.
- GetXMin(): number
Returns Xmin value from <me>.
- GetYMin(): number
Returns YMin value from <me>.
- GetZMin(): number
Returns ZMin value from <me>.
- GetZ2Min(): number
Returns Z2Min value from <me>.
- GetX2Min(): number
Returns X2Min value from <me>.
- GetXMax(): number
Returns XMax value from <me>.
- GetYMax(): number
Returns YMax value from <me>.
- GetZMax(): number
Returns ZMax value from <me>.
- GetZ2Max(): number
Returns Z2Max value from <me>.
- GetX2Max(): number
Returns X2Max value from <me>.
- Open(d1: BRepPrim_Direction): void
Opens <me> in <d1> direction. A face and its edges or vertices are said nonexistent.
Parameters (1)d1
- Close(d1: BRepPrim_Direction): void
Closes <me> in <d1> direction. A face and its edges or vertices are said existent.
Parameters (1)d1
- IsInfinite(d1: BRepPrim_Direction): boolean
Returns True if <me> is open in <d1> direction.
Parameters (1)d1
Returns the Shell containing the Faces of <me>.
- HasFace(d1: BRepPrim_Direction): boolean
Returns True if <me> has a Face in <d1> direction.
Parameters (1)d1
Returns the Face of <me> located in <d1> direction.
Parameters (1)d1
- Plane(d1: BRepPrim_Direction): gp_Pln
Returns the plane of the Face of <me> located in <d1> direction.
Parameters (1)d1
- HasWire(d1: BRepPrim_Direction): boolean
Returns True if <me> has a Wire in <d1> direction.
Parameters (1)d1
Returns the Wire of <me> located in <d1> direction.
Parameters (1)d1
- HasEdge(d1: BRepPrim_Direction, d2: BRepPrim_Direction): boolean
Returns True if <me> has an Edge in <d1><d2> direction.
Parameters (2)d1d2
- Edge(d1: BRepPrim_Direction, d2: BRepPrim_Direction): TopoDS_Edge
Returns the Edge of <me> located in <d1><d2> direction.
Parameters (2)d1d2
- Line(d1: BRepPrim_Direction, d2: BRepPrim_Direction): gp_Lin
Returns the line of the Edge of <me> located in <d1><d2> direction.
Parameters (2)d1d2
- HasVertex(d1: BRepPrim_Direction, d2: BRepPrim_Direction, d3: BRepPrim_Direction): boolean
Returns True if <me> has a Vertex in <d1><d2><d3> direction.
Parameters (3)d1d2d3
- Vertex(d1: BRepPrim_Direction, d2: BRepPrim_Direction, d3: BRepPrim_Direction): TopoDS_Vertex
Returns the Vertex of <me> located in <d1><d2><d3> direction.
Parameters (3)d1d2d3
- Point(d1: BRepPrim_Direction, d2: BRepPrim_Direction, d3: BRepPrim_Direction): gp_Pnt
Returns the point of the Vertex of <me> located in <d1><d2><d3> direction.
Parameters (3)d1d2d3
- IsDegeneratedShape(): boolean
Checks a shape on degeneracy.
ReturnsTRUE if a shape is degenerated
BRepPrim_OneAxis
Algorithm to build primitives with one axis of revolution.
The revolution body is described by:
A coordinate system (Ax2 from gp). The Z axis is the rotational axis.
An Angle around the Axis, When the Angle is 2*PI the primitive is not limited by planar faces. The U parameter range from 0 to Angle.
A parameter range VMin, VMax on the meridian.
A meridian: The meridian is a curve described by a set of deferred methods.
The topology consists of A shell, Faces, Wires, Edges and Vertices. Methods are provided to build all the elements. Building an element implies the automatic building of all its sub-elements.
So building the shell builds everything.
There are at most 5 faces:
- The LateralFace.
- The TopFace and the BottomFace.
- The StartFace and the EndFace.
Instance methods(50)
- SetMeridianOffset(MeridianOffset?: number): void
The MeridianOffset is added to the parameters on the meridian curve and to the V values of the pcurves. This is used for the sphere for example, to give a range on the meridian edge which is not VMin, VMax.
Parameters (1)MeridianOffset
Returns the Ax2 from <me>.
- Parameters (1)
A
- Angle(): number
- Angle(A: number): voidParameters (1)
A
- VMin(): number
- VMin(V: number): voidParameters (1)
V
- VMax(): number
- VMax(V: number): voidParameters (1)
V
Returns a face with no edges. The surface is the lateral surface with normals pointing outward. The U parameter is the angle with the origin on the X axis. The V parameter is the parameter of the meridian.
- MakeEmptyMeridianEdge(Ang: number): TopoDS_Edge
Returns an edge with a 3D curve made from the meridian in the XZ plane rotated by <Ang> around the Z-axis. Ang may be 0 or myAngle.
Parameters (1)Ang
- SetMeridianPCurve(E: TopoDS_Edge, F: TopoDS_Face): void
Sets the parametric curve of the edge <E> in the face <F> to be the 2d representation of the meridian.
Parameters (2)E—Mutated in place; read the updated value from this argument after the call.F
- MeridianValue(V: number): gp_Pnt2d
Returns the meridian point at parameter <V> in the plane XZ.
Parameters (1)V
- MeridianOnAxis(V: number): boolean
Returns True if the point of parameter <V> on the meridian is on the Axis. Default implementation is std::abs(MeridianValue(V).X()) <
Precision::Confusion().Parameters (1)V
- MeridianClosed(): boolean
Returns True if the meridian is closed. Default implementation is: MeridianValue(VMin).IsEqual(MeridianValue(VMax),
Precision::Confusion()). - VMaxInfinite(): boolean
Returns True if VMax is infinite. Default Precision::IsPositiveInfinite(VMax);.
- VMinInfinite(): boolean
Returns True if VMin is infinite. Default Precision::IsNegativeInfinite(VMax);.
- HasTop(): boolean
Returns True if there is a top face.
That is neither:VMaxInfinite()MeridianClosed()MeridianOnAxis(VMax) - HasBottom(): boolean
Returns True if there is a bottom face.
That is neither:VMinInfinite()MeridianClosed()MeridianOnAxis(VMin) - HasSides(): boolean
Returns True if there are Start and End faces.
That is: 2*PI - Angle >Precision::Angular() Returns the Shell containing all the Faces of the primitive.
Returns the lateral Face. It is oriented toward the outside of the primitive.
Returns the top planar Face. It is Oriented toward the +Z axis (outside).
Returns the Bottom planar Face. It is Oriented toward the -Z axis (outside).
Returns the Face starting the slice, it is oriented toward the exterior of the primitive.
Returns the Face ending the slice, it is oriented toward the exterior of the primitive.
Returns the wire in the lateral face.
Returns the wire in the lateral face with the start edge.
Returns the wire with in lateral face with the end edge.
Returns the wire in the top face.
Returns the wire in the bottom face.
Returns the wire in the start face.
Returns the wire in the start face with the AxisEdge.
Returns the Wire in the end face.
Returns the Wire in the end face with the AxisEdge.
Returns the Edge built along the Axis and oriented on +Z of the Axis.
Returns the Edge at angle 0.
Returns the Edge at angle Angle. If !HasSides() the StartEdge and the EndEdge are the same edge.
Returns the linear Edge between start Face and top Face.
Returns the linear Edge between start Face and bottom Face.
Returns the linear Edge between end Face and top Face.
Returns the linear Edge between end Face and bottom Face.
Returns the edge at VMax. If
MeridianClosed()the TopEdge and the BottomEdge are the same edge.Returns the edge at VMin. If
MeridianClosed()the TopEdge and the BottomEdge are the same edge.Returns the Vertex at the Top altitude on the axis.
Returns the Vertex at the Bottom altitude on the axis.
Returns the vertex (0,VMax).
Returns the vertex (angle,VMax).
Returns the vertex (0,VMin).
Returns the vertex (angle,VMax).
BRepPrim_Revolution
Implement the OneAxis algorithm for a revolution surface.
Constructors(1)
- constructor(A: gp_Ax2, VMin: number, VMax: number, M: Geom_Curve, PM: Geom2d_Curve): BRepPrim_Revolution
Create a revolution body <M> is the meridian nd must be in the XZ plane of . <PM> is the meridian in the XZ plane.
Parameters (5)AVMinVMaxMPM
Instance methods(4)
The surface normal should be directed towards the outside.
- MakeEmptyMeridianEdge(Ang: number): TopoDS_Edge
Returns an edge with a 3D curve made from the meridian in the XZ plane rotated by <Ang> around the Z-axis. Ang may be 0 or myAngle.
Parameters (1)Ang
- MeridianValue(V: number): gp_Pnt2d
Returns the meridian point at parameter <V> in the plane XZ.
Parameters (1)V
- SetMeridianPCurve(E: TopoDS_Edge, F: TopoDS_Face): void
Sets the parametric urve of the edge <E> in the face <F> to be the 2d representation of the meridian.
Parameters (2)E—Mutated in place; read the updated value from this argument after the call.F
BRepPrim_Sphere
Implements the sphere primitive.
Constructors(3)
- constructor(Radius: number): BRepPrim_Sphere
Creates a Sphere at origin with Radius. The axes of the sphere are the reference axes. An error is raised if the radius is < Resolution.
Parameters (1)Radius
- constructor(Center: gp_Pnt, Radius: number): BRepPrim_Sphere
Creates a Sphere with Center and Radius. Axes are the reference axes. This is the STEP constructor.
Parameters (2)CenterRadius
- constructor(Axes: gp_Ax2, Radius: number): BRepPrim_Sphere
Creates a sphere with given axes system.
Parameters (2)AxesRadius
Instance methods(1)
The surface normal should be directed towards the outside.
BRepPrim_Torus
Implements the torus primitive.
Constructors(3)
- constructor(Major: number, Minor: number): BRepPrim_Torus
Torus centered at origin.
Parameters (2)MajorMinor
- constructor(Position: gp_Ax2, Major: number, Minor: number): BRepPrim_Torus
the STEP definition Position : center and axes Major, Minor : Radii
Errors : Major < Resolution Minor < ResolutionParameters (3)PositionMajorMinor
- constructor(Center: gp_Pnt, Major: number, Minor: number): BRepPrim_Torus
Torus at Center.
Parameters (3)CenterMajorMinor
Instance methods(1)
The surface normal should be directed towards the outside.
BRepPrim_Wedge
Provides constructors without Builders.
Constructors(4)
Default constructor.
- constructor(Axes: gp_Ax2, dx: number, dy: number, dz: number): BRepPrim_Wedge
Creates a Wedge algorithm. <Axes> is the axis system for the primitive.
XMin, YMin, ZMin are set to 0 XMax, YMax, ZMax are set to dx, dy, dz Z2Min = ZMin Z2Max = ZMax X2Min = XMin X2Max = XMax The result is a box dx,dy,dz should be positiveParameters (4)Axesdxdydz
- constructor(Axes: gp_Ax2, dx: number, dy: number, dz: number, ltx: number): BRepPrim_Wedge
Creates a Wedge primitive. <Axes> is the axis system for the primitive.
XMin, YMin, ZMin are set to 0 XMax, YMax, ZMax are set to dx, dy, dz Z2Min = ZMin Z2Max = ZMax X2Min = ltx X2Max = ltx The result is a STEP right angular wedge dx,dy,dz should be positive ltx should not be negativeParameters (5)Axesdxdydzltx
- constructor(Axes: gp_Ax2, xmin: number, ymin: number, zmin: number, z2min: number, x2min: number, xmax: number, ymax: number, zmax: number, z2max: number, x2max: number): BRepPrim_Wedge
Create a Wedge primitive. <Axes> is the axis system for the primitive.
all the fields are set to the corresponding value XYZMax - XYZMin should be positive ZX2Max - ZX2Min should not be negativeParameters (11)Axesxminyminzminz2minx2minxmaxymaxzmaxz2maxx2max