OCC.Core.BRepOffsetAPI module

BRepOffsetAPI module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_brepoffsetapi.html

class BRepOffsetAPI_DraftAngle(*args)

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

    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.

    param S

    type S

    TopoDS_Shape

    rtype

    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.
    param F

    type F

    TopoDS_Face

    param Direction

    type Direction

    gp_Dir

    param Angle

    type Angle

    float

    param NeutralPlane

    type NeutralPlane

    gp_Pln

    param Flag

    default value is Standard_True

    type Flag

    bool

    rtype

    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.
    rtype

    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.
    rtype

    None

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

    type F

    TopoDS_Face

    rtype

    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.
    param S

    type S

    TopoDS_Shape

    rtype

    None

ModifiedFaces()
  • Returns all the faces on which a modification has been given.
    rtype

    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.
    rtype

    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.
    param F

    type F

    TopoDS_Face

    rtype

    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.
    rtype

    Draft_ErrorStatus

property 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.
    param tolerance

    default value is 1.0e-06

    type tolerance

    float

    param option

    default value is Standard_True

    type option

    bool

    rtype

    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.
    param shape

    type shape

    TopoDS_Shape

    rtype

    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.
    param index

    type index

    int

    rtype

    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.
    param index

    type index

    int

    rtype

    TopTools_ListOfShape

DegeneratedShape()
  • Gives a degenerated shape
    param index

    type index

    int

    rtype

    TopoDS_Shape

Dump()
  • Dump properties of resulting shape.
    rtype

    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.
    param tolerance

    type tolerance

    float

    param option

    type option

    bool

    rtype

    None

IsDegenerated()
  • Indicates if a input shape is degenerated
    param shape

    type shape

    TopoDS_Shape

    rtype

    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.
    param shape

    type shape

    TopoDS_Shape

    rtype

    bool

Modified()
  • Gives a modifieded shape Raises NoSuchObject if shape has not been modified
    param shape

    type shape

    TopoDS_Shape

    rtype

    TopoDS_Shape

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

    int

NbDegeneratedShapes()
  • Gives the number of degenerated shapes
    rtype

    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.
    rtype

    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.
    param section

    type section

    TopoDS_Edge

    rtype

    TopoDS_Edge

property thisown

The membership flag

class BRepOffsetAPI_MakeDraft(*args)

Bases: OCC.Core.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.
    param Shape

    type Shape

    TopoDS_Shape

    param Dir

    type Dir

    gp_Dir

    param Angle

    type Angle

    float

    rtype

    None

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

    type LengthMax

    float

    rtype

    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.

    param Surface

    type Surface

    Geom_Surface

    param KeepInsideSurface

    default value is Standard_True

    type KeepInsideSurface

    bool

    rtype

    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.

    param StopShape

    type StopShape

    TopoDS_Shape

    param KeepOutSide

    default value is Standard_True

    type KeepOutSide

    bool

    rtype

    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.
    param IsInternal

    default value is Standard_False

    type IsInternal

    bool

    rtype

    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.
    param Style

    default value is BRepBuilderAPI_RightCorner

    type Style

    BRepBuilderAPI_TransitionMode

    param AngleMin

    default value is 0.01

    type AngleMin

    float

    param AngleMax

    default value is 3.0

    type AngleMax

    float

    rtype

    None

Shell()
  • Returns the shell resulting from performance of the draft along the wire.
    rtype

    TopoDS_Shell

property thisown

The membership flag

class BRepOffsetAPI_MakeEvolved(*args)

Bases: OCC.Core.BRepBuilderAPI.BRepBuilderAPI_MakeShape

Return type

None* Constructs an evolved shape by sweeping the profile (theProfile) along the spine (theSpine) theSpine can be shape only of type wire or face. See description to this class for detailed information. :param theSpine: :type theSpine: TopoDS_Shape :param theProfile: :type theProfile: TopoDS_Wire :param theJoinType: default value is GeomAbs_Arc :type theJoinType: GeomAbs_JoinType :param theIsAxeProf: default value is Standard_True :type theIsAxeProf: bool :param theIsSolid: default value is Standard_False :type theIsSolid: bool :param theIsProfOnSpine: default value is Standard_False :type theIsProfOnSpine: bool :param theTol: default value is 0.0000001 :type theTol: float :param theIsVolume: default value is Standard_False :type theIsVolume: bool :param theRunInParallel: default value is Standard_False :type theRunInParallel: bool :rtype: None

Bottom()
  • Return the face Bottom if <Solid> is True in the constructor.
    rtype

    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.
    param SpineShape

    type SpineShape

    TopoDS_Shape

    param ProfShape

    type ProfShape

    TopoDS_Shape

    rtype

    TopTools_ListOfShape

Top()
  • Return the face Top if <Solid> is True in the constructor.
    rtype

    TopoDS_Shape

property thisown

The membership flag

class BRepOffsetAPI_MakeFilling(*args)

Bases: OCC.Core.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.
    param Degree

    default value is 3

    type Degree

    int

    param NbPtsOnCur

    default value is 15

    type NbPtsOnCur

    int

    param NbIter

    default value is 2

    type NbIter

    int

    param Anisotropie

    default value is Standard_False

    type Anisotropie

    bool

    param Tol2d

    default value is 0.00001

    type Tol2d

    float

    param Tol3d

    default value is 0.0001

    type Tol3d

    float

    param TolAng

    default value is 0.01

    type TolAng

    float

    param TolCurv

    default value is 0.1

    type TolCurv

    float

    param MaxDeg

    default value is 8

    type MaxDeg

    int

    param MaxSegments

    default value is 9

    type MaxSegments

    int

    rtype

    None

Add()
  • Adds a new constraint which also defines an edge of the wire of the face Order: Order of the constraint: GeomAbs_C0the surface has to pass by 3D representation of the edge GeomAbs_G1the surface has to pass by 3D representation of the edge and to respect tangency with the first face of the edge GeomAbs_G2the 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.
    param Constr

    type Constr

    TopoDS_Edge

    param Order

    type Order

    GeomAbs_Shape

    param IsBound

    default value is Standard_True

    type IsBound

    bool

    rtype

    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

    param Constr

    type Constr

    TopoDS_Edge

    param Support

    type Support

    TopoDS_Face

    param Order

    type Order

    GeomAbs_Shape

    param IsBound

    default value is Standard_True

    type IsBound

    bool

    rtype

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

    param Support

    type Support

    TopoDS_Face

    param Order

    type Order

    GeomAbs_Shape

    rtype

    int* Adds a punctual constraint.

    param Point

    type Point

    gp_Pnt

    rtype

    int* Adds a punctual constraint.

    param U

    type U

    float

    param V

    type V

    float

    param Support

    type Support

    TopoDS_Face

    param Order

    type Order

    GeomAbs_Shape

    rtype

    int

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

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

    param Index

    type Index

    int

    rtype

    float

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

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

    param Index

    type Index

    int

    rtype

    float

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

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

    param Index

    type Index

    int

    rtype

    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.
    param Surf

    type Surf

    TopoDS_Face

    rtype

    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.
    param MaxDeg

    default value is 8

    type MaxDeg

    int

    param MaxSegments

    default value is 9

    type MaxSegments

    int

    rtype

    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
    param Tol2d

    default value is 0.00001

    type Tol2d

    float

    param Tol3d

    default value is 0.0001

    type Tol3d

    float

    param TolAng

    default value is 0.01

    type TolAng

    float

    param TolCurv

    default value is 0.1

    type TolCurv

    float

    rtype

    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:
    param Degree

    default value is 3

    type Degree

    int

    param NbPtsOnCur

    default value is 15

    type NbPtsOnCur

    int

    param NbIter

    default value is 2

    type NbIter

    int

    param Anisotropie

    default value is Standard_False

    type Anisotropie

    bool

    rtype

    None

property thisown

The membership flag

class BRepOffsetAPI_MakeOffset(*args)

Bases: OCC.Core.BRepBuilderAPI.BRepBuilderAPI_MakeShape

  • Constructs an algorithm for creating an empty offset
    rtype

    None* Constructs an algorithm for creating an algorithm to build parallels to the spine Spine

    param Spine

    type Spine

    TopoDS_Face

    param Join

    default value is GeomAbs_Arc

    type Join

    GeomAbs_JoinType

    param IsOpenResult

    default value is Standard_False

    type IsOpenResult

    bool

    rtype

    None:param Spine:

    type Spine

    TopoDS_Wire

    param Join

    default value is GeomAbs_Arc

    type Join

    GeomAbs_JoinType

    param IsOpenResult

    default value is Standard_False

    type IsOpenResult

    bool

    rtype

    None

AddWire()
  • Initializes the algorithm to construct parallels to the wire Spine.
    param Spine

    type Spine

    TopoDS_Wire

    rtype

    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.
    param Spine

    type Spine

    TopoDS_Face

    param Join

    default value is GeomAbs_Arc

    type Join

    GeomAbs_JoinType

    param IsOpenResult

    default value is Standard_False

    type IsOpenResult

    bool

    rtype

    None* Initialize the evaluation of Offseting.

    param Join

    default value is GeomAbs_Arc

    type Join

    GeomAbs_JoinType

    param IsOpenResult

    default value is Standard_False

    type IsOpenResult

    bool

    rtype

    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.
    param Offset

    type Offset

    float

    param Alt

    default value is 0.0

    type Alt

    float

    rtype

    None

property thisown

The membership flag

class BRepOffsetAPI_MakeOffsetShape(*args)

Bases: OCC.Core.BRepBuilderAPI.BRepBuilderAPI_MakeShape

  • Constructor does nothing.
    rtype

    None* Deprecated constructor. Please avoid usage of this constructor.

    param S

    type S

    TopoDS_Shape

    param Offset

    type Offset

    float

    param Tol

    type Tol

    float

    param Mode

    default value is BRepOffset_Skin

    type Mode

    BRepOffset_Mode

    param Intersection

    default value is Standard_False

    type Intersection

    bool

    param SelfInter

    default value is Standard_False

    type SelfInter

    bool

    param Join

    default value is GeomAbs_Arc

    type Join

    GeomAbs_JoinType

    param RemoveIntEdges

    default value is Standard_False

    type RemoveIntEdges

    bool

    rtype

    None

GeneratedEdge()
  • Returns the list of edges generated from the shape <S>.
    param S

    type S

    TopoDS_Shape

    rtype

    TopTools_ListOfShape

GetJoinType()
  • Returns offset join type.
    rtype

    GeomAbs_JoinType

MakeOffset()
  • Returns instance of the unrelying intersection / arc algorithm.
    rtype

    BRepOffset_MakeOffset

PerformByJoin()
  • 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. RemoveIntEdges flag defines whether to remove the INTERNAL edges from the result or not. 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.
    param S

    type S

    TopoDS_Shape

    param Offset

    type Offset

    float

    param Tol

    type Tol

    float

    param Mode

    default value is BRepOffset_Skin

    type Mode

    BRepOffset_Mode

    param Intersection

    default value is Standard_False

    type Intersection

    bool

    param SelfInter

    default value is Standard_False

    type SelfInter

    bool

    param Join

    default value is GeomAbs_Arc

    type Join

    GeomAbs_JoinType

    param RemoveIntEdges

    default value is Standard_False

    type RemoveIntEdges

    bool

    rtype

    None

PerformBySimple()
  • Constructs offset shape for the given one using simple algorithm without intersections computation.
    param theS

    type theS

    TopoDS_Shape

    param theOffsetValue

    type theOffsetValue

    float

    rtype

    None

property thisown

The membership flag

class BRepOffsetAPI_MakePipe(*args)

Bases: OCC.Core.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.
    param Spine

    type Spine

    TopoDS_Wire

    param Profile

    type Profile

    TopoDS_Shape

    rtype

    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.

    param Spine

    type Spine

    TopoDS_Wire

    param Profile

    type Profile

    TopoDS_Shape

    param aMode

    type aMode

    GeomFill_Trihedron

    param ForceApproxC1

    default value is Standard_False

    type ForceApproxC1

    bool

    rtype

    None

ErrorOnSurface()
Return type

float

Generated()
Parameters

S

type S

TopoDS_Shape

rtype

TopTools_ListOfShape:param SSpine:

type SSpine

TopoDS_Shape

param SProfile

type SProfile

TopoDS_Shape

rtype

TopoDS_Shape

Pipe()
Return type

BRepFill_Pipe

property thisown

The membership flag

class BRepOffsetAPI_MakePipeShell(*args)

Bases: OCC.Core.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
    param Spine

    type Spine

    TopoDS_Wire

    rtype

    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).
    param Profile

    type Profile

    TopoDS_Shape

    param WithContact

    default value is Standard_False

    type WithContact

    bool

    param WithCorrection

    default value is Standard_False

    type WithCorrection

    bool

    rtype

    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.

    param Profile

    type Profile

    TopoDS_Shape

    param Location

    type Location

    TopoDS_Vertex

    param WithContact

    default value is Standard_False

    type WithContact

    bool

    param WithCorrection

    default value is Standard_False

    type WithCorrection

    bool

    rtype

    None

Delete()
  • Removes the section Profile from this framework.
    param Profile

    type Profile

    TopoDS_Shape

    rtype

    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.
    rtype

    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.
    rtype

    bool

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

    bool

Profiles()
  • Returns the list of original profiles
    param theProfiles

    type theProfiles

    TopTools_ListOfShape

    rtype

    None

SetDiscreteMode()
  • Sets a Discrete trihedron to perform the sweeping
    rtype

    None

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

    type ForceApproxC1

    bool

    rtype

    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.
    param Profile

    type Profile

    TopoDS_Shape

    param L

    type L

    Law_Function

    param WithContact

    default value is Standard_False

    type WithContact

    bool

    param WithCorrection

    default value is Standard_False

    type WithCorrection

    bool

    rtype

    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.

    param Profile

    type Profile

    TopoDS_Shape

    param L

    type L

    Law_Function

    param Location

    type Location

    TopoDS_Vertex

    param WithContact

    default value is Standard_False

    type WithContact

    bool

    param WithCorrection

    default value is Standard_False

    type WithCorrection

    bool

    rtype

    None

SetMaxDegree()
  • Define the maximum V degree of resulting surface
    param NewMaxDegree

    type NewMaxDegree

    int

    rtype

    None

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

    type NewMaxSegments

    int

    rtype

    None

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

    default value is Standard_False

    type IsFrenet

    bool

    rtype

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

    param Axe

    type Axe

    gp_Ax2

    rtype

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

    param BiNormal

    type BiNormal

    gp_Dir

    rtype

    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>

    param SpineSupport

    type SpineSupport

    TopoDS_Shape

    rtype

    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

    param AuxiliarySpine

    type AuxiliarySpine

    TopoDS_Wire

    param CurvilinearEquivalence

    type CurvilinearEquivalence

    bool

    param KeepContact

    default value is BRepFill_NoContact

    type KeepContact

    BRepFill_TypeOfContact

    rtype

    None

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

    default value is 1.0e-4

    type Tol3d

    float

    param BoundTol

    default value is 1.0e-4

    type BoundTol

    float

    param TolAngular

    default value is 1.0e-2

    type TolAngular

    float

    rtype

    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.
    param Mode

    default value is BRepBuilderAPI_Transformed

    type Mode

    BRepBuilderAPI_TransitionMode

    rtype

    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
    param NumberOfSection

    type NumberOfSection

    int

    param Result

    type Result

    TopTools_ListOfShape

    rtype

    None

Spine()
  • Returns the spine
    rtype

    TopoDS_Wire

property thisown

The membership flag

class BRepOffsetAPI_MakeThickSolid(*args)

Bases: OCC.Core.BRepOffsetAPI.BRepOffsetAPI_MakeOffsetShape

  • Constructor does nothing.
    rtype

    None* Deprecated constructor. Please avoid usage of this constructor.

    param S

    type S

    TopoDS_Shape

    param ClosingFaces

    type ClosingFaces

    TopTools_ListOfShape

    param Offset

    type Offset

    float

    param Tol

    type Tol

    float

    param Mode

    default value is BRepOffset_Skin

    type Mode

    BRepOffset_Mode

    param Intersection

    default value is Standard_False

    type Intersection

    bool

    param SelfInter

    default value is Standard_False

    type SelfInter

    bool

    param Join

    default value is GeomAbs_Arc

    type Join

    GeomAbs_JoinType

    param RemoveIntEdges

    default value is Standard_False

    type RemoveIntEdges

    bool

    rtype

    None

MakeThickSolidByJoin()
  • 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. RemoveIntEdges flag defines whether to remove the INTERNAL edges from the result or not. Warnings Since the algorithm of MakeThickSolid is based on MakeOffsetShape algorithm, the warnings are the same as for MakeOffsetShape.
    param S

    type S

    TopoDS_Shape

    param ClosingFaces

    type ClosingFaces

    TopTools_ListOfShape

    param Offset

    type Offset

    float

    param Tol

    type Tol

    float

    param Mode

    default value is BRepOffset_Skin

    type Mode

    BRepOffset_Mode

    param Intersection

    default value is Standard_False

    type Intersection

    bool

    param SelfInter

    default value is Standard_False

    type SelfInter

    bool

    param Join

    default value is GeomAbs_Arc

    type Join

    GeomAbs_JoinType

    param RemoveIntEdges

    default value is Standard_False

    type RemoveIntEdges

    bool

    rtype

    None

MakeThickSolidBySimple()
  • Constructs solid using simple algorithm. According to its nature it is not possible to set list of the closing faces. This algorithm does not support faces removing. It is caused by fact that intersections are not computed during offset creation. Non-closed shell or face is expected as input.
    param theS

    type theS

    TopoDS_Shape

    param theOffsetValue

    type theOffsetValue

    float

    rtype

    None

property thisown

The membership flag

class BRepOffsetAPI_MiddlePath(*args)

Bases: OCC.Core.BRepBuilderAPI.BRepBuilderAPI_MakeShape

  • General constructor. StartShape and EndShape may be a wire or a face
    param aShape

    type aShape

    TopoDS_Shape

    param StartShape

    type StartShape

    TopoDS_Shape

    param EndShape

    type EndShape

    TopoDS_Shape

    rtype

    None

property thisown

The membership flag

class BRepOffsetAPI_NormalProjection(*args)

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

    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.

    param S

    type S

    TopoDS_Shape

    rtype

    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.
    param ToProj

    type ToProj

    TopoDS_Shape

    rtype

    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.
    param E

    type E

    TopoDS_Edge

    rtype

    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.
    param Liste

    type Liste

    TopTools_ListOfShape

    rtype

    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.
    param With3d

    default value is Standard_True

    type With3d

    bool

    rtype

    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.
    param E

    type E

    TopoDS_Edge

    rtype

    TopoDS_Shape

Init()
  • Initializes the empty constructor framework with the shape S.
    param S

    type S

    TopoDS_Shape

    rtype

    None

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

    TopoDS_Shape

SetLimit()
  • Manage limitation of projected edges.
    param FaceBoundaries

    default value is Standard_True

    type FaceBoundaries

    bool

    rtype

    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
    param MaxDist

    type MaxDist

    float

    rtype

    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.
    param Tol3D

    type Tol3D

    float

    param Tol2D

    type Tol2D

    float

    param InternalContinuity

    type InternalContinuity

    GeomAbs_Shape

    param MaxDegree

    type MaxDegree

    int

    param MaxSeg

    type MaxSeg

    int

    rtype

    None

property thisown

The membership flag

class BRepOffsetAPI_SequenceOfSequenceOfReal(*args)

Bases: object

Append()
Assign()
ChangeFirst()
ChangeLast()
ChangeValue()
Clear()
Exchange()
First()
InsertAfter()
InsertBefore()
IsEmpty()
Last()
Length()
Lower()
Prepend()
Remove()
Reverse()
Set()
SetValue()
Size()
Split()
Upper()
Value()
begin()
cbegin()
cend()
static delNode()
end()
property thisown

The membership flag

class BRepOffsetAPI_SequenceOfSequenceOfShape(*args)

Bases: object

Append()
Assign()
ChangeFirst()
ChangeLast()
ChangeValue()
Clear()
Exchange()
First()
InsertAfter()
InsertBefore()
IsEmpty()
Last()
Length()
Lower()
Prepend()
Remove()
Reverse()
Set()
SetValue()
Size()
Split()
Upper()
Value()
begin()
cbegin()
cend()
static delNode()
end()
property thisown

The membership flag

class BRepOffsetAPI_ThruSections(*args)

Bases: OCC.Core.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.
    param isSolid

    default value is Standard_False

    type isSolid

    bool

    param ruled

    default value is Standard_False

    type ruled

    bool

    param pres3d

    default value is 1.0e-06

    type pres3d

    float

    rtype

    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.
    param aVertex

    type aVertex

    TopoDS_Vertex

    rtype

    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.
    param wire

    type wire

    TopoDS_Wire

    rtype

    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.
    param check

    default value is Standard_True

    type check

    bool

    rtype

    None

Continuity()
  • returns the Continuity used in the approximation
    rtype

    GeomAbs_Shape

CriteriumWeight()
  • returns the Weights associed to the criterium used in the optimization.
    param W1

    type W1

    float

    param W2

    type W2

    float

    param W3

    type W3

    float

    rtype

    None

FirstShape()
  • Returns the TopoDS Shape of the bottom of the loft if solid
    rtype

    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
    param Edge

    type Edge

    TopoDS_Shape

    rtype

    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.
    param isSolid

    default value is Standard_False

    type isSolid

    bool

    param ruled

    default value is Standard_False

    type ruled

    bool

    param pres3d

    default value is 1.0e-06

    type pres3d

    float

    rtype

    None

LastShape()
  • Returns the TopoDS Shape of the top of the loft if solid
    rtype

    TopoDS_Shape

MaxDegree()
  • returns the maximal U degree of result surface
    rtype

    int

ParType()
  • returns the type of parametrization used in the approximation
    rtype

    Approx_ParametrizationType

SetContinuity()
  • Define the Continuity used in the approximation
    param C

    type C

    GeomAbs_Shape

    rtype

    None

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

    type W1

    float

    param W2

    type W2

    float

    param W3

    type W3

    float

    rtype

    None

SetMaxDegree()
  • Define the maximal U degree of result surface
    param MaxDeg

    type MaxDeg

    int

    rtype

    None

SetParType()
  • Define the type of parametrization used in the approximation
    param ParType

    type ParType

    Approx_ParametrizationType

    rtype

    None

SetSmoothing()
  • Define the approximation algorithm
    param UseSmoothing

    type UseSmoothing

    bool

    rtype

    None

UseSmoothing()
  • Define the approximation algorithm
    rtype

    bool

Wires()
  • Returns the list of original wires
    rtype

    TopTools_ListOfShape

property thisown

The membership flag

class SwigPyIterator(*args, **kwargs)

Bases: object

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

The membership flag

value()