OCC.Core.BRepPrim module¶
BRepPrim module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_brepprim.html
-
class
BRepPrim_Builder
(*args)¶ Bases:
object
- Creates an empty, useless Builder. Necesseray for compilation.
- rtype
None* Creates from a Builder.
- param B
- type B
BRep_Builder
- rtype
None
-
AddEdgeVertex
()¶ - Adds the Vertex <V> in the Edge <E>. <P> is the parameter of the vertex on the edge. If direct is False the Vertex is reversed.
- param E
- type E
TopoDS_Edge
- param V
- type V
TopoDS_Vertex
- param P
- type P
float
- param direct
- type direct
bool
- rtype
None* Adds the Vertex <V> in the Edge <E>. <P1,P2> are the parameters of the vertex on the closed edge.
- param E
- type E
TopoDS_Edge
- param V
- type V
TopoDS_Vertex
- param P1
- type P1
float
- param P2
- type P2
float
- rtype
None
-
AddFaceWire
()¶ - Adds the Wire <W> in the Face <F>.
- param F
- type F
TopoDS_Face
- param W
- type W
TopoDS_Wire
- rtype
None
-
AddShellFace
()¶ - Adds the Face <F> in the Shell <Sh>.
- param Sh
- type Sh
TopoDS_Shell
- param F
- type F
TopoDS_Face
- rtype
None
-
AddWireEdge
()¶ - Adds the Edge <E> in the Wire <W>, if direct is False the Edge is reversed.
- param W
- type W
TopoDS_Wire
- param E
- type E
TopoDS_Edge
- param direct
- type direct
bool
- rtype
None
-
Builder
()¶ - Return type
-
CompleteEdge
()¶ - This is called once an edge is completed. It gives the opportunity to perform any post treatment.
- param E
- type E
TopoDS_Edge
- rtype
None
-
CompleteFace
()¶ - This is called once a face is completed. It gives the opportunity to perform any post treatment.
- param F
- type F
TopoDS_Face
- rtype
None
-
CompleteShell
()¶ - This is called once a shell is completed. It gives the opportunity to perform any post treatment.
- param S
- type S
TopoDS_Shell
- rtype
None
-
CompleteWire
()¶ - This is called once a wire is completed. It gives the opportunity to perform any post treatment.
- param W
- type W
TopoDS_Wire
- rtype
None
-
MakeDegeneratedEdge
()¶ - Returns in <E> a degenerated edge.
- param E
- type E
TopoDS_Edge
- rtype
None
-
MakeEdge
()¶ - Returns in <E> an Edge built with the line equation <L>.
- param E
- type E
TopoDS_Edge
- param L
- type L
gp_Lin
- rtype
None* Returns in <E> an Edge built with the circle equation <C>.
- param E
- type E
TopoDS_Edge
- param C
- type C
gp_Circ
- rtype
None
-
MakeFace
()¶ - Returns in <F> a Face built with the plane equation <P>. Used by all primitives.
- param F
- type F
TopoDS_Face
- param P
- type P
gp_Pln
- rtype
None
-
MakeShell
()¶ - Make a empty Shell.
- param S
- type S
TopoDS_Shell
- rtype
None
-
MakeVertex
()¶ - Returns in <V> a Vertex built with the point <P>.
- param V
- type V
TopoDS_Vertex
- param P
- type P
gp_Pnt
- rtype
None
-
MakeWire
()¶ - Returns in <W> an empty Wire.
- param W
- type W
TopoDS_Wire
- rtype
None
-
ReverseFace
()¶ - Reverses the Face <F>.
- param F
- type F
TopoDS_Face
- rtype
None
-
SetPCurve
()¶ - Sets the line <L> to be the curve representing the edge <E> in the parametric space of the surface of <F>.
- param E
- type E
TopoDS_Edge
- param F
- type F
TopoDS_Face
- param L
- type L
gp_Lin2d
- rtype
None* Sets the lines <L1,L2> to be the curves representing the edge <E> in the parametric space of the closed surface of <F>.
- param E
- type E
TopoDS_Edge
- param F
- type F
TopoDS_Face
- param L1
- type L1
gp_Lin2d
- param L2
- type L2
gp_Lin2d
- rtype
None* Sets the circle <C> to be the curve representing the edge <E> in the parametric space of the surface of <F>.
- param E
- type E
TopoDS_Edge
- param F
- type F
TopoDS_Face
- param C
- type C
gp_Circ2d
- rtype
None
-
SetParameters
()¶ - <P1,P2> are the parameters of the vertex on the edge. The edge is a closed curve.
- param E
- type E
TopoDS_Edge
- param V
- type V
TopoDS_Vertex
- param P1
- type P1
float
- param P2
- type P2
float
- rtype
None
-
property
thisown
¶ The membership flag
-
class
BRepPrim_Cone
(*args)¶ Bases:
OCC.Core.BRepPrim.BRepPrim_Revolution
- the STEP definition Angle = semi-angle of the cone Positionthe coordinate system Heightheight of the cone. Radiusradius of truncated face at z = 0 //! The apex is on z < 0 //! ErrorsHeight < Resolution Angle < Resolution / Height Angle > PI/2 - Resolution / Height
- param Angle
- type Angle
float
- param Position
- type Position
gp_Ax2
- param Height
- type Height
float
- param Radius
default value is 0
- type Radius
float
- rtype
None* infinite cone at origin on Z negative
- param Angle
- type Angle
float
- rtype
None* infinite cone at Apex on Z negative
- param Angle
- type Angle
float
- param Apex
- type Apex
gp_Pnt
- rtype
None* infinite cone with Axes
- param Angle
- type Angle
float
- param Axes
- type Axes
gp_Ax2
- rtype
None* 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 Abs(R1-R2) < Resolution H < Resolution H negative
- param R1
- type R1
float
- param R2
- type R2
float
- param H
- type H
float
- rtype
None* same as above but at a given point
- param Center
- type Center
gp_Pnt
- param R1
- type R1
float
- param R2
- type R2
float
- param H
- type H
float
- rtype
None* same as above with given axes system.
- param Axes
- type Axes
gp_Ax2
- param R1
- type R1
float
- param R2
- type R2
float
- param H
- type H
float
- rtype
None
-
property
thisown
¶ The membership flag
-
class
BRepPrim_Cylinder
(*args)¶ Bases:
OCC.Core.BRepPrim.BRepPrim_Revolution
- the STEP definition Positioncenter of a Face and Axis Radiusradius of cylinder Heightdistance between faces on positive side //! ErrorsHeight < Resolution Radius < Resolution
- param Position
- type Position
gp_Ax2
- param Radius
- type Radius
float
- param Height
- type Height
float
- rtype
None* infinite Cylinder at origin on Z negative
- param Radius
- type Radius
float
- rtype
None* infinite Cylinder at Center on Z negative
- param Center
- type Center
gp_Pnt
- param Radius
- type Radius
float
- rtype
None* infinite Cylinder at Axes on Z negative
- param Axes
- type Axes
gp_Ax2
- param Radius
- type Radius
float
- rtype
None* create a Cylinder at origin on Z axis, of height H and radius R Error : Radius < Resolution H < Resolution H negative
- param R
- type R
float
- param H
- type H
float
- rtype
None* same as above but at a given point
- param Center
- type Center
gp_Pnt
- param R
- type R
float
- param H
- type H
float
- rtype
None
-
property
thisown
¶ The membership flag
-
class
BRepPrim_FaceBuilder
(*args)¶ Bases:
object
- Return type
None:param B: :type B: BRep_Builder :param S: :type S: Geom_Surface :rtype: None:param B: :type B: BRep_Builder :param S: :type S: Geom_Surface :param UMin: :type UMin: float :param UMax: :type UMax: float :param VMin: :type VMin: float :param VMax: :type VMax: float :rtype: None
-
Edge
()¶ - Returns the edge of index <I> 1 - Edge VMin 2 - Edge UMax 3 - Edge VMax 4 - Edge UMin
- param I
- type I
int
- rtype
TopoDS_Edge
-
Face
()¶ - Return type
-
Init
()¶ - Parameters
B –
- type B
BRep_Builder
- param S
- type S
Geom_Surface
- rtype
None:param B:
- type B
BRep_Builder
- param S
- type S
Geom_Surface
- param UMin
- type UMin
float
- param UMax
- type UMax
float
- param VMin
- type VMin
float
- param VMax
- type VMax
float
- rtype
None
-
Vertex
()¶ - Returns the vertex of index <I> 1 - Vertex UMin,VMin 2 - Vertex UMax,VMin 3 - Vertex UMax,VMax 4 - Vertex UMin,VMax
- param I
- type I
int
- rtype
TopoDS_Vertex
-
property
thisown
¶ The membership flag
-
class
BRepPrim_GWedge
(*args)¶ Bases:
object
- 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 positive
- param B
- type B
BRepPrim_Builder
- param Axes
- type Axes
gp_Ax2
- param dx
- type dx
float
- param dy
- type dy
float
- param dz
- type dz
float
- rtype
None* 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 negative
- param B
- type B
BRepPrim_Builder
- param Axes
- type Axes
gp_Ax2
- param dx
- type dx
float
- param dy
- type dy
float
- param dz
- type dz
float
- param ltx
- type ltx
float
- rtype
None* 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 negative
- param B
- type B
BRepPrim_Builder
- param Axes
- type Axes
gp_Ax2
- param xmin
- type xmin
float
- param ymin
- type ymin
float
- param zmin
- type zmin
float
- param z2min
- type z2min
float
- param x2min
- type x2min
float
- param xmax
- type xmax
float
- param ymax
- type ymax
float
- param zmax
- type zmax
float
- param z2max
- type z2max
float
- param x2max
- type x2max
float
- rtype
None
-
Axes
()¶ - Returns the coordinates system from <self>.
- rtype
gp_Ax2
-
Close
()¶ - Closes <self> in <d1> direction. A face and its edges or vertices are said existant.
- param d1
- type d1
BRepPrim_Direction
- rtype
None
-
Edge
()¶ - Returns the Edge of <self> located in <d1><d2> direction.
- param d1
- type d1
BRepPrim_Direction
- param d2
- type d2
BRepPrim_Direction
- rtype
TopoDS_Edge
-
Face
()¶ - Returns the Face of <self> located in <d1> direction.
- param d1
- type d1
BRepPrim_Direction
- rtype
TopoDS_Face
-
GetX2Max
()¶ - Returns X2Max value from <self>.
- rtype
float
-
GetX2Min
()¶ - Returns X2Min value from <self>.
- rtype
float
-
GetXMax
()¶ - Returns XMax value from <self>.
- rtype
float
-
GetXMin
()¶ - Returns Xmin value from <self>.
- rtype
float
-
GetYMax
()¶ - Returns YMax value from <self>.
- rtype
float
-
GetYMin
()¶ - Returns YMin value from <self>.
- rtype
float
-
GetZ2Max
()¶ - Returns Z2Max value from <self>.
- rtype
float
-
GetZ2Min
()¶ - Returns Z2Min value from <self>.
- rtype
float
-
GetZMax
()¶ - Returns ZMax value from <self>.
- rtype
float
-
GetZMin
()¶ - Returns ZMin value from <self>.
- rtype
float
-
HasEdge
()¶ - Returns True if <self> has an Edge in <d1><d2> direction.
- param d1
- type d1
BRepPrim_Direction
- param d2
- type d2
BRepPrim_Direction
- rtype
bool
-
HasFace
()¶ - Returns True if <self> has a Face in <d1> direction.
- param d1
- type d1
BRepPrim_Direction
- rtype
bool
-
HasVertex
()¶ - Returns True if <self> has a Vertex in <d1><d2><d3> direction.
- param d1
- type d1
BRepPrim_Direction
- param d2
- type d2
BRepPrim_Direction
- param d3
- type d3
BRepPrim_Direction
- rtype
bool
-
HasWire
()¶ - Returns True if <self> has a Wire in <d1> direction.
- param d1
- type d1
BRepPrim_Direction
- rtype
bool
-
IsInfinite
()¶ - Returns True if <self> is open in <d1> direction.
- param d1
- type d1
BRepPrim_Direction
- rtype
bool
-
Line
()¶ - Returns the line of the Edge of <self> located in <d1><d2> direction.
- param d1
- type d1
BRepPrim_Direction
- param d2
- type d2
BRepPrim_Direction
- rtype
gp_Lin
-
Open
()¶ - Opens <self> in <d1> direction. A face and its edges or vertices are said nonexistant.
- param d1
- type d1
BRepPrim_Direction
- rtype
None
-
Plane
()¶ - Returns the plane of the Face of <self> located in <d1> direction.
- param d1
- type d1
BRepPrim_Direction
- rtype
gp_Pln
-
Point
()¶ - Returns the point of the Vertex of <self> located in <d1><d2><d3> direction.
- param d1
- type d1
BRepPrim_Direction
- param d2
- type d2
BRepPrim_Direction
- param d3
- type d3
BRepPrim_Direction
- rtype
gp_Pnt
-
Shell
()¶ - Returns the Shell containing the Faces of <self>.
- rtype
TopoDS_Shell
-
Vertex
()¶ - Returns the Vertex of <self> located in <d1><d2><d3> direction.
- param d1
- type d1
BRepPrim_Direction
- param d2
- type d2
BRepPrim_Direction
- param d3
- type d3
BRepPrim_Direction
- rtype
TopoDS_Vertex
-
Wire
()¶ - Returns the Wire of <self> located in <d1> direction.
- param d1
- type d1
BRepPrim_Direction
- rtype
TopoDS_Wire
-
property
thisown
¶ The membership flag
-
class
BRepPrim_OneAxis
(*args, **kwargs)¶ Bases:
object
-
Angle
()¶ - Return type
float:param A: :type A: float :rtype: None
-
Axes
()¶ - Returns the Ax2 from <self>.
- rtype
gp_Ax2:param A:
- type A
gp_Ax2
- rtype
None
-
AxisBottomVertex
()¶ - Returns the Vertex at the Bottom altitude on the axis.
- rtype
TopoDS_Vertex
-
AxisEdge
()¶ - Returns the Edge built along the Axis and oriented on +Z of the Axis.
- rtype
TopoDS_Edge
-
AxisEndWire
()¶ - Returns the Wire in the end face with the AxisEdge.
- rtype
TopoDS_Wire
-
AxisStartWire
()¶ - Returns the wire in the start face with the AxisEdge.
- rtype
TopoDS_Wire
-
AxisTopVertex
()¶ - Returns the Vertex at the Top altitude on the axis.
- rtype
TopoDS_Vertex
-
BottomEdge
()¶ - Returns the edge at VMin. If MeridianClosed() the TopEdge and the BottomEdge are the same edge.
- rtype
TopoDS_Edge
-
BottomEndVertex
()¶ - Returns the vertex (angle,VMax)
- rtype
TopoDS_Vertex
-
BottomFace
()¶ - Returns the Bottom planar Face. It is Oriented toward the -Z axis (outside).
- rtype
TopoDS_Face
-
BottomStartVertex
()¶ - Returns the vertex (0,VMin)
- rtype
TopoDS_Vertex
-
BottomWire
()¶ - Returns the wire in the bottom face.
- rtype
TopoDS_Wire
-
EndBottomEdge
()¶ - Returns the linear Edge between end Face and bottom Face.
- rtype
TopoDS_Edge
-
EndEdge
()¶ - Returns the Edge at angle Angle. If !HasSides() the StartEdge and the EndEdge are the same edge.
- rtype
TopoDS_Edge
-
EndFace
()¶ - Returns the Face ending the slice, it is oriented toward the exterior of the primitive.
- rtype
TopoDS_Face
-
EndTopEdge
()¶ - Returns the linear Edge between end Face and top Face.
- rtype
TopoDS_Edge
-
EndWire
()¶ - Returns the Wire in the end face.
- rtype
TopoDS_Wire
-
HasBottom
()¶ - Returns True if there is a bottom face. //! That is neitherVMinInfinite() MeridianClosed() MeridianOnAxis(VMin)
- rtype
bool
-
HasSides
()¶ - Returns True if there are Start and End faces. //! That is2*PI - Angle > Precision::Angular()
- rtype
bool
-
HasTop
()¶ - Returns True if there is a top face. //! That is neitherVMaxInfinite() MeridianClosed() MeridianOnAxis(VMax)
- rtype
bool
-
LateralEndWire
()¶ - Returns the wire with in lateral face with the end edge.
- rtype
TopoDS_Wire
-
LateralFace
()¶ - Returns the lateral Face. It is oriented toward the outside of the primitive.
- rtype
TopoDS_Face
-
LateralStartWire
()¶ - Returns the wire in the lateral face with the start edge.
- rtype
TopoDS_Wire
-
LateralWire
()¶ - Returns the wire in the lateral face.
- rtype
TopoDS_Wire
-
MakeEmptyLateralFace
()¶ - 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.
- rtype
TopoDS_Face
-
MakeEmptyMeridianEdge
()¶ - 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.
- param Ang
- type Ang
float
- rtype
TopoDS_Edge
-
MeridianClosed
()¶ - Returns True if the meridian is closed. Default implementation is MeridianValue(VMin).IsEqual(MeridianValue(VMax), Precision::Confusion())
- rtype
bool
-
MeridianOnAxis
()¶ - Returns True if the point of parameter <V> on the meridian is on the Axis. Default implementation is Abs(MeridianValue(V).X()) < Precision::Confusion()
- param V
- type V
float
- rtype
bool
-
MeridianValue
()¶ - Returns the meridian point at parameter <V> in the plane XZ.
- param V
- type V
float
- rtype
gp_Pnt2d
-
SetMeridianOffset
()¶ - 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.
- param MeridianOffset
default value is 0
- type MeridianOffset
float
- rtype
None
-
SetMeridianPCurve
()¶ - Sets the parametric curve of the edge <E> in the face <F> to be the 2d representation of the meridian.
- param E
- type E
TopoDS_Edge
- param F
- type F
TopoDS_Face
- rtype
void
-
Shell
()¶ - Returns the Shell containing all the Faces of the primitive.
- rtype
TopoDS_Shell
-
StartBottomEdge
()¶ - Returns the linear Edge between start Face and bottom Face.
- rtype
TopoDS_Edge
-
StartEdge
()¶ - Returns the Edge at angle 0.
- rtype
TopoDS_Edge
-
StartFace
()¶ - Returns the Face starting the slice, it is oriented toward the exterior of the primitive.
- rtype
TopoDS_Face
-
StartTopEdge
()¶ - Returns the linear Edge between start Face and top Face.
- rtype
TopoDS_Edge
-
StartWire
()¶ - Returns the wire in the start face.
- rtype
TopoDS_Wire
-
TopEdge
()¶ - Returns the edge at VMax. If MeridianClosed() the TopEdge and the BottomEdge are the same edge.
- rtype
TopoDS_Edge
-
TopEndVertex
()¶ - Returns the vertex (angle,VMax)
- rtype
TopoDS_Vertex
-
TopFace
()¶ - Returns the top planar Face. It is Oriented toward the +Z axis (outside).
- rtype
TopoDS_Face
-
TopStartVertex
()¶ - Returns the vertex (0,VMax)
- rtype
TopoDS_Vertex
-
TopWire
()¶ - Returns the wire in the top face.
- rtype
TopoDS_Wire
-
VMax
()¶ - Return type
float:param V: :type V: float :rtype: None
-
VMaxInfinite
()¶ - Returns True if VMax is infinite. Default Precision::IsPositiveInfinite(VMax);
- rtype
bool
-
VMin
()¶ - Return type
float:param V: :type V: float :rtype: None
-
VMinInfinite
()¶ - Returns True if VMin is infinite. Default Precision::IsNegativeInfinite(VMax);
- rtype
bool
-
property
thisown
¶ The membership flag
-
-
class
BRepPrim_Revolution
(*args)¶ Bases:
OCC.Core.BRepPrim.BRepPrim_OneAxis
- Create a revolution body <M> is the meridian nd must be in the XZ plane of <A>. <PM> is the meridian in the XZ plane.
- param A
- type A
gp_Ax2
- param VMin
- type VMin
float
- param VMax
- type VMax
float
- param M
- type M
Geom_Curve
- param PM
- type PM
Geom2d_Curve
- rtype
None
-
property
thisown
¶ The membership flag
-
class
BRepPrim_Sphere
(*args)¶ Bases:
OCC.Core.BRepPrim.BRepPrim_Revolution
- 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.
- param Radius
- type Radius
float
- rtype
None* Creates a Sphere with Center and Radius. Axes are the referrence axes. This is the STEP constructor.
- param Center
- type Center
gp_Pnt
- param Radius
- type Radius
float
- rtype
None* Creates a sphere with given axes system.
- param Axes
- type Axes
gp_Ax2
- param Radius
- type Radius
float
- rtype
None
-
property
thisown
¶ The membership flag
-
class
BRepPrim_Torus
(*args)¶ Bases:
OCC.Core.BRepPrim.BRepPrim_Revolution
- the STEP definition Positioncenter and axes Major, MinorRadii //! ErrorsMajor < Resolution Minor < Resolution
- param Position
- type Position
gp_Ax2
- param Major
- type Major
float
- param Minor
- type Minor
float
- rtype
None* Torus centered at origin
- param Major
- type Major
float
- param Minor
- type Minor
float
- rtype
None* Torus at Center
- param Center
- type Center
gp_Pnt
- param Major
- type Major
float
- param Minor
- type Minor
float
- rtype
None
-
property
thisown
¶ The membership flag
-
class
BRepPrim_Wedge
(*args)¶ Bases:
OCC.Core.BRepPrim.BRepPrim_GWedge
- 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 positive
- param Axes
- type Axes
gp_Ax2
- param dx
- type dx
float
- param dy
- type dy
float
- param dz
- type dz
float
- rtype
None* 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 negative
- param Axes
- type Axes
gp_Ax2
- param dx
- type dx
float
- param dy
- type dy
float
- param dz
- type dz
float
- param ltx
- type ltx
float
- rtype
None* 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 negative
- param Axes
- type Axes
gp_Ax2
- param xmin
- type xmin
float
- param ymin
- type ymin
float
- param zmin
- type zmin
float
- param z2min
- type z2min
float
- param x2min
- type x2min
float
- param xmax
- type xmax
float
- param ymax
- type ymax
float
- param zmax
- type zmax
float
- param z2max
- type z2max
float
- param x2max
- type x2max
float
- rtype
None
-
property
thisown
¶ The membership flag