# OCC.BRepOffsetAPI module

class `BRepOffsetAPI_DraftAngle`(*args)

  Bases: `OCC.BRepBuilderAPI.BRepBuilderAPI_ModifyShape`

  - Constructs an empty algorithm to perform taper-adding transformations on faces of a shape. Use the Init function to define the shape to be tapered.

  Return type: | None

  - Initializes an algorithm to perform taper-adding transformations on faces of the shape S. S will be referred to as the initial shape of the algorithm.

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

  `Add`()
    - Adds the face F, the direction Direction, the angle Angle, the plane NeutralPlane, and the flag Flag to the framework created at construction time, and with this data, defines the taper-adding transformation. F is a face, which belongs to the initial shape of this algorithm or to the shape loaded by the function Init. Only planar, cylindrical or conical faces can be tapered: - If the face F is planar, it is tapered by inclining it through the angle Angle about the line of intersection between the plane NeutralPlane and F. Direction indicates the side of NeutralPlane from which matter is removed if Angle is positive or added if Angle is negative. - If F is cylindrical or conical, it is transformed in the same way on a single face, resulting in a conical face if F is cylindrical, and a conical or cylindrical face if it is already conical. The taper-adding transformation is propagated from the face F along the series of planar, cylindrical or conical faces containing F, which are tangential to one another. Use the function AddDone to check if this taper-adding transformation is successful. Warning Nothing is done if: - the face F does not belong to the initial shape of this algorithm, or - the face F is not planar, cylindrical or conical. Exceptions - Standard_NullObject if the initial shape is not defined, i.e. if this algorithm has not been initialized with the non-empty constructor or the Init function. - Standard_ConstructionError if the previous call to Add has failed. The function AddDone ought to have been used to check for this, and the function Remove to cancel the results of the unsuccessful taper-adding transformation and to retrieve the previous shape.

    Parameters: | F (TopoDS_Face &) – Direction (gp_Dir) – Angle (float) – NeutralPlane (gp_Pln) – Flag (bool) – default value is Standard_True
    Return type: | None

  `AddDone`()
    - Returns true if the previous taper-adding transformation performed by this algorithm in the last call to Add, was successful. If AddDone returns false: - the function ProblematicShape returns the face on which the error occurred, - the function Remove has to be used to cancel the results of the unsuccessful taper-adding transformation and to retrieve the previous shape. Exceptions Standard_NullObject if the initial shape has not been defined, i.e. if this algorithm has not been initialized with the non-empty constructor or the .Init function.

    Return type: | bool

  `Clear`()
    - Cancels the results of all taper-adding transformations performed by this algorithm on the initial shape. These results will have been defined by successive calls to the function Add.

    Return type: | None

  `ConnectedFaces`()
    - Returns all the faces which have been added together with the face <F>.

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

  `CorrectWires`()

    Return type: | None

  `Init`()
    - Initializes, or reinitializes this taper-adding algorithm with the shape S. S will be referred to as the initial shape of this algorithm.

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

  `ModifiedFaces`()
    - Returns all the faces on which a modification has been given.

    Return type: | TopTools_ListOfShape

  `ProblematicShape`()
    - Returns the shape on which an error occurred after an unsuccessful call to Add or when IsDone returns false. Exceptions Standard_NullObject if the initial shape has not been defined, i.e. if this algorithm has not been initialized with the non-empty constructor or the Init function.

    Return type: | TopoDS_Shape

  `Remove`()
    - Cancels the taper-adding transformation previously performed by this algorithm on the face F and the series of tangential faces which contain F, and retrieves the shape before the last taper-adding transformation. Warning You will have to use this function if the previous call to Add fails. Use the function AddDone to check it. Exceptions - Standard_NullObject if the initial shape has not been defined, i.e. if this algorithm has not been initialized with the non-empty constructor or the Init function. - Standard_NoSuchObject if F has not been added or has already been removed.

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

  `Status`()
    - Returns an error status when an error has occured (Face, Edge or Vertex recomputaion problem). Otherwise returns Draft_NoError. The method may be called if AddDone returns Standard_False, or when IsDone returns Standard_False.

    Return type: | Draft_ErrorStatus

  `thisown`

    The membership flag

class `BRepOffsetAPI_FindContigousEdges`(*args)

  Bases: `object`

  - Initializes an algorithm for identifying contiguous edges on shapes with tolerance as the tolerance of contiguity (defaulted to 1.0e-6). This tolerance value is used to determine whether two edges or sections of edges are coincident. Use the function Add to define the shapes to be checked. Set option to false. This argument (defaulted to true) will serve in subsequent software releases for performing an analysis of degenerated shapes.

  Parameters: | tolerance (float) – default value is 1.0e-06 option (bool) – default value is Standard_True
  Return type: | None

  `Add`()
    - Adds the shape shape to the list of shapes to be checked by this algorithm. Once all the shapes to be checked have been added, use the function Perform to find the contiguous edges and the function ContigousEdge to return these edges.

    Parameters: | shape (TopoDS_Shape &) –
    Return type: | None

  `ContigousEdge`()
    - Returns the contiguous edge of index index found by the function Perform on the shapes added to this algorithm. Exceptions Standard_OutOfRange if: - index is less than 1, or - index is greater than the number of contiguous edges found by the function Perform on the shapes added to this algorithm.

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

  `ContigousEdgeCouple`()
    - Returns a list of edges coincident with the contiguous edge of index index found by the function Perform. There are as many edges in the list as there are faces adjacent to this contiguous edge. Exceptions Standard_OutOfRange if: - index is less than 1, or - index is greater than the number of contiguous edges found by the function Perform on the shapes added to this algorithm.

    Parameters: | index (int) –
    Return type: | TopTools_ListOfShape

  `DegeneratedShape`()
    - Gives a degenerated shape

    Parameters: | index (int) –
    Return type: | TopoDS_Shape

  `Dump`()
    - Dump properties of resulting shape.

    Return type: | None

  `Init`()
    - Initializes this algorithm for identifying contiguous edges on shapes using the tolerance of contiguity tolerance. This tolerance value is used to determine whether two edges or sections of edges are coincident. Use the function Add to define the shapes to be checked. Sets <option> to false.

    Parameters: | tolerance (float) – option (bool) –
    Return type: | None

  `IsDegenerated`()
    - Indicates if a input shape is degenerated

    Parameters: | shape (TopoDS_Shape &) –
    Return type: | bool

  `IsModified`()
    - Returns true if the copy of the initial shape shape was modified by the function Perform (i.e. if one or more of its edges was broken down into contiguous and non-contiguous sections). Warning Returns false if shape is not one of the initial shapes added to this algorithm.

    Parameters: | shape (TopoDS_Shape &) –
    Return type: | bool

  `Modified`()
    - Gives a modifieded shape Raises NoSuchObject if shape has not been modified

    Parameters: | shape (TopoDS_Shape &) –
    Return type: | TopoDS_Shape

  `NbContigousEdges`()
    - Returns the number of contiguous edges found by the function Perform on the shapes added to this algorithm.

    Return type: | int

  `NbDegeneratedShapes`()
    - Gives the number of degenerated shapes

    Return type: | int

  `Perform`()
    - Finds coincident parts of edges of two or more shapes added to this algorithm and breaks down these edges into contiguous and non-contiguous sections on copies of the initial shapes. The function ContigousEdge returns contiguous edges. The function Modified can be used to return modified copies of the initial shapes where one or more edges were broken down into contiguous and non-contiguous sections. Warning This function must be used once all the shapes to be checked have been added. It is not possible to add further shapes subsequently and then to repeat the call to Perform.

    Return type: | None

  `SectionToBoundary`()
    - Returns the edge on the initial shape, of which the modified copy contains the edge section. section is coincident with a contiguous edge found by the function Perform. Use the function ContigousEdgeCouple to obtain a valid section. This information is useful for verification purposes, since it provides a means of determining the surface to which the contiguous edge belongs. Exceptions Standard_NoSuchObject if section is not coincident with a contiguous edge. Use the function ContigousEdgeCouple to obtain a valid section.

    Parameters: | section (TopoDS_Edge &) –
    Return type: | TopoDS_Edge

  `thisown`

    The membership flag

class `BRepOffsetAPI_MakeDraft`(*args)

  Bases: `OCC.BRepBuilderAPI.BRepBuilderAPI_MakeShape`

  - Constructs the draft surface object defined by the shape Shape, the direction Dir, and the angle Angle. Shape must be a TopoDS_Wire, Topo_DS_Face or TopoDS_Shell with free boundaries. Exceptions Standard_NotDone if Shape is not a TopoDS_Wire, Topo_DS_Face or TopoDS_Shell with free boundaries.

  Parameters: | Shape (TopoDS_Shape &) – Dir (gp_Dir) – Angle (float) –
  Return type: | None

  `Perform`()
    - Performs the draft using the length LengthMax as the maximum length for the corner edge between two draft faces.

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

    - Performs the draft up to the surface Surface. If KeepInsideSurface is true, the part of Surface inside the draft is kept in the result.

    Parameters: | Surface (Handle_Geom_Surface &) – KeepInsideSurface (bool) – default value is Standard_True
    Return type: | None

    - Performs the draft up to the shape StopShape. If KeepOutSide is true, the part of StopShape which is outside the Draft is kept in the result.

    Parameters: | StopShape (TopoDS_Shape &) – KeepOutSide (bool) – default value is Standard_True
    Return type: | None

  `SetDraft`()
    - Sets the direction of the draft for this object. If IsInternal is true, the draft is internal to the argument Shape used in the constructor.

    Parameters: | IsInternal (bool) – default value is Standard_False
    Return type: | None

  `SetOptions`()
    - Sets the options of this draft tool. If a transition has to be performed, it can be defined by the mode Style as RightCorner or RoundCorner, RightCorner being a corner defined by a sharp angle, and RoundCorner being a rounded corner. AngleMin is an angular tolerance used to detect whether a transition has to be performed or not. AngleMax sets the maximum value within which a RightCorner transition can be performed. AngleMin and AngleMax are expressed in radians.

    Parameters: | Style (BRepBuilderAPI_TransitionMode) – default value is BRepBuilderAPI_RightCorner AngleMin (float) – default value is 0.01 AngleMax (float) – default value is 3.0
    Return type: | None

  `Shell`()
    - Returns the shell resulting from performance of the draft along the wire.

    Return type: | TopoDS_Shell

  `thisown`

    The membership flag

class `BRepOffsetAPI_MakeEvolved`(*args)

  Bases: `OCC.BRepBuilderAPI.BRepBuilderAPI_MakeShape`

  Return type: | None
  Parameters: | Spine (TopoDS_Wire &) – Profil (TopoDS_Wire &) – Join (GeomAbs_JoinType) – default value is GeomAbs_Arc AxeProf (bool) – default value is Standard_True Solid (bool) – default value is Standard_False ProfOnSpine (bool) – default value is Standard_False Tol (float) – default value is 0.0000001
  Return type: | None

  - These constructors construct an evolved shape by sweeping the profile Profile along the spine Spine. The profile is defined in a coordinate system R. The coordinate system is determined by AxeProf: - if AxeProf is true, R is the global coordinate system, - if AxeProf is false, R is computed so that: - its origin is given by the point on the spine which is closest to the profile, - its ‘X Axis’ is given by the tangent to the spine at this point, and - its ‘Z Axis’ is the normal to the plane which contains the spine. The position of the profile at the current point of the spine is given by making R coincident with the local coordinate system given by the current point, the tangent vector and the normal to the spine. Join defines the type of pipe generated by the salient vertices of the spine. The default type is GeomAbs_Arc where the vertices generate revolved pipes about the axis passing along the vertex and the normal to the plane of the spine. At present, this is the only construction type implemented.

  Parameters: | Spine (TopoDS_Face &) – Profil (TopoDS_Wire &) – Join (GeomAbs_JoinType) – default value is GeomAbs_Arc AxeProf (bool) – default value is Standard_True Solid (bool) – default value is Standard_False ProfOnSpine (bool) – default value is Standard_False Tol (float) – default value is 0.0000001
  Return type: | None

  `Bottom`()
    - Return the face Bottom if <Solid> is True in the constructor.

    Return type: | TopoDS_Shape

  `Evolved`()

    Return type: | BRepFill_Evolved

  `GeneratedShapes`()
    - Returns the shapes created from a subshape <SpineShape> of the spine and a subshape <ProfShape> on the profile.

    Parameters: | SpineShape (TopoDS_Shape &) – ProfShape (TopoDS_Shape &) –
    Return type: | TopTools_ListOfShape

  `Top`()
    - Return the face Top if <Solid> is True in the constructor.

    Return type: | TopoDS_Shape

  `thisown`

    The membership flag

class `BRepOffsetAPI_MakeFilling`(*args)

  Bases: `OCC.BRepBuilderAPI.BRepBuilderAPI_MakeShape`

  - Constructs a wire filling object defined by - the energy minimizing criterion Degree - the number of points on the curve NbPntsOnCur - the number of iterations NbIter - the Boolean Anisotropie - the 2D tolerance Tol2d - the 3D tolerance Tol3d - the angular tolerance TolAng - the tolerance for curvature TolCur - the highest polynomial degree MaxDeg - the greatest number of segments MaxSeg. If the Boolean Anistropie is true, the algorithm’s performance is better in cases where the ratio of the length U and the length V indicate a great difference between the two. In other words, when the surface is, for example, extremely long.

  Parameters: | Degree (int) – default value is 3 NbPtsOnCur (int) – default value is 15 NbIter (int) – default value is 2 Anisotropie (bool) – default value is Standard_False Tol2d (float) – default value is 0.00001 Tol3d (float) – default value is 0.0001 TolAng (float) – default value is 0.01 TolCurv (float) – default value is 0.1 MaxDeg (int) – default value is 8 MaxSegments (int) – default value is 9
  Return type: | None

  `Add`()
    - Adds a new constraint which also defines an edge of the wire of the face Order: Order of the constraint: GeomAbs_C0 : the surface has to pass by 3D representation of the edge GeomAbs_G1 : the surface has to pass by 3D representation of the edge and to respect tangency with the first face of the edge GeomAbs_G2 : the surface has to pass by 3D representation of the edge and to respect tangency and curvature with the first face of the edge. Raises ConstructionError if the edge has no representation on a face and Order is GeomAbs_G1 or GeomAbs_G2.

    Parameters: | Constr (TopoDS_Edge &) – Order (GeomAbs_Shape) – IsBound (bool) – default value is Standard_True
    Return type: | int

    - Adds a new constraint which also defines an edge of the wire of the face Order: Order of the constraint: GeomAbs_C0 : the surface has to pass by 3D representation of the edge GeomAbs_G1 : the surface has to pass by 3D representation of the edge and to respect tangency with the given face GeomAbs_G2 : the surface has to pass by 3D representation of the edge and to respect tangency and curvature with the given face. Raises ConstructionError if the edge has no 2d representation on the given face

    Parameters: | Constr (TopoDS_Edge &) – Support (TopoDS_Face &) – Order (GeomAbs_Shape) – IsBound (bool) – default value is Standard_True
    Return type: | int

    - Adds a free constraint on a face. The corresponding edge has to be automatically recomputed. It is always a bound.

    Parameters: | Support (TopoDS_Face &) – Order (GeomAbs_Shape) –
    Return type: | int

    - Adds a punctual constraint.

    Parameters: | Point (gp_Pnt) –
    Return type: | int

    - Adds a punctual constraint.

    Parameters: | U (float) – V (float) – Support (TopoDS_Face &) – Order (GeomAbs_Shape) –
    Return type: | int

  `G0Error`()
    - Returns the maximum distance between the result and the constraints. This is set at construction time.

    Return type: | float

    - Returns the maximum distance attained between the result and the constraint Index. This is set at construction time.

    Parameters: | Index (int) –
    Return type: | float

  `G1Error`()
    - Returns the maximum angle between the result and the constraints. This is set at construction time.

    Return type: | float

    - Returns the maximum angle between the result and the constraints. This is set at construction time.

    Parameters: | Index (int) –
    Return type: | float

  `G2Error`()
    - Returns the maximum angle between the result and the constraints. This is set at construction time.

    Return type: | float

    - Returns the greatest difference in curvature found between the result and the constraint Index.

    Parameters: | Index (int) –
    Return type: | float

  `LoadInitSurface`()
    - Loads the initial surface Surf to begin the construction of the surface. This optional function is useful if the surface resulting from construction for the algorithm is likely to be complex. The support surface of the face under construction is computed by a deformation of Surf which satisfies the given constraints. The set of bounding edges defines the wire of the face. If no initial surface is given, the algorithm computes it automatically. If the set of edges is not connected (Free constraint), missing edges are automatically computed. Important: the initial surface must have orthogonal local coordinates, i.e. partial derivatives dS/du and dS/dv must be orthogonal at each point of surface. If this condition breaks, distortions of resulting surface are possible.

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

  `SetApproxParam`()
    - Sets the parameters used to approximate the filling surface. These include: - MaxDeg - the highest degree which the polynomial defining the filling surface can have - MaxSegments - the greatest number of segments which the filling surface can have.

    Parameters: | MaxDeg (int) – default value is 8 MaxSegments (int) – default value is 9
    Return type: | None

  `SetConstrParam`()
    - Sets the values of Tolerances used to control the constraint. Tol2d: Tol3d: it is the maximum distance allowed between the support surface and the constraints TolAng: it is the maximum angle allowed between the normal of the surface and the constraints TolCurv: it is the maximum difference of curvature allowed between the surface and the constraint

    Parameters: | Tol2d (float) – default value is 0.00001 Tol3d (float) – default value is 0.0001 TolAng (float) – default value is 0.01 TolCurv (float) – default value is 0.1
    Return type: | None

  `SetResolParam`()
    - Sets the parameters used for resolution. The default values of these parameters have been chosen for a good ratio quality/performance. Degree: it is the order of energy criterion to minimize for computing the deformation of the surface. The default value is 3 The recommanded value is i+2 where i is the maximum order of the constraints. NbPtsOnCur: it is the average number of points for discretisation of the edges. NbIter: it is the maximum number of iterations of the process. For each iteration the number of discretisation points is increased. Anisotropie:

    Parameters: | Degree (int) – default value is 3 NbPtsOnCur (int) – default value is 15 NbIter (int) – default value is 2 Anisotropie (bool) – default value is Standard_False
    Return type: | None

  `thisown`

    The membership flag

class `BRepOffsetAPI_MakeOffset`(*args)

  Bases: `OCC.BRepBuilderAPI.BRepBuilderAPI_MakeShape`

  - Constructs an algorithm for creating an empty offset

  Return type: | None

  - Constructs an algorithm for creating an algorithm to build parallels to the spine Spine

  Parameters: | Spine (TopoDS_Wire &) – Join (GeomAbs_JoinType) – default value is GeomAbs_Arc IsOpenResult (bool) – default value is Standard_False Spine – Join – default value is GeomAbs_Arc IsOpenResult – default value is Standard_False
  Return type: | None
  Return type: | None

  `AddWire`()
    - Initializes the algorithm to construct parallels to the wire Spine.

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

  `Init`()
    - Initializes the algorithm to construct parallels to the spine Spine. Join defines the type of parallel generated by the salient vertices of the spine. The default type is GeomAbs_Arc where the vertices generate sections of a circle. If join type is GeomAbs_Intersection, the edges that intersect in a salient vertex generate the edges prolonged until intersection.

    Parameters: | Spine (TopoDS_Face &) – Join (GeomAbs_JoinType) – default value is GeomAbs_Arc IsOpenResult (bool) – default value is Standard_False
    Return type: | None

    - Initialize the evaluation of Offseting.

    Parameters: | Join (GeomAbs_JoinType) – default value is GeomAbs_Arc IsOpenResult (bool) – default value is Standard_False
    Return type: | None

  `Perform`()
    - Computes a parallel to the spine at distance Offset and at an altitude Alt from the plane of the spine in relation to the normal to the spine. Exceptions: StdFail_NotDone if the offset is not built.

    Parameters: | Offset (float) – Alt (float) – default value is 0.0
    Return type: | None

  `thisown`

    The membership flag

class `BRepOffsetAPI_MakeOffsetShape`(*args)

  Bases: `OCC.BRepBuilderAPI.BRepBuilderAPI_MakeShape`

  Return type: | None

  - Constructs a shape parallel to the shape S, where - S may be a face, a shell, a solid or a compound of these shape kinds; - Offset is the offset value. The offset shape is constructed: - outside S, if Offset is positive, - inside S, if Offset is negative; - Tol defines the coincidence tolerance criterion for generated shapes; - Mode defines the construction type of parallels applied to the free edges of shape S; currently, only one construction type is implemented, namely the one where the free edges do not generate parallels; this corresponds to the default value BRepOffset_Skin; - Intersection specifies how the algorithm must work in order to limit the parallels to two adjacent shapes: - if Intersection is false (default value), the intersection is calculated with the parallels to the two adjacent shapes, - if Intersection is true, the intersection is calculated by taking all generated parallels into account; this computation method is more general as it avoids some self-intersections generated in the offset shape from features of small dimensions on shape S, however this method has not been completely implemented and therefore is not recommended for use; - SelfInter tells the algorithm whether a computation to eliminate self-intersections must be applied to the resulting shape; however, as this functionality is not yet implemented, it is recommended to use the default value (false); - Join defines how to fill the holes that may appear between parallels to the two adjacent faces. It may take values GeomAbs_Arc or GeomAbs_Intersection: - if Join is equal to GeomAbs_Arc, then pipes are generated between two free edges of two adjacent parallels, and spheres are generated on ‘images’ of vertices; it is the default value, - if Join is equal to GeomAbs_Intersection, then the parallels to the two adjacent faces are enlarged and intersected, so that there are no free edges on parallels to faces. Warnings 1. All the faces of the shape S should be based on the surfaces with continuity at least C1. 2. The offset value should be sufficiently small to avoid self-intersections in resulting shape. Otherwise these self-intersections may appear inside an offset face if its initial surface is not plane or sphere or cylinder, also some non-adjacent offset faces may intersect each other. Also, some offset surfaces may ‘turn inside out’. 3. The algorithm may fail if the shape S contains vertices where more than 3 edges converge. 4. Since 3d-offset algorithm involves intersection of surfaces, it is under limitations of surface intersection algorithm. 5. A result cannot be generated if the underlying geometry of S is BSpline with continuity C0. Exceptions Geom_UndefinedDerivative if the underlying geometry of S is BSpline with continuity C0.

  Parameters: | S (TopoDS_Shape &) – Offset (float) – Tol (float) – Mode (BRepOffset_Mode) – default value is BRepOffset_Skin Intersection (bool) – default value is Standard_False SelfInter (bool) – default value is Standard_False Join (GeomAbs_JoinType) – default value is GeomAbs_Arc
  Return type: | None

  `GeneratedEdge`()
    - Returns the list of edges generated from the shape <S>.

    Parameters: | S (TopoDS_Shape &) –
    Return type: | TopTools_ListOfShape

  `GetJoinType`()
    - Returns offset join type.

    Return type: | GeomAbs_JoinType

  `MakeOffset`()

    Return type: | BRepOffset_MakeOffset

  `thisown`

    The membership flag

class `BRepOffsetAPI_MakePipe`(*args)

  Bases: `OCC.BRepPrimAPI.BRepPrimAPI_MakeSweep`

  - Constructs a pipe by sweeping the shape Profile along the wire Spine.The angle made by the spine with the profile is maintained along the length of the pipe. Warning Spine must be G1 continuous; that is, on the connection vertex of two edges of the wire, the tangent vectors on the left and on the right must have the same direction, though not necessarily the same magnitude. Exceptions Standard_DomainError if the profile is a solid or a composite solid.

  Parameters: | Spine (TopoDS_Wire &) – Profile (TopoDS_Shape &) –
  Return type: | None

  - the same as previous but with setting of mode of sweep and the flag that indicates attempt to approximate a C1-continuous surface if a swept surface proved to be C0.

  Parameters: | Spine (TopoDS_Wire &) – Profile (TopoDS_Shape &) – aMode (GeomFill_Trihedron) – ForceApproxC1 (bool) – default value is Standard_False
  Return type: | None

  `ErrorOnSurface`()

    Return type: | float

  `Generated`()

    Parameters: | SSpine (TopoDS_Shape &) – SProfile (TopoDS_Shape &) –
    Return type: | TopoDS_Shape

  `Pipe`()

    Return type: | BRepFill_Pipe

  `thisown`

    The membership flag

class `BRepOffsetAPI_MakePipeShell`(*args)

  Bases: `OCC.BRepPrimAPI.BRepPrimAPI_MakeSweep`

  - Constructs the shell-generating framework defined by the wire Spine. Sets an sweep’s mode If no mode are setted, the mode use in MakePipe is used

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

  `Add`()
    - Adds the section Profile to this framework. First and last sections may be punctual, so the shape Profile may be both wire and vertex. Correspondent point on spine is computed automatically. If WithContact is true, the section is translated to be in contact with the spine. If WithCorrection is true, the section is rotated to be orthogonal to the spine?s tangent in the correspondent point. This option has no sense if the section is punctual (Profile is of type TopoDS_Vertex).

    Parameters: | Profile (TopoDS_Shape &) – WithContact (bool) – default value is Standard_False WithCorrection (bool) – default value is Standard_False
    Return type: | None

    - Adds the section Profile to this framework. Correspondent point on the spine is given by Location. Warning: To be effective, it is not recommended to combine methods Add and SetLaw.

    Parameters: | Profile (TopoDS_Shape &) – Location (TopoDS_Vertex &) – WithContact (bool) – default value is Standard_False WithCorrection (bool) – default value is Standard_False
    Return type: | None

  `Delete`()
    - Removes the section Profile from this framework.

    Parameters: | Profile (TopoDS_Shape &) –
    Return type: | None

  `ErrorOnSurface`()

    Return type: | float

  `GetStatus`()
    - Get a status, when Simulate or Build failed. It can be BRepBuilderAPI_PipeDone, BRepBuilderAPI_PipeNotDone, BRepBuilderAPI_PlaneNotIntersectGuide, BRepBuilderAPI_ImpossibleContact.

    Return type: | BRepBuilderAPI_PipeError

  `IsReady`()
    - Returns true if this tool object is ready to build the shape, i.e. has a definition for the wire section Profile.

    Return type: | bool

  `MakeSolid`()
    - Transforms the sweeping Shell in Solid. If a propfile is not closed returns False

    Return type: | bool

  `SetDiscreteMode`()
    - Sets a Discrete trihedron to perform the sweeping

    Return type: | None

  `SetForceApproxC1`()
    - Set the flag that indicates attempt to approximate a C1-continuous surface if a swept surface proved to be C0.

    Parameters: | ForceApproxC1 (bool) –
    Return type: | None

  `SetLaw`()
    - Sets the evolution law defined by the wire Profile with its position (Location, WithContact, WithCorrection are the same options as in methods Add) and a homotetic law defined by the function L. Warning: To be effective, it is not recommended to combine methods Add and SetLaw.

    Parameters: | Profile (TopoDS_Shape &) – L (Handle_Law_Function &) – WithContact (bool) – default value is Standard_False WithCorrection (bool) – default value is Standard_False
    Return type: | None

    - Sets the evolution law defined by the wire Profile with its position (Location, WithContact, WithCorrection are the same options as in methods Add) and a homotetic law defined by the function L. Warning: To be effective, it is not recommended to combine methods Add and SetLaw.

    Parameters: | Profile (TopoDS_Shape &) – L (Handle_Law_Function &) – Location (TopoDS_Vertex &) – WithContact (bool) – default value is Standard_False WithCorrection (bool) – default value is Standard_False
    Return type: | None

  `SetMaxDegree`()
    - Define the maximum V degree of resulting surface

    Parameters: | NewMaxDegree (int) –
    Return type: | None

  `SetMaxSegments`()
    - Define the maximum number of spans in V-direction on resulting surface

    Parameters: | NewMaxSegments (int) –
    Return type: | None

  `SetMode`()
    - Sets a Frenet or a CorrectedFrenet trihedron to perform the sweeping If IsFrenet is false, a corrected Frenet trihedron is used.

    Parameters: | IsFrenet (bool) – default value is Standard_False
    Return type: | None

    - Sets a fixed trihedron to perform the sweeping all sections will be parallel.

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

    - Sets a fixed BiNormal direction to perform the – sweeping. Angular relations beetween the section(s) and <BiNormal> will be constant

    Parameters: | BiNormal (gp_Dir) –
    Return type: | None

    - Sets support to the spine to define the BiNormal of the trihedron, like the normal to the surfaces. Warning: To be effective, Each edge of the <spine> must have an representaion on one face of<SpineSupport>

    Parameters: | SpineSupport (TopoDS_Shape &) –
    Return type: | bool

    - Sets an auxiliary spine to define the Normal For each Point of the Spine P, an Point Q is evalued on <AuxiliarySpine> If <CurvilinearEquivalence> Q split <AuxiliarySpine> with the same length ratio than P split <Spline>. Else the plan define by P and the tangent to the <Spine> intersect <AuxiliarySpine> in Q. If <KeepContact> equals BRepFill_NoContact: The Normal is defined by the vector PQ. If <KeepContact> equals BRepFill_Contact: The Normal is defined to achieve that the sweeped section is in contact to the auxiliarySpine. The width of section is constant all along the path. In other words, the auxiliary spine lies on the swept surface, but not necessarily is a boundary of this surface. However, the auxiliary spine has to be close enough to the main spine to provide intersection with any section all along the path. If <KeepContact> equals BRepFill_ContactOnBorder: The auxiliary spine becomes a boundary of the swept surface and the width of section varies along the path. Give section to sweep. Possibilities are : - Give one or sevral section - Give one profile and an homotetic law. - Automatic compute of correspondance beetween spine, and section on the sweeped shape - correspondance beetween spine, and section on the sweeped shape defined by a vertex of the spine

    Parameters: | AuxiliarySpine (TopoDS_Wire &) – CurvilinearEquivalence (bool) – KeepContact (BRepFill_TypeOfContact) – default value is BRepFill_NoContact
    Return type: | None

  `SetTolerance`()
    - Sets the following tolerance values - 3D tolerance Tol3d - boundary tolerance BoundTol - angular tolerance TolAngular.

    Parameters: | Tol3d (float) – default value is 1.0e-4 BoundTol (float) – default value is 1.0e-4 TolAngular (float) – default value is 1.0e-2
    Return type: | None

  `SetTransitionMode`()
    - Sets the transition mode to manage discontinuities on the swept shape caused by fractures on the spine. The transition mode can be BRepBuilderAPI_Transformed (default value), BRepBuilderAPI_RightCorner, BRepBuilderAPI_RoundCorner: - RepBuilderAPI_Transformed: discontinuities are treated by modification of the sweeping mode. The pipe is ‘transformed’ at the fractures of the spine. This mode assumes building a self-intersected shell. - BRepBuilderAPI_RightCorner: discontinuities are treated like right corner. Two pieces of the pipe corresponding to two adjacent segments of the spine are extended and intersected at a fracture of the spine. - BRepBuilderAPI_RoundCorner: discontinuities are treated like round corner. The corner is treated as rotation of the profile around an axis which passes through the point of the spine?s fracture. This axis is based on cross product of directions tangent to the adjacent segments of the spine at their common point. Warnings The mode BRepBuilderAPI_RightCorner provides a valid result if intersection of two pieces of the pipe (corresponding to two adjacent segments of the spine) in the neighborhood of the spine?s fracture is connected and planar. This condition can be violated if the spine is non-linear in some neighborhood of the fracture or if the profile was set with a scaling law. The last mode, BRepBuilderAPI_RoundCorner, will assuredly provide a good result only if a profile was set with option WithCorrection = True, i.e. it is strictly orthogonal to the spine.

    Parameters: | Mode (BRepBuilderAPI_TransitionMode) – default value is BRepBuilderAPI_Transformed
    Return type: | None

  `Simulate`()
    - Simulates the resulting shape by calculating its cross-sections. The spine is devided by this cross-sections into (NumberOfSection - 1) equal parts, the number of cross-sections is NumberOfSection. The cross-sections are wires and they are returned in the list Result. This gives a rapid preview of the resulting shape, which will be obtained using the settings you have provided. Raises NotDone if <self> it is not Ready

    Parameters: | NumberOfSection (int) – Result (TopTools_ListOfShape &) –
    Return type: | None

  `thisown`

    The membership flag

class `BRepOffsetAPI_MakeThickSolid`(*args)

  Bases: `OCC.BRepOffsetAPI.BRepOffsetAPI_MakeOffsetShape`

  Return type: | None

  - Constructs a hollowed solid from the solid S by removing the set of faces ClosingFaces from S, where: Offset defines the thickness of the walls. Its sign indicates which side of the surface of the solid the hollowed shape is built on; - Tol defines the tolerance criterion for coincidence in generated shapes; - Mode defines the construction type of parallels applied to free edges of shape S. Currently, only one construction type is implemented, namely the one where the free edges do not generate parallels; this corresponds to the default value BRepOffset_Skin; Intersection specifies how the algorithm must work in order to limit the parallels to two adjacent shapes: - if Intersection is false (default value), the intersection is calculated with the parallels to the two adjacent shapes, - if Intersection is true, the intersection is calculated by taking account of all parallels generated; this computation method is more general as it avoids self-intersections generated in the offset shape from features of small dimensions on shape S, however this method has not been completely implemented and therefore is not recommended for use; - SelfInter tells the algorithm whether a computation to eliminate self-intersections needs to be applied to the resulting shape. However, as this functionality is not yet implemented, you should use the default value (false); - Join defines how to fill the holes that may appear between parallels to the two adjacent faces. It may take values GeomAbs_Arc or GeomAbs_Intersection: - if Join is equal to GeomAbs_Arc, then pipes are generated between two free edges of two adjacent parallels, and spheres are generated on ‘images’ of vertices; it is the default value, - if Join is equal to GeomAbs_Intersection, then the parallels to the two adjacent faces are enlarged and intersected, so that there are no free edges on parallels to faces. Warnings Since the algorithm of MakeThickSolid is based on MakeOffsetShape algorithm, the warnings are the same as for MakeOffsetShape.

  Parameters: | S (TopoDS_Shape &) – ClosingFaces (TopTools_ListOfShape &) – Offset (float) – Tol (float) – Mode (BRepOffset_Mode) – default value is BRepOffset_Skin Intersection (bool) – default value is Standard_False SelfInter (bool) – default value is Standard_False Join (GeomAbs_JoinType) – default value is GeomAbs_Arc
  Return type: | None

  `thisown`

    The membership flag

class `BRepOffsetAPI_MiddlePath`(*args)

  Bases: `OCC.BRepBuilderAPI.BRepBuilderAPI_MakeShape`

  - General constructor. StartShape and EndShape may be a wire or a face

  Parameters: | aShape (TopoDS_Shape &) – StartShape (TopoDS_Shape &) – EndShape (TopoDS_Shape &) –
  Return type: | None

  `thisown`

    The membership flag

class `BRepOffsetAPI_NormalProjection`(*args)

  Bases: `OCC.BRepBuilderAPI.BRepBuilderAPI_MakeShape`

  - Constructs an empty framework to define projection on a shape according to the normal from each point to be projected to the shape.

  Return type: | None

  - Constructs a framework to define projection onto the basis shape S according to the normal from each point to be projected from the shape added to this framework by Add. Default parameters of the algorithm: Tol3D = 1.e-04, Tol2D =sqr(tol3d) , InternalContinuity = GeomAbs_C2, MaxDegree = 14, MaxSeg = 16.

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

  `Add`()
    - Adds the shape ToProj to the framework for calculation of the projection by Compute3d. ToProj is an edge or a wire and will be projected onto the basis shape. Exceptions Standard_ConstructionError if ToProj is not added.

    Parameters: | ToProj (TopoDS_Shape &) –
    Return type: | None

  `Ancestor`()
    - Returns the initial edge corresponding to the edge E resulting from the computation of the projection. Exceptions StdFail_NotDone if no edge was found. Standard_NoSuchObject if an edge corresponding to E has already been found.

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

  `BuildWire`()
    - build the result as a list of wire if possible in – a first returns a wire only if there is only a wire.

    Parameters: | Liste (TopTools_ListOfShape &) –
    Return type: | bool

  `Compute3d`()
    - Returns true if a 3D curve is computed. If not, false is returned and an initial 3D curve is kept to build the resulting edges.

    Parameters: | With3d (bool) – default value is Standard_True
    Return type: | None

  `Couple`()
    - Returns the initial face corresponding to the projected edge E. Exceptions StdFail_NotDone if no face was found. Standard_NoSuchObject if if a face corresponding to E has already been found.

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

  `Init`()
    - Initializes the empty constructor framework with the shape S.

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

  `Projection`()
    - Performs the projection. The construction of the result is performed by Build. Exceptions StdFail_NotDone if the projection was not performed.

    Return type: | TopoDS_Shape

  `SetLimit`()
    - Manage limitation of projected edges.

    Parameters: | FaceBoundaries (bool) – default value is Standard_True
    Return type: | None

  `SetMaxDistance`()
    - Sets the maximum distance between target shape and shape to project. If this condition is not satisfied then corresponding part of solution is discarded. if MaxDist < 0 then this method does not affect the algorithm

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

  `SetParams`()
    - Sets the parameters used for computation Tol3 is the requiered tolerance between the 3d projected curve and its 2d representation InternalContinuity is the order of constraints used for approximation MaxDeg and MaxSeg are the maximum degree and the maximum number of segment for BSpline resulting of an approximation.

    Parameters: | Tol3D (float) – Tol2D (float) – InternalContinuity (GeomAbs_Shape) – MaxDegree (int) – MaxSeg (int) –
    Return type: | None

  `thisown`

    The membership flag

class `BRepOffsetAPI_SequenceNodeOfSequenceOfSequenceOfReal`(*args)

  Bases: `OCC.TCollection.TCollection_SeqNode`

  Parameters: | I (TColStd_SequenceOfReal &) – n (TCollection_SeqNodePtr &) – p (TCollection_SeqNodePtr &) –
  Return type: | None

  `GetHandle`()
  `Value`()

    Return type: | TColStd_SequenceOfReal

  `thisown`

    The membership flag

class `BRepOffsetAPI_SequenceNodeOfSequenceOfSequenceOfShape`(*args)

  Bases: `OCC.TCollection.TCollection_SeqNode`

  Parameters: | I (TopTools_SequenceOfShape &) – n (TCollection_SeqNodePtr &) – p (TCollection_SeqNodePtr &) –
  Return type: | None

  `GetHandle`()
  `Value`()

    Return type: | TopTools_SequenceOfShape

  `thisown`

    The membership flag

class `BRepOffsetAPI_SequenceOfSequenceOfReal`(*args)

  Bases: `OCC.TCollection.TCollection_BaseSequence`

  Return type: | None
  Parameters: | Other (BRepOffsetAPI_SequenceOfSequenceOfReal &) –
  Return type: | None

  `Append`()

    Parameters: | T (TColStd_SequenceOfReal &) – S (BRepOffsetAPI_SequenceOfSequenceOfReal &) –
    Return type: | None
    Return type: | None

  `Assign`()

    Parameters: | Other (BRepOffsetAPI_SequenceOfSequenceOfReal &) –
    Return type: | BRepOffsetAPI_SequenceOfSequenceOfReal

  `ChangeValue`()

    Parameters: | Index (int) –
    Return type: | TColStd_SequenceOfReal

  `Clear`()

    Return type: | None

  `First`()

    Return type: | TColStd_SequenceOfReal

  `InsertAfter`()

    Parameters: | Index (int) – T (TColStd_SequenceOfReal &) – Index – S (BRepOffsetAPI_SequenceOfSequenceOfReal &) –
    Return type: | None
    Return type: | None

  `InsertBefore`()

    Parameters: | Index (int) – T (TColStd_SequenceOfReal &) – Index – S (BRepOffsetAPI_SequenceOfSequenceOfReal &) –
    Return type: | None
    Return type: | None

  `Last`()

    Return type: | TColStd_SequenceOfReal

  `Prepend`()

    Parameters: | T (TColStd_SequenceOfReal &) – S (BRepOffsetAPI_SequenceOfSequenceOfReal &) –
    Return type: | None
    Return type: | None

  `Remove`()

    Parameters: | Index (int) – FromIndex (int) – ToIndex (int) –
    Return type: | None
    Return type: | None

  `Set`()

    Parameters: | Other (BRepOffsetAPI_SequenceOfSequenceOfReal &) –
    Return type: | BRepOffsetAPI_SequenceOfSequenceOfReal

  `SetValue`()

    Parameters: | Index (int) – I (TColStd_SequenceOfReal &) –
    Return type: | None

  `Split`()

    Parameters: | Index (int) – Sub (BRepOffsetAPI_SequenceOfSequenceOfReal &) –
    Return type: | None

  `Value`()

    Parameters: | Index (int) –
    Return type: | TColStd_SequenceOfReal

  `thisown`

    The membership flag

class `BRepOffsetAPI_SequenceOfSequenceOfShape`(*args)

  Bases: `OCC.TCollection.TCollection_BaseSequence`

  Return type: | None
  Parameters: | Other (BRepOffsetAPI_SequenceOfSequenceOfShape &) –
  Return type: | None

  `Append`()

    Parameters: | T (TopTools_SequenceOfShape &) – S (BRepOffsetAPI_SequenceOfSequenceOfShape &) –
    Return type: | None
    Return type: | None

  `Assign`()

    Parameters: | Other (BRepOffsetAPI_SequenceOfSequenceOfShape &) –
    Return type: | BRepOffsetAPI_SequenceOfSequenceOfShape

  `ChangeValue`()

    Parameters: | Index (int) –
    Return type: | TopTools_SequenceOfShape

  `Clear`()

    Return type: | None

  `First`()

    Return type: | TopTools_SequenceOfShape

  `InsertAfter`()

    Parameters: | Index (int) – T (TopTools_SequenceOfShape &) – Index – S (BRepOffsetAPI_SequenceOfSequenceOfShape &) –
    Return type: | None
    Return type: | None

  `InsertBefore`()

    Parameters: | Index (int) – T (TopTools_SequenceOfShape &) – Index – S (BRepOffsetAPI_SequenceOfSequenceOfShape &) –
    Return type: | None
    Return type: | None

  `Last`()

    Return type: | TopTools_SequenceOfShape

  `Prepend`()

    Parameters: | T (TopTools_SequenceOfShape &) – S (BRepOffsetAPI_SequenceOfSequenceOfShape &) –
    Return type: | None
    Return type: | None

  `Remove`()

    Parameters: | Index (int) – FromIndex (int) – ToIndex (int) –
    Return type: | None
    Return type: | None

  `Set`()

    Parameters: | Other (BRepOffsetAPI_SequenceOfSequenceOfShape &) –
    Return type: | BRepOffsetAPI_SequenceOfSequenceOfShape

  `SetValue`()

    Parameters: | Index (int) – I (TopTools_SequenceOfShape &) –
    Return type: | None

  `Split`()

    Parameters: | Index (int) – Sub (BRepOffsetAPI_SequenceOfSequenceOfShape &) –
    Return type: | None

  `Value`()

    Parameters: | Index (int) –
    Return type: | TopTools_SequenceOfShape

  `thisown`

    The membership flag

class `BRepOffsetAPI_ThruSections`(*args)

  Bases: `OCC.BRepBuilderAPI.BRepBuilderAPI_MakeShape`

  - Initializes an algorithm for building a shell or a solid passing through a set of sections, where: - isSolid is set to true if the construction algorithm is required to build a solid or to false if it is required to build a shell (the default value), - ruled is set to true if the faces generated between the edges of two consecutive wires are ruled surfaces or to false (the default value) if they are smoothed out by approximation, - pres3d defines the precision criterion used by the approximation algorithm; the default value is 1.0e-6. Use AddWire and AddVertex to define the successive sections of the shell or solid to be built.

  Parameters: | isSolid (bool) – default value is Standard_False ruled (bool) – default value is Standard_False pres3d (float) – default value is 1.0e-06
  Return type: | None

  `AddVertex`()
    - Adds the vertex Vertex (punctual section) to the set of sections through which the shell or solid is built. A vertex may be added to the set of sections only as first or last section. At least one wire must be added to the set of sections by the method AddWire. Use the Build function to construct the shape.

    Parameters: | aVertex (TopoDS_Vertex &) –
    Return type: | None

  `AddWire`()
    - Adds the wire wire to the set of sections through which the shell or solid is built. Use the Build function to construct the shape.

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

  `CheckCompatibility`()
    - Sets/unsets the option to compute origin and orientation on wires to avoid twisted results and update wires to have same number of edges.

    Parameters: | check (bool) – default value is Standard_True
    Return type: | None

  `Continuity`()
    - returns the Continuity used in the approximation

    Return type: | GeomAbs_Shape

  `CriteriumWeight`()
    - returns the Weights associed to the criterium used in the optimization.

    Parameters: | W1 (float &) – W2 (float &) – W3 (float &) –
    Return type: | None

  `FirstShape`()
    - Returns the TopoDS Shape of the bottom of the loft if solid

    Return type: | TopoDS_Shape

  `GeneratedFace`()
    - if Ruled Returns the Face generated by each edge except the last wire if smoothed Returns the Face generated by each edge of the first wire

    Parameters: | Edge (TopoDS_Shape &) –
    Return type: | TopoDS_Shape

  `Init`()
    - Initializes this algorithm for building a shell or a solid passing through a set of sections, where: - isSolid is set to true if this construction algorithm is required to build a solid or to false if it is required to build a shell. false is the default value; - ruled is set to true if the faces generated between the edges of two consecutive wires are ruled surfaces or to false (the default value) if they are smoothed out by approximation, - pres3d defines the precision criterion used by the approximation algorithm; the default value is 1.0e-6. Use AddWire and AddVertex to define the successive sections of the shell or solid to be built.

    Parameters: | isSolid (bool) – default value is Standard_False ruled (bool) – default value is Standard_False pres3d (float) – default value is 1.0e-06
    Return type: | None

  `LastShape`()
    - Returns the TopoDS Shape of the top of the loft if solid

    Return type: | TopoDS_Shape

  `MaxDegree`()
    - returns the maximal U degree of result surface

    Return type: | int

  `ParType`()
    - returns the type of parametrization used in the approximation

    Return type: | Approx_ParametrizationType

  `SetContinuity`()
    - Define the Continuity used in the approximation

    Parameters: | C (GeomAbs_Shape) –
    Return type: | None

  `SetCriteriumWeight`()
    - define the Weights associed to the criterium used in the optimization. //! if Wi <= 0

    Parameters: | W1 (float) – W2 (float) – W3 (float) –
    Return type: | None

  `SetMaxDegree`()
    - Define the maximal U degree of result surface

    Parameters: | MaxDeg (int) –
    Return type: | None

  `SetParType`()
    - Define the type of parametrization used in the approximation

    Parameters: | ParType (Approx_ParametrizationType) –
    Return type: | None

  `SetSmoothing`()
    - Define the approximation algorithm

    Parameters: | UseSmoothing (bool) –
    Return type: | None

  `UseSmoothing`()
    - Define the approximation algorithm

    Return type: | bool

  `thisown`

    The membership flag

class `Handle_BRepOffsetAPI_SequenceNodeOfSequenceOfSequenceOfReal`(*args)

  Bases: `OCC.TCollection.Handle_TCollection_SeqNode`

  static `DownCast`()
  `GetObject`()
  `IsNull`()
  `Nullify`()
  `thisown`

    The membership flag

class `Handle_BRepOffsetAPI_SequenceNodeOfSequenceOfSequenceOfShape`(*args)

  Bases: `OCC.TCollection.Handle_TCollection_SeqNode`

  static `DownCast`()
  `GetObject`()
  `IsNull`()
  `Nullify`()
  `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