# OCC.BRepPrim module

class `BRepPrim_Builder`(*args)

  Bases: `object`

  - Creates an empty, useless Builder. Necesseray for compilation.

  Return type: | None

  - Creates from a Builder.

  Parameters: | B (BRep_Builder &) –
  Return type: | 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.

    Parameters: | E (TopoDS_Edge &) – V (TopoDS_Vertex &) – P (float) – direct (bool) –
    Return type: | None

    - Adds the Vertex <V> in the Edge <E>. <P1,P2> are the parameters of the vertex on the closed edge.

    Parameters: | E (TopoDS_Edge &) – V (TopoDS_Vertex &) – P1 (float) – P2 (float) –
    Return type: | None

  `AddFaceWire`()
    - Adds the Wire <W> in the Face <F>.

    Parameters: | F (TopoDS_Face &) – W (TopoDS_Wire &) –
    Return type: | None

  `AddShellFace`()
    - Adds the Face <F> in the Shell <Sh>.

    Parameters: | Sh (TopoDS_Shell &) – F (TopoDS_Face &) –
    Return type: | None

  `AddWireEdge`()
    - Adds the Edge <E> in the Wire <W>, if direct is False the Edge is reversed.

    Parameters: | W (TopoDS_Wire &) – E (TopoDS_Edge &) – direct (bool) –
    Return type: | None

  `Builder`()

    Return type: | BRep_Builder

  `CompleteEdge`()
    - This is called once an edge is completed. It gives the opportunity to perform any post treatment.

    Parameters: | E (TopoDS_Edge &) –
    Return type: | None

  `CompleteFace`()
    - This is called once a face is completed. It gives the opportunity to perform any post treatment.

    Parameters: | F (TopoDS_Face &) –
    Return type: | None

  `CompleteShell`()
    - This is called once a shell is completed. It gives the opportunity to perform any post treatment.

    Parameters: | S (TopoDS_Shell &) –
    Return type: | None

  `CompleteWire`()
    - This is called once a wire is completed. It gives the opportunity to perform any post treatment.

    Parameters: | W (TopoDS_Wire &) –
    Return type: | None

  `MakeDegeneratedEdge`()
    - Returns in <E> a degenerated edge.

    Parameters: | E (TopoDS_Edge &) –
    Return type: | None

  `MakeEdge`()
    - Returns in <E> an Edge built with the line equation <L>.

    Parameters: | E (TopoDS_Edge &) – L (gp_Lin) –
    Return type: | None

    - Returns in <E> an Edge built with the circle equation <C>.

    Parameters: | E (TopoDS_Edge &) – C (gp_Circ) –
    Return type: | None

  `MakeFace`()
    - Returns in <F> a Face built with the plane equation <P>. Used by all primitives.

    Parameters: | F (TopoDS_Face &) – P (gp_Pln) –
    Return type: | None

  `MakeShell`()
    - Make a empty Shell.

    Parameters: | S (TopoDS_Shell &) –
    Return type: | None

  `MakeVertex`()
    - Returns in <V> a Vertex built with the point <P>.

    Parameters: | V (TopoDS_Vertex &) – P (gp_Pnt) –
    Return type: | None

  `MakeWire`()
    - Returns in <W> an empty Wire.

    Parameters: | W (TopoDS_Wire &) –
    Return type: | None

  `ReverseFace`()
    - Reverses the Face <F>.

    Parameters: | F (TopoDS_Face &) –
    Return type: | None

  `SetPCurve`()
    - Sets the line <L> to be the curve representing the edge <E> in the parametric space of the surface of <F>.

    Parameters: | E (TopoDS_Edge &) – F (TopoDS_Face &) – L (gp_Lin2d) –
    Return type: | None

    - Sets the lines <L1,L2> to be the curves representing the edge <E> in the parametric space of the closed surface of <F>.

    Parameters: | E (TopoDS_Edge &) – F (TopoDS_Face &) – L1 (gp_Lin2d) – L2 (gp_Lin2d) –
    Return type: | None

    - Sets the circle <C> to be the curve representing the edge <E> in the parametric space of the surface of <F>.

    Parameters: | E (TopoDS_Edge &) – F (TopoDS_Face &) – C (gp_Circ2d) –
    Return type: | None

  `SetParameters`()
    - <P1,P2> are the parameters of the vertex on the edge. The edge is a closed curve.

    Parameters: | E (TopoDS_Edge &) – V (TopoDS_Vertex &) – P1 (float) – P2 (float) –
    Return type: | None

  `thisown`

    The membership flag

class `BRepPrim_Cone`(*args)

  Bases: `OCC.BRepPrim.BRepPrim_Revolution`

  - 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 / Height

  Parameters: | Angle (float) – Position (gp_Ax2) – Height (float) – Radius (float) – default value is 0
  Return type: | None

  - infinite cone at origin on Z negative

  Parameters: | Angle (float) –
  Return type: | None

  - infinite cone at Apex on Z negative

  Parameters: | Angle (float) – Apex (gp_Pnt) –
  Return type: | None

  - infinite cone with Axes

  Parameters: | Angle (float) – Axes (gp_Ax2) –
  Return type: | 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

  Parameters: | R1 (float) – R2 (float) – H (float) –
  Return type: | None

  - same as above but at a given point

  Parameters: | Center (gp_Pnt) – R1 (float) – R2 (float) – H (float) –
  Return type: | None

  - same as above with given axes system.

  Parameters: | Axes (gp_Ax2) – R1 (float) – R2 (float) – H (float) –
  Return type: | None

  `thisown`

    The membership flag

class `BRepPrim_Cylinder`(*args)

  Bases: `OCC.BRepPrim.BRepPrim_Revolution`

  - 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 < Resolution

  Parameters: | Position (gp_Ax2) – Radius (float) – Height (float) –
  Return type: | None

  - infinite Cylinder at origin on Z negative

  Parameters: | Radius (float) –
  Return type: | None

  - infinite Cylinder at Center on Z negative

  Parameters: | Center (gp_Pnt) – Radius (float) –
  Return type: | None

  - infinite Cylinder at Axes on Z negative

  Parameters: | Axes (gp_Ax2) – Radius (float) –
  Return type: | None

  - create a Cylinder at origin on Z axis, of height H and radius R Error : Radius < Resolution H < Resolution H negative

  Parameters: | R (float) – H (float) –
  Return type: | None

  - same as above but at a given point

  Parameters: | Center (gp_Pnt) – R (float) – H (float) –
  Return type: | None

  `thisown`

    The membership flag

class `BRepPrim_FaceBuilder`(*args)

  Bases: `object`

  Return type: | None
  Parameters: | B (BRep_Builder &) – S (Handle_Geom_Surface &) – B – S – UMin (float) – UMax (float) – VMin (float) – VMax (float) –
  Return type: | None
  Return type: | None

  `Edge`()
    - Returns the edge of index <I> 1 - Edge VMin 2 - Edge UMax 3 - Edge VMax 4 - Edge UMin

    Parameters: | I (int) –
    Return type: | TopoDS_Edge

  `Face`()

    Return type: | TopoDS_Face

  `Init`()

    Parameters: | B (BRep_Builder &) – S (Handle_Geom_Surface &) – B – S – UMin (float) – UMax (float) – VMin (float) – VMax (float) –
    Return type: | None
    Return type: | None

  `Vertex`()
    - Returns the vertex of index <I> 1 - Vertex UMin,VMin 2 - Vertex UMax,VMin 3 - Vertex UMax,VMax 4 - Vertex UMin,VMax

    Parameters: | I (int) –
    Return type: | TopoDS_Vertex

  `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

  Parameters: | B (BRepPrim_Builder &) – Axes (gp_Ax2) – dx (float) – dy (float) – dz (float) –
  Return type: | 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

  Parameters: | B (BRepPrim_Builder &) – Axes (gp_Ax2) – dx (float) – dy (float) – dz (float) – ltx (float) –
  Return type: | 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

  Parameters: | B (BRepPrim_Builder &) – Axes (gp_Ax2) – xmin (float) – ymin (float) – zmin (float) – z2min (float) – x2min (float) – xmax (float) – ymax (float) – zmax (float) – z2max (float) – x2max (float) –
  Return type: | None

  `Axes`()
    - Returns the coordinates system from <self>.

    Return type: | gp_Ax2

  `Close`()
    - Closes <self> in <d1> direction. A face and its edges or vertices are said existant.

    Parameters: | d1 (BRepPrim_Direction) –
    Return type: | None

  `Edge`()
    - Returns the Edge of <self> located in <d1><d2> direction.

    Parameters: | d1 (BRepPrim_Direction) – d2 (BRepPrim_Direction) –
    Return type: | TopoDS_Edge

  `Face`()
    - Returns the Face of <self> located in <d1> direction.

    Parameters: | d1 (BRepPrim_Direction) –
    Return type: | TopoDS_Face

  `GetX2Max`()
    - Returns X2Max value from <self>.

    Return type: | float

  `GetX2Min`()
    - Returns X2Min value from <self>.

    Return type: | float

  `GetXMax`()
    - Returns XMax value from <self>.

    Return type: | float

  `GetXMin`()
    - Returns Xmin value from <self>.

    Return type: | float

  `GetYMax`()
    - Returns YMax value from <self>.

    Return type: | float

  `GetYMin`()
    - Returns YMin value from <self>.

    Return type: | float

  `GetZ2Max`()
    - Returns Z2Max value from <self>.

    Return type: | float

  `GetZ2Min`()
    - Returns Z2Min value from <self>.

    Return type: | float

  `GetZMax`()
    - Returns ZMax value from <self>.

    Return type: | float

  `GetZMin`()
    - Returns ZMin value from <self>.

    Return type: | float

  `HasEdge`()
    - Returns True if <self> has an Edge in <d1><d2> direction.

    Parameters: | d1 (BRepPrim_Direction) – d2 (BRepPrim_Direction) –
    Return type: | bool

  `HasFace`()
    - Returns True if <self> has a Face in <d1> direction.

    Parameters: | d1 (BRepPrim_Direction) –
    Return type: | bool

  `HasVertex`()
    - Returns True if <self> has a Vertex in <d1><d2><d3> direction.

    Parameters: | d1 (BRepPrim_Direction) – d2 (BRepPrim_Direction) – d3 (BRepPrim_Direction) –
    Return type: | bool

  `HasWire`()
    - Returns True if <self> has a Wire in <d1> direction.

    Parameters: | d1 (BRepPrim_Direction) –
    Return type: | bool

  `IsInfinite`()
    - Returns True if <self> is open in <d1> direction.

    Parameters: | d1 (BRepPrim_Direction) –
    Return type: | bool

  `Line`()
    - Returns the line of the Edge of <self> located in <d1><d2> direction.

    Parameters: | d1 (BRepPrim_Direction) – d2 (BRepPrim_Direction) –
    Return type: | gp_Lin

  `Open`()
    - Opens <self> in <d1> direction. A face and its edges or vertices are said nonexistant.

    Parameters: | d1 (BRepPrim_Direction) –
    Return type: | None

  `Plane`()
    - Returns the plane of the Face of <self> located in <d1> direction.

    Parameters: | d1 (BRepPrim_Direction) –
    Return type: | gp_Pln

  `Point`()
    - Returns the point of the Vertex of <self> located in <d1><d2><d3> direction.

    Parameters: | d1 (BRepPrim_Direction) – d2 (BRepPrim_Direction) – d3 (BRepPrim_Direction) –
    Return type: | gp_Pnt

  `Shell`()
    - Returns the Shell containing the Faces of <self>.

    Return type: | TopoDS_Shell

  `Vertex`()
    - Returns the Vertex of <self> located in <d1><d2><d3> direction.

    Parameters: | d1 (BRepPrim_Direction) – d2 (BRepPrim_Direction) – d3 (BRepPrim_Direction) –
    Return type: | TopoDS_Vertex

  `Wire`()
    - Returns the Wire of <self> located in <d1> direction.

    Parameters: | d1 (BRepPrim_Direction) –
    Return type: | TopoDS_Wire

  `thisown`

    The membership flag

class `BRepPrim_OneAxis`(*args, **kwargs)

  Bases: `object`

  `Angle`()

    Return type: | float
    Parameters: | A (float) –
    Return type: | None

  `Axes`()
    - Returns the Ax2 from <self>.

    Return type: | gp_Ax2
    Parameters: | A (gp_Ax2) –
    Return type: | None

  `AxisBottomVertex`()
    - Returns the Vertex at the Bottom altitude on the axis.

    Return type: | TopoDS_Vertex

  `AxisEdge`()
    - Returns the Edge built along the Axis and oriented on +Z of the Axis.

    Return type: | TopoDS_Edge

  `AxisEndWire`()
    - Returns the Wire in the end face with the AxisEdge.

    Return type: | TopoDS_Wire

  `AxisStartWire`()
    - Returns the wire in the start face with the AxisEdge.

    Return type: | TopoDS_Wire

  `AxisTopVertex`()
    - Returns the Vertex at the Top altitude on the axis.

    Return type: | TopoDS_Vertex

  `BottomEdge`()
    - Returns the edge at VMin. If MeridianClosed() the TopEdge and the BottomEdge are the same edge.

    Return type: | TopoDS_Edge

  `BottomEndVertex`()
    - Returns the vertex (angle,VMax)

    Return type: | TopoDS_Vertex

  `BottomFace`()
    - Returns the Bottom planar Face. It is Oriented toward the -Z axis (outside).

    Return type: | TopoDS_Face

  `BottomStartVertex`()
    - Returns the vertex (0,VMin)

    Return type: | TopoDS_Vertex

  `BottomWire`()
    - Returns the wire in the bottom face.

    Return type: | TopoDS_Wire

  `Delete`()

    Return type: | void

  `EndBottomEdge`()
    - Returns the linear Edge between end Face and bottom Face.

    Return type: | TopoDS_Edge

  `EndEdge`()
    - Returns the Edge at angle Angle. If !HasSides() the StartEdge and the EndEdge are the same edge.

    Return type: | TopoDS_Edge

  `EndFace`()
    - Returns the Face ending the slice, it is oriented toward the exterior of the primitive.

    Return type: | TopoDS_Face

  `EndTopEdge`()
    - Returns the linear Edge between end Face and top Face.

    Return type: | TopoDS_Edge

  `EndWire`()
    - Returns the Wire in the end face.

    Return type: | TopoDS_Wire

  `HasBottom`()
    - Returns True if there is a bottom face. //! That is neither : VMinInfinite() MeridianClosed() MeridianOnAxis(VMin)

    Return type: | bool

  `HasSides`()
    - Returns True if there are Start and End faces. //! That is : 2*PI - Angle > Precision::Angular()

    Return type: | bool

  `HasTop`()
    - Returns True if there is a top face. //! That is neither : VMaxInfinite() MeridianClosed() MeridianOnAxis(VMax)

    Return type: | bool

  `LateralEndWire`()
    - Returns the wire with in lateral face with the end edge.

    Return type: | TopoDS_Wire

  `LateralFace`()
    - Returns the lateral Face. It is oriented toward the outside of the primitive.

    Return type: | TopoDS_Face

  `LateralStartWire`()
    - Returns the wire in the lateral face with the start edge.

    Return type: | TopoDS_Wire

  `LateralWire`()
    - Returns the wire in the lateral face.

    Return type: | 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.

    Return type: | 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.

    Parameters: | Ang (float) –
    Return type: | TopoDS_Edge

  `MeridianClosed`()
    - Returns True if the meridian is closed. Default implementation is MeridianValue(VMin).IsEqual(MeridianValue(VMax), Precision::Confusion())

    Return type: | 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()

    Parameters: | V (float) –
    Return type: | bool

  `MeridianValue`()
    - Returns the meridian point at parameter <V> in the plane XZ.

    Parameters: | V (float) –
    Return type: | 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.

    Parameters: | MeridianOffset (float) – default value is 0
    Return type: | None

  `SetMeridianPCurve`()
    - Sets the parametric curve of the edge <E> in the face <F> to be the 2d representation of the meridian.

    Parameters: | E (TopoDS_Edge &) – F (TopoDS_Face &) –
    Return type: | void

  `Shell`()
    - Returns the Shell containing all the Faces of the primitive.

    Return type: | TopoDS_Shell

  `StartBottomEdge`()
    - Returns the linear Edge between start Face and bottom Face.

    Return type: | TopoDS_Edge

  `StartEdge`()
    - Returns the Edge at angle 0.

    Return type: | TopoDS_Edge

  `StartFace`()
    - Returns the Face starting the slice, it is oriented toward the exterior of the primitive.

    Return type: | TopoDS_Face

  `StartTopEdge`()
    - Returns the linear Edge between start Face and top Face.

    Return type: | TopoDS_Edge

  `StartWire`()
    - Returns the wire in the start face.

    Return type: | TopoDS_Wire

  `TopEdge`()
    - Returns the edge at VMax. If MeridianClosed() the TopEdge and the BottomEdge are the same edge.

    Return type: | TopoDS_Edge

  `TopEndVertex`()
    - Returns the vertex (angle,VMax)

    Return type: | TopoDS_Vertex

  `TopFace`()
    - Returns the top planar Face. It is Oriented toward the +Z axis (outside).

    Return type: | TopoDS_Face

  `TopStartVertex`()
    - Returns the vertex (0,VMax)

    Return type: | TopoDS_Vertex

  `TopWire`()
    - Returns the wire in the top face.

    Return type: | TopoDS_Wire

  `VMax`()

    Return type: | float
    Parameters: | V (float) –
    Return type: | None

  `VMaxInfinite`()
    - Returns True if VMax is infinite. Default Precision::IsPositiveInfinite(VMax);

    Return type: | bool

  `VMin`()

    Return type: | float
    Parameters: | V (float) –
    Return type: | None

  `VMinInfinite`()
    - Returns True if VMin is infinite. Default Precision::IsNegativeInfinite(VMax);

    Return type: | bool

  `thisown`

    The membership flag

class `BRepPrim_Revolution`(*args)

  Bases: `OCC.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.

  Parameters: | A (gp_Ax2) – VMin (float) – VMax (float) – M (Handle_Geom_Curve &) – PM (Handle_Geom2d_Curve &) –
  Return type: | None

  `thisown`

    The membership flag

class `BRepPrim_Sphere`(*args)

  Bases: `OCC.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.

  Parameters: | Radius (float) –
  Return type: | None

  - Creates a Sphere with Center and Radius. Axes are the referrence axes. This is the STEP constructor.

  Parameters: | Center (gp_Pnt) – Radius (float) –
  Return type: | None

  - Creates a sphere with given axes system.

  Parameters: | Axes (gp_Ax2) – Radius (float) –
  Return type: | None

  `thisown`

    The membership flag

class `BRepPrim_Torus`(*args)

  Bases: `OCC.BRepPrim.BRepPrim_Revolution`

  - the STEP definition Position : center and axes Major, Minor : Radii //! Errors : Major < Resolution Minor < Resolution

  Parameters: | Position (gp_Ax2) – Major (float) – Minor (float) –
  Return type: | None

  - Torus centered at origin

  Parameters: | Major (float) – Minor (float) –
  Return type: | None

  - Torus at Center

  Parameters: | Center (gp_Pnt) – Major (float) – Minor (float) –
  Return type: | None

  `thisown`

    The membership flag

class `BRepPrim_Wedge`(*args)

  Bases: `OCC.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

  Parameters: | Axes (gp_Ax2) – dx (float) – dy (float) – dz (float) –
  Return type: | 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

  Parameters: | Axes (gp_Ax2) – dx (float) – dy (float) – dz (float) – ltx (float) –
  Return type: | 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

  Parameters: | Axes (gp_Ax2) – xmin (float) – ymin (float) – zmin (float) – z2min (float) – x2min (float) – xmax (float) – ymax (float) – zmax (float) – z2max (float) – x2max (float) –
  Return type: | None

  `thisown`

    The membership flag

class `SwigPyIterator`(*args, **kwargs)

  Bases: `object`

  `advance`()
  `copy`()
  `decr`()
  `distance`()
  `equal`()
  `incr`()
  `next`()
  `previous`()
  `thisown`

    The membership flag

  `value`()

`register_handle`(handle, base_object)

  Inserts the handle into the base object to prevent memory corruption in certain cases