OCC.Draft module

class OCC.Draft.Draft_DataMapIteratorOfDataMapOfEdgeEdgeInfo(*args)

Bases: OCC.TCollection.TCollection_BasicMapIterator

Initialize()
Parameters:aMap (Draft_DataMapOfEdgeEdgeInfo &) –
Return type:None
Key()
Return type:TopoDS_Edge
Value()
Return type:Draft_EdgeInfo
thisown

The membership flag

class OCC.Draft.Draft_DataMapIteratorOfDataMapOfFaceFaceInfo(*args)

Bases: OCC.TCollection.TCollection_BasicMapIterator

Initialize()
Parameters:aMap (Draft_DataMapOfFaceFaceInfo &) –
Return type:None
Key()
Return type:TopoDS_Face
Value()
Return type:Draft_FaceInfo
thisown

The membership flag

class OCC.Draft.Draft_DataMapIteratorOfDataMapOfVertexVertexInfo(*args)

Bases: OCC.TCollection.TCollection_BasicMapIterator

Initialize()
Parameters:aMap (Draft_DataMapOfVertexVertexInfo &) –
Return type:None
Key()
Return type:TopoDS_Vertex
Value()
Return type:Draft_VertexInfo
thisown

The membership flag

class OCC.Draft.Draft_DataMapNodeOfDataMapOfEdgeEdgeInfo(*args)

Bases: OCC.TCollection.TCollection_MapNode

GetHandle()

Draft_DataMapNodeOfDataMapOfEdgeEdgeInfo_GetHandle(Draft_DataMapNodeOfDataMapOfEdgeEdgeInfo self) -> Handle_Draft_DataMapNodeOfDataMapOfEdgeEdgeInfo

Key()
Return type:TopoDS_Edge
Value()
Return type:Draft_EdgeInfo
thisown

The membership flag

class OCC.Draft.Draft_DataMapNodeOfDataMapOfFaceFaceInfo(*args)

Bases: OCC.TCollection.TCollection_MapNode

GetHandle()

Draft_DataMapNodeOfDataMapOfFaceFaceInfo_GetHandle(Draft_DataMapNodeOfDataMapOfFaceFaceInfo self) -> Handle_Draft_DataMapNodeOfDataMapOfFaceFaceInfo

Key()
Return type:TopoDS_Face
Value()
Return type:Draft_FaceInfo
thisown

The membership flag

class OCC.Draft.Draft_DataMapNodeOfDataMapOfVertexVertexInfo(*args)

Bases: OCC.TCollection.TCollection_MapNode

GetHandle()

Draft_DataMapNodeOfDataMapOfVertexVertexInfo_GetHandle(Draft_DataMapNodeOfDataMapOfVertexVertexInfo self) -> Handle_Draft_DataMapNodeOfDataMapOfVertexVertexInfo

Key()
Return type:TopoDS_Vertex
Value()
Return type:Draft_VertexInfo
thisown

The membership flag

class OCC.Draft.Draft_DataMapOfEdgeEdgeInfo(NbBuckets=1)

Bases: OCC.TCollection.TCollection_BasicMap

Assign()
Parameters:Other (Draft_DataMapOfEdgeEdgeInfo &) –
Return type:Draft_DataMapOfEdgeEdgeInfo
Bind()
Parameters:
  • K (TopoDS_Edge &) –
  • I (Draft_EdgeInfo &) –
Return type:

bool

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

The membership flag

class OCC.Draft.Draft_DataMapOfFaceFaceInfo(NbBuckets=1)

Bases: OCC.TCollection.TCollection_BasicMap

Assign()
Parameters:Other (Draft_DataMapOfFaceFaceInfo &) –
Return type:Draft_DataMapOfFaceFaceInfo
Bind()
Parameters:
  • K (TopoDS_Face &) –
  • I (Draft_FaceInfo &) –
Return type:

bool

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

The membership flag

class OCC.Draft.Draft_DataMapOfVertexVertexInfo(NbBuckets=1)

Bases: OCC.TCollection.TCollection_BasicMap

Assign()
Parameters:Other (Draft_DataMapOfVertexVertexInfo &) –
Return type:Draft_DataMapOfVertexVertexInfo
Bind()
Parameters:
  • K (TopoDS_Vertex &) –
  • I (Draft_VertexInfo &) –
Return type:

bool

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

The membership flag

class OCC.Draft.Draft_EdgeInfo(*args)

Bases: object

Add()
Parameters:F (TopoDS_Face &) –
Return type:None
ChangeFirstPC()
Return type:Handle_Geom2d_Curve
ChangeGeometry()
Return type:Handle_Geom_Curve
ChangeSecondPC()
Return type:Handle_Geom2d_Curve
FirstFace()
Return type:TopoDS_Face
FirstPC()
Return type:Handle_Geom2d_Curve
Geometry()
Return type:Handle_Geom_Curve
IsTangent()
Parameters:P (gp_Pnt) –
Return type:bool
NewGeometry()
Return type:bool
RootFace()
Parameters:F (TopoDS_Face &) –
Return type:None
Return type:TopoDS_Face
SecondFace()
Return type:TopoDS_Face
SecondPC()
Return type:Handle_Geom2d_Curve
SetNewGeometry()
Parameters:NewGeom (bool) –
Return type:None
Tangent()
Parameters:P (gp_Pnt) –
Return type:None
Tolerance()
Parameters:tol (float) –
Return type:None
Return type:float
thisown

The membership flag

class OCC.Draft.Draft_FaceInfo(*args)

Bases: object

Add()
Parameters:F (TopoDS_Face &) –
Return type:None
ChangeCurve()
Return type:Handle_Geom_Curve
ChangeGeometry()
Return type:Handle_Geom_Surface
Curve()
Return type:Handle_Geom_Curve
FirstFace()
Return type:TopoDS_Face
Geometry()
Return type:Handle_Geom_Surface
NewGeometry()
Return type:bool
RootFace()
Parameters:F (TopoDS_Face &) –
Return type:None
Return type:TopoDS_Face
SecondFace()
Return type:TopoDS_Face
thisown

The membership flag

class OCC.Draft.Draft_Modification(*args)

Bases: OCC.BRepTools.BRepTools_Modification

Add()
  • Adds the face F and propagates the draft modification to its neighbour faces if they are tangent. If an error occurs, will return False and ProblematicShape will return the ‘bad’ face.
Parameters:
  • F (TopoDS_Face &) –
  • Direction (gp_Dir) –
  • Angle (float) –
  • NeutralPlane (gp_Pln) –
  • Flag (bool) – default value is Standard_True
Return type:

bool

  • Adds the face F and propagates the draft modification to its neighbour faces if they are tangent. If an error occurs, will return False and ProblematicShape will return the ‘bad’ face.
Parameters:
  • F (TopoDS_Face &) –
  • Direction (gp_Dir) –
  • Angle (float) –
  • NeutralPlane (gp_Pln) –
  • Flag (bool) – default value is Standard_True
Return type:

bool

Clear()
  • Resets on the same shape.
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
Error()
Return type:Draft_ErrorStatus
GetHandle()

Draft_Modification_GetHandle(Draft_Modification self) -> Handle_Draft_Modification

Init()
  • Changes the basis shape and resets.
Parameters:S (TopoDS_Shape &) –
Return type:None
IsDone()
  • Returns True if Perform has been succesfully called. Otherwise more information can be obtained using the methods Error() and ProblematicShape().
Return type:bool
ModifiedFaces()
  • Returns all the faces on which a modification has been given.
Return type:TopTools_ListOfShape
Perform()
  • Performs the draft angle modification and sets the value returned by the method IsDone. If an error occurs, IsDone will return Standard_False, and an error status will be given by the method Error, and the shape on which the problem appeared will be given by ProblematicShape
Return type:None
ProblematicShape()
  • Returns the shape (Face, Edge or Vertex) on which an error occured.
Return type:TopoDS_Shape
Remove()
  • Removes the face F and the neighbour faces if they are tangent. It will be necessary to call this method if the method Add returns Standard_False, to unset ProblematicFace.
Parameters:F (TopoDS_Face &) –
Return type:None
thisown

The membership flag

class OCC.Draft.Draft_VertexInfo

Bases: object

Add()
Parameters:E (TopoDS_Edge &) –
Return type:None
ChangeGeometry()
Return type:gp_Pnt
ChangeParameter()
Parameters:E (TopoDS_Edge &) –
Return type:float
Edge()
Return type:TopoDS_Edge
Geometry()
Return type:gp_Pnt
InitEdgeIterator()
Return type:None
MoreEdge()
Return type:bool
NextEdge()
Return type:None
Parameter()
Parameters:E (TopoDS_Edge &) –
Return type:float
thisown

The membership flag

class OCC.Draft.Handle_Draft_DataMapNodeOfDataMapOfEdgeEdgeInfo(*args)

Bases: OCC.TCollection.Handle_TCollection_MapNode

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

The membership flag

class OCC.Draft.Handle_Draft_DataMapNodeOfDataMapOfFaceFaceInfo(*args)

Bases: OCC.TCollection.Handle_TCollection_MapNode

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

The membership flag

class OCC.Draft.Handle_Draft_DataMapNodeOfDataMapOfVertexVertexInfo(*args)

Bases: OCC.TCollection.Handle_TCollection_MapNode

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

The membership flag

class OCC.Draft.Handle_Draft_Modification(*args)

Bases: OCC.BRepTools.Handle_BRepTools_Modification

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

The membership flag

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

Bases: object

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

The membership flag

value()
class OCC.Draft.draft(*args, **kwargs)

Bases: object

static Angle(*args)
  • Returns the draft angle of the face <F> using the direction <Direction>. The method is valid for : - Plane faces, - Cylindrical or conical faces, when the direction of the axis of the surface is colinear with the direction. Otherwise, the exception DomainError is raised.
Parameters:
  • F (TopoDS_Face &) –
  • Direction (gp_Dir) –
Return type:

float

thisown

The membership flag

OCC.Draft.draft_Angle(*args)
  • Returns the draft angle of the face <F> using the direction <Direction>. The method is valid for : - Plane faces, - Cylindrical or conical faces, when the direction of the axis of the surface is colinear with the direction. Otherwise, the exception DomainError is raised.
Parameters:
  • F (TopoDS_Face &) –
  • Direction (gp_Dir) –
Return type:

float