OCC.ShapeExtend module

class OCC.ShapeExtend.Handle_ShapeExtend_BasicMsgRegistrator(*args)

Bases: OCC.MMgt.Handle_MMgt_TShared

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

The membership flag

class OCC.ShapeExtend.Handle_ShapeExtend_ComplexCurve(*args)

Bases: OCC.Geom.Handle_Geom_Curve

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

The membership flag

class OCC.ShapeExtend.Handle_ShapeExtend_CompositeSurface(*args)

Bases: OCC.Geom.Handle_Geom_Surface

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

The membership flag

class OCC.ShapeExtend.Handle_ShapeExtend_DataMapNodeOfDataMapOfShapeListOfMsg(*args)

Bases: OCC.TCollection.Handle_TCollection_MapNode

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

The membership flag

class OCC.ShapeExtend.Handle_ShapeExtend_DataMapNodeOfDataMapOfTransientListOfMsg(*args)

Bases: OCC.TCollection.Handle_TCollection_MapNode

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

The membership flag

class OCC.ShapeExtend.Handle_ShapeExtend_MsgRegistrator(*args)

Bases: OCC.ShapeExtend.Handle_ShapeExtend_BasicMsgRegistrator

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

The membership flag

class OCC.ShapeExtend.Handle_ShapeExtend_WireData(*args)

Bases: OCC.MMgt.Handle_MMgt_TShared

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

The membership flag

class OCC.ShapeExtend.ShapeExtend_BasicMsgRegistrator

Bases: OCC.MMgt.MMgt_TShared

GetHandle()

ShapeExtend_BasicMsgRegistrator_GetHandle(ShapeExtend_BasicMsgRegistrator self) -> Handle_ShapeExtend_BasicMsgRegistrator

Send()
  • Sends a message to be attached to the object. Object can be of any type interpreted by redefined MsgRegistrator.
Parameters:
  • object (Handle_Standard_Transient &) –
  • message (Message_Msg &) –
  • gravity (Message_Gravity) –
Return type:

void

  • Sends a message to be attached to the shape.
Parameters:
  • shape (TopoDS_Shape &) –
  • message (Message_Msg &) –
  • gravity (Message_Gravity) –
Return type:

void

  • Calls Send method with Null Transient.
Parameters:
  • message (Message_Msg &) –
  • gravity (Message_Gravity) –
Return type:

void

thisown

The membership flag

class OCC.ShapeExtend.ShapeExtend_ComplexCurve(*args, **kwargs)

Bases: OCC.Geom.Geom_Curve

CheckConnectivity()
  • Checks geometrical connectivity of the curves, including closure (sets fields myClosed)
Parameters:Preci (float) –
Return type:bool
Curve()
  • Returns curve given by its index
Parameters:index (Standard_Integer) –
Return type:Handle_Geom_Curve
GetHandle()

ShapeExtend_ComplexCurve_GetHandle(ShapeExtend_ComplexCurve self) -> Handle_ShapeExtend_ComplexCurve

GetScaleFactor()
  • Returns scale factor for recomputing of deviatives.
Parameters:ind (Standard_Integer) –
Return type:float
LocalToGlobal()
  • Returns global parameter for the whole curve according to the segment and local parameter on it
Parameters:
  • index (Standard_Integer) –
  • Ulocal (float) –
Return type:

float

LocateParameter()
  • Returns number of the curve for the given parameter U and local paramete r UOut for the found curve
Parameters:
  • U (float) –
  • UOut (float &) –
Return type:

int

NbCurves()
  • Returns number of curves
Return type:int
thisown

The membership flag

class OCC.ShapeExtend.ShapeExtend_CompositeSurface(*args)

Bases: OCC.Geom.Geom_Surface

CheckConnectivity()
  • Checks geometrical connectivity of the patches, including closedness (sets fields muUClosed and myVClosed)
Parameters:prec (float) –
Return type:bool
ComputeJointValues()
  • Computes Joint values according to parameter
Parameters:param (ShapeExtend_Parametrisation) – default value is ShapeExtend_Natural
Return type:None
  • Computes Joint values according to parameter
Parameters:param (ShapeExtend_Parametrisation) – default value is ShapeExtend_Natural
Return type:None
GetHandle()

ShapeExtend_CompositeSurface_GetHandle(ShapeExtend_CompositeSurface self) -> Handle_ShapeExtend_CompositeSurface

GlobalToLocal()
  • Converts global parameters UV to local parameters uv on patch i,j
Parameters:
  • i (Standard_Integer) –
  • j (Standard_Integer) –
  • UV (gp_Pnt2d) –
Return type:

gp_Pnt2d

GlobalToLocalTransformation()
  • Computes transformation operator and uFactor descrinbing affine transformation required to convert global parameters on composite surface to local parameters on patch (i,j): uv = ( uFactor, 1. ) X Trsf * UV; NOTE: Thus Trsf contains shift and scale by V, scale by U is stored in uFact. Returns True if transformation is not an identity
Parameters:
  • i (Standard_Integer) –
  • j (Standard_Integer) –
  • uFact (float &) –
  • Trsf (gp_Trsf2d) –
Return type:

bool

Init()
  • Initializes by a grid of surfaces. All the Surfaces of the grid must have geometrical connectivity as stated above. If geometrical connectivity is not satisfied, method returns False. However, class is initialized even in that case. Last parameter defines how global parametrisation (joint values) will be computed: ShapeExtend_Natural: U1 = u11min, Ui+1 = Ui + (ui1max-ui1min), etc. ShapeExtend_Uniform: Ui = i-1, Vj = j-1 ShapeExtend_Unitary: Ui = (i-1)/Nu, Vi = (j-1)/Nv
Parameters:
  • GridSurf (Handle_TColGeom_HArray2OfSurface &) –
  • param (ShapeExtend_Parametrisation) – default value is ShapeExtend_Natural
Return type:

bool

  • Initializes by a grid of surfaces. All the Surfaces of the grid must have geometrical connectivity as stated above. If geometrical connectivity is not satisfied, method returns False. However, class is initialized even in that case. Last parameter defines how global parametrisation (joint values) will be computed: ShapeExtend_Natural: U1 = u11min, Ui+1 = Ui + (ui1max-ui1min), etc. ShapeExtend_Uniform: Ui = i-1, Vj = j-1 ShapeExtend_Unitary: Ui = (i-1)/Nu, Vi = (j-1)/Nv
Parameters:
  • GridSurf (Handle_TColGeom_HArray2OfSurface &) –
  • param (ShapeExtend_Parametrisation) – default value is ShapeExtend_Natural
Return type:

bool

  • Initializes by a grid of surfaces with given global parametrisation defined by UJoints and VJoints arrays, each having langth equal to number of patches in corresponding direction + 1. Global joint values should be sorted in increasing order. All the Surfaces of the grid must have geometrical connectivity as stated above. If geometrical connectivity is not satisfied, method returns False. However, class is initialized even in that case.
Parameters:
  • GridSurf (Handle_TColGeom_HArray2OfSurface &) –
  • UJoints (TColStd_Array1OfReal &) –
  • VJoints (TColStd_Array1OfReal &) –
Return type:

bool

LocalToGlobal()
  • Converts local parameters uv on patch i,j to global parameters UV
Parameters:
  • i (Standard_Integer) –
  • j (Standard_Integer) –
  • uv (gp_Pnt2d) –
Return type:

gp_Pnt2d

LocateUParameter()
  • Returns number of col that contains given (global) parameter
Parameters:U (float) –
Return type:int
LocateUVPoint()
  • Returns number of row and col of surface that contains given point
Parameters:
  • pnt (gp_Pnt2d) –
  • i (Standard_Integer &) –
  • j (Standard_Integer &) –
Return type:

None

LocateVParameter()
  • Returns number of row that contains given (global) parameter
Parameters:V (float) –
Return type:int
NbUPatches()
  • Returns number of patches in U direction.
Return type:int
NbVPatches()
  • Returns number of patches in V direction.
Return type:int
Patch()
  • Returns one surface patch
Parameters:
  • i (Standard_Integer) –
  • j (Standard_Integer) –
Return type:

Handle_Geom_Surface

  • Returns one surface patch that contains given (global) parameters
Parameters:
  • U (float) –
  • V (float) –
Return type:

Handle_Geom_Surface

  • Returns one surface patch that contains given point
Parameters:pnt (gp_Pnt2d) –
Return type:Handle_Geom_Surface
Patches()
  • Returns grid of surfaces
Return type:Handle_TColGeom_HArray2OfSurface
SetUFirstValue()
  • Changes starting value for global U parametrisation (all other joint values are shifted accordingly)
Parameters:UFirst (float) –
Return type:None
SetUJointValues()
  • Sets the array of U values corresponding to joint points, which define global parametrisation of the surface. Number of values in array should be equal to NbUPatches()+1. All the values should be sorted in increasing order. If this is not satisfied, does nothing and returns False.
Parameters:UJoints (TColStd_Array1OfReal &) –
Return type:bool
SetVFirstValue()
  • Changes starting value for global V parametrisation (all other joint values are shifted accordingly)
Parameters:VFirst (float) –
Return type:None
SetVJointValues()
  • Sets the array of V values corresponding to joint points, which define global parametrisation of the surface Number of values in array should be equal to NbVPatches()+1. All the values should be sorted in increasing order. If this is not satisfied, does nothing and returns False.
Parameters:VJoints (TColStd_Array1OfReal &) –
Return type:bool
UGlobalToLocal()
  • Converts global parameter U to local parameter u on patch i,j
Parameters:
  • i (Standard_Integer) –
  • j (Standard_Integer) –
  • U (float) –
Return type:

float

UJointValue()
  • Returns i-th joint value in U direction (1-st is global Umin, (NbUPatches()+1)-th is global Umax on the composite surface)
Parameters:i (Standard_Integer) –
Return type:float
UJointValues()
  • Returns the array of U values corresponding to joint points between patches as well as to start and end points, which define global parametrisation of the surface
Return type:Handle_TColStd_HArray1OfReal
ULocalToGlobal()
  • Converts local parameter u on patch i,j to global parameter U
Parameters:
  • i (Standard_Integer) –
  • j (Standard_Integer) –
  • u (float) –
Return type:

float

VGlobalToLocal()
  • Converts global parameter V to local parameter v on patch i,j
Parameters:
  • i (Standard_Integer) –
  • j (Standard_Integer) –
  • V (float) –
Return type:

float

VJointValue()
  • Returns j-th joint value in V direction (1-st is global Vmin, (NbVPatches()+1)-th is global Vmax on the composite surface)
Parameters:j (Standard_Integer) –
Return type:float
VJointValues()
  • Returns the array of V values corresponding to joint points between patches as well as to start and end points, which define global parametrisation of the surface
Return type:Handle_TColStd_HArray1OfReal
VLocalToGlobal()
  • Converts local parameter v on patch i,j to global parameter V
Parameters:
  • i (Standard_Integer) –
  • j (Standard_Integer) –
  • v (float) –
Return type:

float

Value()
  • Computes the point of parameter pnt on the grid.
Parameters:pnt (gp_Pnt2d) –
Return type:gp_Pnt
thisown

The membership flag

class OCC.ShapeExtend.ShapeExtend_DataMapIteratorOfDataMapOfShapeListOfMsg(*args)

Bases: OCC.TCollection.TCollection_BasicMapIterator

Initialize()
Parameters:aMap (ShapeExtend_DataMapOfShapeListOfMsg &) –
Return type:None
Key()
Return type:TopoDS_Shape
Value()
Return type:Message_ListOfMsg
thisown

The membership flag

class OCC.ShapeExtend.ShapeExtend_DataMapIteratorOfDataMapOfTransientListOfMsg(*args)

Bases: OCC.TCollection.TCollection_BasicMapIterator

Initialize()
Parameters:aMap (ShapeExtend_DataMapOfTransientListOfMsg &) –
Return type:None
Key()
Return type:Handle_Standard_Transient
Value()
Return type:Message_ListOfMsg
thisown

The membership flag

class OCC.ShapeExtend.ShapeExtend_DataMapNodeOfDataMapOfShapeListOfMsg(*args)

Bases: OCC.TCollection.TCollection_MapNode

GetHandle()

ShapeExtend_DataMapNodeOfDataMapOfShapeListOfMsg_GetHandle(ShapeExtend_DataMapNodeOfDataMapOfShapeListOfMsg self) -> Handle_ShapeExtend_DataMapNodeOfDataMapOfShapeListOfMsg

Key()
Return type:TopoDS_Shape
Value()
Return type:Message_ListOfMsg
thisown

The membership flag

class OCC.ShapeExtend.ShapeExtend_DataMapNodeOfDataMapOfTransientListOfMsg(*args)

Bases: OCC.TCollection.TCollection_MapNode

GetHandle()

ShapeExtend_DataMapNodeOfDataMapOfTransientListOfMsg_GetHandle(ShapeExtend_DataMapNodeOfDataMapOfTransientListOfMsg self) -> Handle_ShapeExtend_DataMapNodeOfDataMapOfTransientListOfMsg

Key()
Return type:Handle_Standard_Transient
Value()
Return type:Message_ListOfMsg
thisown

The membership flag

class OCC.ShapeExtend.ShapeExtend_DataMapOfShapeListOfMsg(NbBuckets=1)

Bases: OCC.TCollection.TCollection_BasicMap

Assign()
Parameters:Other (ShapeExtend_DataMapOfShapeListOfMsg &) –
Return type:ShapeExtend_DataMapOfShapeListOfMsg
Bind()
Parameters:
  • K (TopoDS_Shape &) –
  • I (Message_ListOfMsg &) –
Return type:

bool

ChangeFind()
Parameters:K (TopoDS_Shape &) –
Return type:Message_ListOfMsg
ChangeFind1()
Parameters:K (TopoDS_Shape &) –
Return type:Standard_Address
Clear()
Return type:None
Find()
Parameters:K (TopoDS_Shape &) –
Return type:Message_ListOfMsg
Find1()
Parameters:K (TopoDS_Shape &) –
Return type:Standard_Address
IsBound()
Parameters:K (TopoDS_Shape &) –
Return type:bool
ReSize()
Parameters:NbBuckets (Standard_Integer) –
Return type:None
Set()
Parameters:Other (ShapeExtend_DataMapOfShapeListOfMsg &) –
Return type:ShapeExtend_DataMapOfShapeListOfMsg
UnBind()
Parameters:K (TopoDS_Shape &) –
Return type:bool
thisown

The membership flag

class OCC.ShapeExtend.ShapeExtend_DataMapOfTransientListOfMsg(NbBuckets=1)

Bases: OCC.TCollection.TCollection_BasicMap

Assign()
Parameters:Other (ShapeExtend_DataMapOfTransientListOfMsg &) –
Return type:ShapeExtend_DataMapOfTransientListOfMsg
Bind()
Parameters:
  • K (Handle_Standard_Transient &) –
  • I (Message_ListOfMsg &) –
Return type:

bool

ChangeFind()
Parameters:K (Handle_Standard_Transient &) –
Return type:Message_ListOfMsg
ChangeFind1()
Parameters:K (Handle_Standard_Transient &) –
Return type:Standard_Address
Clear()
Return type:None
Find()
Parameters:K (Handle_Standard_Transient &) –
Return type:Message_ListOfMsg
Find1()
Parameters:K (Handle_Standard_Transient &) –
Return type:Standard_Address
IsBound()
Parameters:K (Handle_Standard_Transient &) –
Return type:bool
ReSize()
Parameters:NbBuckets (Standard_Integer) –
Return type:None
Set()
Parameters:Other (ShapeExtend_DataMapOfTransientListOfMsg &) –
Return type:ShapeExtend_DataMapOfTransientListOfMsg
UnBind()
Parameters:K (Handle_Standard_Transient &) –
Return type:bool
thisown

The membership flag

class OCC.ShapeExtend.ShapeExtend_Explorer

Bases: object

CompoundFromSeq()
  • Converts a sequence of Shapes to a Compound
Parameters:seqval (Handle_TopTools_HSequenceOfShape &) –
Return type:TopoDS_Shape
DispatchList()
  • Dispatches starting list of shapes according to their type, to the appropriate resulting lists For each of these lists, if it is null, it is firstly created else, new items are appended to the already existing ones
Parameters:
  • list (Handle_TopTools_HSequenceOfShape &) –
  • vertices (Handle_TopTools_HSequenceOfShape &) –
  • edges (Handle_TopTools_HSequenceOfShape &) –
  • wires (Handle_TopTools_HSequenceOfShape &) –
  • faces (Handle_TopTools_HSequenceOfShape &) –
  • shells (Handle_TopTools_HSequenceOfShape &) –
  • solids (Handle_TopTools_HSequenceOfShape &) –
  • compsols (Handle_TopTools_HSequenceOfShape &) –
  • compounds (Handle_TopTools_HSequenceOfShape &) –
Return type:

None

ListFromSeq()
  • Converts a Sequence of Shapes to a List of Shapes <clear> if True (D), commands the list to start from scratch else, the list is cumulated
Parameters:
  • seqval (Handle_TopTools_HSequenceOfShape &) –
  • lisval (TopTools_ListOfShape &) –
  • clear (bool) – default value is Standard_True
Return type:

None

  • Converts a Sequence of Shapes to a List of Shapes <clear> if True (D), commands the list to start from scratch else, the list is cumulated
Parameters:
  • seqval (Handle_TopTools_HSequenceOfShape &) –
  • lisval (TopTools_ListOfShape &) –
  • clear (bool) – default value is Standard_True
Return type:

None

SeqFromCompound()
  • Converts a Compound to a list of Shapes if <comp> is not a compound, the list contains only <comp> if <comp> is Null, the list is empty if <comp> is a Compound, its sub-shapes are put into the list then if <expcomp> is True, if a sub-shape is a Compound, it is not put to the list but its sub-shapes are (recursive)
Parameters:
  • comp (TopoDS_Shape &) –
  • expcomp (bool) –
Return type:

Handle_TopTools_HSequenceOfShape

SeqFromList()
  • Converts a List of Shapes to a Sequence of Shapes
Parameters:lisval (TopTools_ListOfShape &) –
Return type:Handle_TopTools_HSequenceOfShape
ShapeType()
  • Returns the type of a Shape: true type if <compound> is False If <compound> is True and <shape> is a Compound, iterates on its items. If all are of the same type, returns this type. Else, returns COMPOUND. If it is empty, returns SHAPE For a Null Shape, returns SHAPE
Parameters:
  • shape (TopoDS_Shape &) –
  • compound (bool) –
Return type:

TopAbs_ShapeEnum

SortedCompound()
  • Builds a COMPOUND from the given shape. It explores the shape level by level, according to the <explore> argument. If <explore> is False, only COMPOUND items are explored, else all items are. The following shapes are added to resulting compound: - shapes which comply to <type> - if <type> is WIRE, considers also free edges (and makes wires) - if <type> is SHELL, considers also free faces (and makes shells) If <compound> is True, gathers items in compounds which correspond to starting COMPOUND,SOLID or SHELL containers, or items directly contained in a Compound
Parameters:
  • shape (TopoDS_Shape &) –
  • type (TopAbs_ShapeEnum) –
  • explore (bool) –
  • compound (bool) –
Return type:

TopoDS_Shape

thisown

The membership flag

class OCC.ShapeExtend.ShapeExtend_MsgRegistrator

Bases: OCC.ShapeExtend.ShapeExtend_BasicMsgRegistrator

GetHandle()

ShapeExtend_MsgRegistrator_GetHandle(ShapeExtend_MsgRegistrator self) -> Handle_ShapeExtend_MsgRegistrator

MapShape()
  • Returns a Map of shapes and message list
Return type:ShapeExtend_DataMapOfShapeListOfMsg
MapTransient()
  • Returns a Map of objects and message list
Return type:ShapeExtend_DataMapOfTransientListOfMsg
Send()
  • Sends a message to be attached to the object. If the object is in the map then the message is added to the list, otherwise the object is firstly added to the map.
Parameters:
  • object (Handle_Standard_Transient &) –
  • message (Message_Msg &) –
  • gravity (Message_Gravity) –
Return type:

void

  • Sends a message to be attached to the shape. If the shape is in the map then the message is added to the list, otherwise the shape is firstly added to the map.
Parameters:
  • shape (TopoDS_Shape &) –
  • message (Message_Msg &) –
  • gravity (Message_Gravity) –
Return type:

void

thisown

The membership flag

class OCC.ShapeExtend.ShapeExtend_WireData(*args)

Bases: OCC.MMgt.MMgt_TShared

Add()
  • Adds an edge to a wire, being defined (not yet ended) This is the plain, basic, function to add an edge <num> = 0 (D): Appends at end <num> = 1: Preprends at start else, Insert before <num> Remark : Null Edge is simply ignored
Parameters:
  • edge (TopoDS_Edge &) –
  • atnum (Standard_Integer) – default value is 0
Return type:

None

  • Adds an edge to a wire, being defined (not yet ended) This is the plain, basic, function to add an edge <num> = 0 (D): Appends at end <num> = 1: Preprends at start else, Insert before <num> Remark : Null Edge is simply ignored
Parameters:
  • edge (TopoDS_Edge &) –
  • atnum (Standard_Integer) – default value is 0
Return type:

None

  • Adds an entire wire, considered as a list of edges Remark : The wire is assumed to be ordered (TopoDS_Iterator is used)
Parameters:
  • wire (TopoDS_Wire &) –
  • atnum (Standard_Integer) – default value is 0
Return type:

None

  • Adds an entire wire, considered as a list of edges Remark : The wire is assumed to be ordered (TopoDS_Iterator is used)
Parameters:
  • wire (TopoDS_Wire &) –
  • atnum (Standard_Integer) – default value is 0
Return type:

None

  • Adds a wire in the form of WireData
Parameters:
  • wire (Handle_ShapeExtend_WireData &) –
  • atnum (Standard_Integer) – default value is 0
Return type:

None

  • Adds a wire in the form of WireData
Parameters:
  • wire (Handle_ShapeExtend_WireData &) –
  • atnum (Standard_Integer) – default value is 0
Return type:

None

  • Adds an edge or a wire invoking corresponding method Add
Parameters:
  • shape (TopoDS_Shape &) –
  • atnum (Standard_Integer) – default value is 0
Return type:

None

  • Adds an edge or a wire invoking corresponding method Add
Parameters:
  • shape (TopoDS_Shape &) –
  • atnum (Standard_Integer) – default value is 0
Return type:

None

AddOriented()
  • Adds an edge to start or end of <self>, according to <mode> 0: at end, as direct 1: at end, as reversed 2: at start, as direct 3: at start, as reversed < 0: no adding
Parameters:
  • edge (TopoDS_Edge &) –
  • mode (Standard_Integer) –
Return type:

None

  • Adds a wire to start or end of <self>, according to <mode> 0: at end, as direct 1: at end, as reversed 2: at start, as direct 3: at start, as reversed < 0: no adding
Parameters:
  • wire (TopoDS_Wire &) –
  • mode (Standard_Integer) –
Return type:

None

  • Adds an edge or a wire invoking corresponding method AddOriented
Parameters:
  • shape (TopoDS_Shape &) –
  • mode (Standard_Integer) –
Return type:

None

Clear()
  • Clears data about Wire.
Return type:None
ComputeSeams()
  • Computes the list of seam edges By default (direct call), computing is enforced For indirect call (from IsSeam) it is redone only if not yet already done or if the list of edges has changed Remark : A Seam Edge is an Edge present twice in the list, once as FORWARD and once as REVERSED Each sense has its own PCurve, the one for FORWARD must be set in first
Parameters:enforce (bool) – default value is Standard_True
Return type:None
  • Computes the list of seam edges By default (direct call), computing is enforced For indirect call (from IsSeam) it is redone only if not yet already done or if the list of edges has changed Remark : A Seam Edge is an Edge present twice in the list, once as FORWARD and once as REVERSED Each sense has its own PCurve, the one for FORWARD must be set in first
Parameters:enforce (bool) – default value is Standard_True
Return type:None
Edge()
  • Returns <num>th Edge
Parameters:num (Standard_Integer) –
Return type:TopoDS_Edge
GetHandle()

ShapeExtend_WireData_GetHandle(ShapeExtend_WireData self) -> Handle_ShapeExtend_WireData

GetManifoldMode()

ShapeExtend_WireData_GetManifoldMode(ShapeExtend_WireData self) -> Standard_Boolean

Index()
  • Returns the index of the edge If the edge is a seam the orientation is also checked Returns 0 if the edge is not found in the list
Parameters:edge (TopoDS_Edge &) –
Return type:int
Init()
  • Copies data from another WireData
Parameters:other (Handle_ShapeExtend_WireData &) –
Return type:None
  • Loads an already existing wire If <chained> is True (default), edges are added in the sequence as they are explored by TopoDS_Iterator Else, if <chained> is False, wire is explored by BRepTools_WireExplorer and it is guaranteed that edges will be sequencially connected. Remark : In the latter case it can happen that not all edges will be found (because of limitations of BRepTools_WireExplorer for disconnected wires and wires with seam edges).
Parameters:
  • wire (TopoDS_Wire &) –
  • chained (bool) – default value is Standard_True
  • theManifoldMode (bool) – default value is Standard_True
Return type:

bool

  • Loads an already existing wire If <chained> is True (default), edges are added in the sequence as they are explored by TopoDS_Iterator Else, if <chained> is False, wire is explored by BRepTools_WireExplorer and it is guaranteed that edges will be sequencially connected. Remark : In the latter case it can happen that not all edges will be found (because of limitations of BRepTools_WireExplorer for disconnected wires and wires with seam edges).
Parameters:
  • wire (TopoDS_Wire &) –
  • chained (bool) – default value is Standard_True
  • theManifoldMode (bool) – default value is Standard_True
Return type:

bool

  • Loads an already existing wire If <chained> is True (default), edges are added in the sequence as they are explored by TopoDS_Iterator Else, if <chained> is False, wire is explored by BRepTools_WireExplorer and it is guaranteed that edges will be sequencially connected. Remark : In the latter case it can happen that not all edges will be found (because of limitations of BRepTools_WireExplorer for disconnected wires and wires with seam edges).
Parameters:
  • wire (TopoDS_Wire &) –
  • chained (bool) – default value is Standard_True
  • theManifoldMode (bool) – default value is Standard_True
Return type:

bool

IsSeam()
  • Tells if an Edge is seam (see ComputeSeams) An edge is considered as seam if it presents twice in the edge list, once as FORWARD and once as REVERSED.
Parameters:num (Standard_Integer) –
Return type:bool
NbEdges()
  • Returns the count of currently recorded edges
Return type:int
NbNonManifoldEdges()
  • Returns the count of currently recorded non-manifold edges
Return type:int
NonmanifoldEdge()
  • Returns <num>th nonmanifold Edge
Parameters:num (Standard_Integer) –
Return type:TopoDS_Edge
NonmanifoldEdges()
  • Returns sequence of non-manifold edges This sequence can be not empty if wire data set in manifold mode but initial wire has INTERNAL orientation or contains INTERNAL edges
Return type:Handle_TopTools_HSequenceOfShape
Remove()
  • Removes an Edge, given its rank. By default removes the last edge.
Parameters:num (Standard_Integer) – default value is 0
Return type:None
  • Removes an Edge, given its rank. By default removes the last edge.
Parameters:num (Standard_Integer) – default value is 0
Return type:None
Reverse()
  • Reverses the sense of the list and the orientation of each Edge This method should be called when either wire has no seam edges or face is not available
Return type:None
  • Reverses the sense of the list and the orientation of each Edge The face is necessary for swapping pcurves for seam edges (first pcurve corresponds to orientation FORWARD, and second to REVERSED; when edge is reversed, pcurves must be swapped) If face is NULL, no swapping is performed
Parameters:face (TopoDS_Face &) –
Return type:None
Set()
  • Replaces an edge at the given rank number <num> with new one. Default is last edge (<num> = 0).
Parameters:
  • edge (TopoDS_Edge &) –
  • num (Standard_Integer) – default value is 0
Return type:

None

  • Replaces an edge at the given rank number <num> with new one. Default is last edge (<num> = 0).
Parameters:
  • edge (TopoDS_Edge &) –
  • num (Standard_Integer) – default value is 0
Return type:

None

SetDegeneratedLast()
  • When the wire contains at least one degenerated edge, sets it as last one Note : It is useful to process pcurves, for instance, while the pcurve of a DGNR may not be computed from its 3D part (there is none) it is computed after the other edges have been computed and chained.
Return type:None
SetLast()
  • Does a circular permutation in order to set <num>th edge last
Parameters:num (Standard_Integer) –
Return type:None
SetManifoldMode()

ShapeExtend_WireData_SetManifoldMode(ShapeExtend_WireData self, Standard_Boolean value)

Wire()
  • Makes TopoDS_Wire using BRep_Builder (just creates the TopoDS_Wire object and adds all edges into it). This method should be called when the wire is correct (for example, after successful fixes by ShapeFix_Wire) and adjacent edges share common vertices. In case if adjacent edges do not share the same vertices the resulting TopoDS_Wire will be invalid.
Return type:TopoDS_Wire
WireAPIMake()
  • Makes TopoDS_Wire using BRepAPI_MakeWire. Class BRepAPI_MakeWire merges geometrically coincided vertices and can disturb correct order of edges in the wire. If this class fails, null shape is returned.
Return type:TopoDS_Wire
thisown

The membership flag

class OCC.ShapeExtend.SwigPyIterator(*args, **kwargs)

Bases: object

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

The membership flag

value()
class OCC.ShapeExtend.shapeextend(*args, **kwargs)

Bases: object

static DecodeStatus(*args)
  • Tells if a bit flag contains bit corresponding to enumerated status
Parameters:
  • flag (Standard_Integer) –
  • status (ShapeExtend_Status) –
Return type:

bool

static EncodeStatus(*args)
  • Encodes status (enumeration) to a bit flag
Parameters:status (ShapeExtend_Status) –
Return type:int
static Init()
  • Inits using of ShapeExtend. Currently, loads messages output by ShapeHealing algorithms.
Return type:void
thisown

The membership flag

OCC.ShapeExtend.shapeextend_DecodeStatus(*args)
  • Tells if a bit flag contains bit corresponding to enumerated status
Parameters:
  • flag (Standard_Integer) –
  • status (ShapeExtend_Status) –
Return type:

bool

OCC.ShapeExtend.shapeextend_EncodeStatus(*args)
  • Encodes status (enumeration) to a bit flag
Parameters:status (ShapeExtend_Status) –
Return type:int
OCC.ShapeExtend.shapeextend_Init()
  • Inits using of ShapeExtend. Currently, loads messages output by ShapeHealing algorithms.
Return type:void