OCC.ShapeProcess module

class OCC.ShapeProcess.Handle_ShapeProcess_Context(*args)

Bases: OCC.MMgt.Handle_MMgt_TShared

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

The membership flag

class OCC.ShapeProcess.Handle_ShapeProcess_DictionaryOfOperator(*args)

Bases: OCC.MMgt.Handle_MMgt_TShared

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

The membership flag

class OCC.ShapeProcess.Handle_ShapeProcess_Operator(*args)

Bases: OCC.MMgt.Handle_MMgt_TShared

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

The membership flag

class OCC.ShapeProcess.Handle_ShapeProcess_ShapeContext(*args)

Bases: OCC.ShapeProcess.Handle_ShapeProcess_Context

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

The membership flag

class OCC.ShapeProcess.Handle_ShapeProcess_StackItemOfDictionaryOfOperator(*args)

Bases: OCC.MMgt.Handle_MMgt_TShared

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

The membership flag

class OCC.ShapeProcess.Handle_ShapeProcess_UOperator(*args)

Bases: OCC.ShapeProcess.Handle_ShapeProcess_Operator

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

The membership flag

class OCC.ShapeProcess.ShapeProcess_Context(*args)

Bases: OCC.MMgt.MMgt_TShared

BooleanVal()
Parameters:
  • param (char *) –
  • def (bool) –
Return type:

bool

GetBoolean()
Parameters:
  • param (char *) –
  • val (bool) –
Return type:

bool

GetHandle()

ShapeProcess_Context_GetHandle(ShapeProcess_Context self) -> Handle_ShapeProcess_Context

GetInteger()
Parameters:
  • param (char *) –
  • val (Standard_Integer &) –
Return type:

bool

GetReal()
Parameters:
  • param (char *) –
  • val (float &) –
Return type:

bool

GetString()
  • Get value of parameter as being of specific type Returns False if parameter is not defined or has a wrong type
Parameters:
  • param (char *) –
  • val (TCollection_AsciiString &) –
Return type:

bool

Init()
  • Initialises a tool by loading resource file and (if specified) sets starting scope Returns False if resource file not found
Parameters:
  • file (char *) –
  • scope (char *) – default value is
Return type:

bool

  • Initialises a tool by loading resource file and (if specified) sets starting scope Returns False if resource file not found
Parameters:
  • file (char *) –
  • scope (char *) – default value is
Return type:

bool

IntegerVal()
Parameters:
  • param (char *) –
  • def (Standard_Integer) –
Return type:

int

IsParamSet()
  • Returns True if parameter is defined in the resource file
Parameters:param (char *) –
Return type:bool
LoadResourceManager()
  • Loading Resource_Manager object if this object not equal internal static Resource_Manager object or internal static Resource_Manager object is null
Parameters:file (char *) –
Return type:Handle_Resource_Manager
Messenger()
  • Returns Messenger used for outputting messages.
Return type:Handle_Message_Messenger
Progress()
  • Returns Progress Indicator.
Return type:Handle_Message_ProgressIndicator
RealVal()
Parameters:
  • param (char *) –
  • def (float) –
Return type:

float

ResourceManager()
  • Returns internal Resource_Manager object
Return type:Handle_Resource_Manager
SetMessenger()
  • Sets Messenger used for outputting messages.
Parameters:messenger (Handle_Message_Messenger &) –
Return type:None
SetProgress()
  • Sets Progress Indicator.
Parameters:theProgress (Handle_Message_ProgressIndicator &) –
Return type:None
SetScope()
  • Set a new (sub)scope
Parameters:scope (char *) –
Return type:None
SetTraceLevel()
  • Sets trace level used for outputting messages - 0: no trace at all - 1: errors - 2: errors and warnings - 3: all messages Default is 1 : Errors traced
Parameters:tracelev (Standard_Integer) –
Return type:None
StringVal()
  • Get value of parameter as being of specific type If parameter is not defined or does not have expected type, returns default value as specified
Parameters:
  • param (char *) –
  • def (char *) –
Return type:

char *

TraceLevel()
  • Returns trace level used for outputting messages.
Return type:int
UnSetScope()
  • Go out of current scope
Return type:None
thisown

The membership flag

class OCC.ShapeProcess.ShapeProcess_DictionaryOfOperator

Bases: OCC.MMgt.MMgt_TShared

Clean()
Return type:None
Clear()
Return type:None
Complete()
Parameters:acell (Handle_ShapeProcess_DictionaryOfOperator &) –
Return type:bool
Copy()
Return type:Handle_ShapeProcess_DictionaryOfOperator
GetHandle()

ShapeProcess_DictionaryOfOperator_GetHandle(ShapeProcess_DictionaryOfOperator self) -> Handle_ShapeProcess_DictionaryOfOperator

GetItem()
Parameters:
  • name (TCollection_AsciiString &) –
  • anitem (Handle_ShapeProcess_Operator &) –
  • exact (bool) – default value is Standard_True
  • name
  • anitem
  • exact – default value is Standard_True
  • name
  • anitem
  • exact – default value is Standard_True
  • name
  • anitem
  • exact – default value is Standard_True
Return type:

bool

Return type:

bool

Return type:

bool

Return type:

bool

HasItem()
Parameters:
  • name (TCollection_AsciiString &) –
  • exact (bool) – default value is Standard_False
  • name
  • exact – default value is Standard_False
  • name
  • exact – default value is Standard_True
  • name
  • exact – default value is Standard_True
Return type:

bool

Return type:

bool

Return type:

bool

Return type:

bool

IsEmpty()
Return type:bool
Item()
Parameters:
  • name (TCollection_AsciiString &) –
  • exact (bool) – default value is Standard_True
  • name
  • exact – default value is Standard_True
  • name
  • exact – default value is Standard_True
  • name
  • exact – default value is Standard_True
Return type:

Handle_ShapeProcess_Operator

Return type:

Handle_ShapeProcess_Operator

Return type:

Handle_ShapeProcess_Operator

Return type:

Handle_ShapeProcess_Operator

NewItem()
Parameters:
  • name (TCollection_AsciiString &) –
  • isvalued (bool) –
  • exact (bool) – default value is Standard_True
  • name
  • isvalued
  • exact – default value is Standard_True
  • name
  • isvalued
  • exact – default value is Standard_True
  • name
  • isvalued
  • exact – default value is Standard_True
Return type:

Handle_ShapeProcess_Operator

Return type:

Handle_ShapeProcess_Operator

Return type:

Handle_ShapeProcess_Operator

Return type:

Handle_ShapeProcess_Operator

RemoveItem()
Parameters:
  • name (TCollection_AsciiString &) –
  • cln (bool) – default value is Standard_True
  • exact (bool) – default value is Standard_True
  • name
  • cln – default value is Standard_True
  • exact – default value is Standard_True
  • name
  • cln – default value is Standard_True
  • exact – default value is Standard_True
  • name
  • cln – default value is Standard_True
  • exact – default value is Standard_True
  • name
  • cln – default value is Standard_True
  • exact – default value is Standard_True
  • name
  • cln – default value is Standard_True
  • exact – default value is Standard_True
Return type:

bool

Return type:

bool

Return type:

bool

Return type:

bool

Return type:

bool

Return type:

bool

SetItem()
Parameters:
  • name (TCollection_AsciiString &) –
  • anitem (Handle_ShapeProcess_Operator &) –
  • exact (bool) – default value is Standard_True
  • name
  • anitem
  • exact – default value is Standard_True
  • name
  • anitem
  • exact – default value is Standard_True
  • name
  • anitem
  • exact – default value is Standard_True
Return type:

None

Return type:

None

Return type:

None

Return type:

None

thisown

The membership flag

class OCC.ShapeProcess.ShapeProcess_IteratorOfDictionaryOfOperator(*args)

Bases: object

More()
Return type:bool
Name()
Return type:TCollection_AsciiString
Next()
Return type:None
Start()
Return type:None
Value()
Return type:Handle_ShapeProcess_Operator
thisown

The membership flag

class OCC.ShapeProcess.ShapeProcess_OperLibrary(*args, **kwargs)

Bases: object

static ApplyModifier(*args)
  • Applies BRepTools_Modification to a shape, taking into account sharing of components of compounds.
Parameters:
  • S (TopoDS_Shape &) –
  • context (Handle_ShapeProcess_ShapeContext &) –
  • M (Handle_BRepTools_Modification &) –
  • map (TopTools_DataMapOfShapeShape &) –
Return type:

TopoDS_Shape

static Init()
  • Registers all the operators
Return type:void
thisown

The membership flag

OCC.ShapeProcess.ShapeProcess_OperLibrary_ApplyModifier(*args)
  • Applies BRepTools_Modification to a shape, taking into account sharing of components of compounds.
Parameters:
  • S (TopoDS_Shape &) –
  • context (Handle_ShapeProcess_ShapeContext &) –
  • M (Handle_BRepTools_Modification &) –
  • map (TopTools_DataMapOfShapeShape &) –
Return type:

TopoDS_Shape

OCC.ShapeProcess.ShapeProcess_OperLibrary_Init()
  • Registers all the operators
Return type:void
class OCC.ShapeProcess.ShapeProcess_Operator(*args, **kwargs)

Bases: OCC.MMgt.MMgt_TShared

GetHandle()

ShapeProcess_Operator_GetHandle(ShapeProcess_Operator self) -> Handle_ShapeProcess_Operator

Perform()
  • Performs operation and eventually records changes in the context
Parameters:context (Handle_ShapeProcess_Context &) –
Return type:bool
thisown

The membership flag

class OCC.ShapeProcess.ShapeProcess_ShapeContext(*args)

Bases: OCC.ShapeProcess.ShapeProcess_Context

AddMessage()
  • Record a message for shape S Shape S should be one of subshapes of original shape (or whole one), but not one of intermediate shapes Records only if Message() is not Null
Parameters:
  • S (TopoDS_Shape &) –
  • msg (Message_Msg &) –
  • gravity (Message_Gravity) – default value is Message_Warning
Return type:

None

  • Record a message for shape S Shape S should be one of subshapes of original shape (or whole one), but not one of intermediate shapes Records only if Message() is not Null
Parameters:
  • S (TopoDS_Shape &) –
  • msg (Message_Msg &) –
  • gravity (Message_Gravity) – default value is Message_Warning
Return type:

None

ContinuityVal()
  • Get value of parameter as being of the type GeomAbs_Shape If parameter is not defined or does not have expected type, returns default value as specified
Parameters:
  • param (char *) –
  • def (GeomAbs_Shape) –
Return type:

GeomAbs_Shape

GetContinuity()
  • Get value of parameter as being of the type GeomAbs_Shape Returns False if parameter is not defined or has a wrong type
Parameters:
  • param (char *) –
  • val (GeomAbs_Shape &) –
Return type:

bool

GetDetalisation()
  • Set and get value for detalisation level Only shapes of types from TopoDS_COMPOUND and until specified detalisation level will be recorded in maps To cancel mapping, use TopAbs_SHAPE To force full mapping, use TopAbs_VERTEX The default level is TopAbs_FACE
Return type:TopAbs_ShapeEnum
GetHandle()

ShapeProcess_ShapeContext_GetHandle(ShapeProcess_ShapeContext self) -> Handle_ShapeProcess_ShapeContext

Init()
  • Initializes tool by a new shape and clears all results
Parameters:S (TopoDS_Shape &) –
Return type:None
Map()
  • Returns map of replacements shape -> shape This map is not recursive
Return type:TopTools_DataMapOfShapeShape
Messages()
Return type:Handle_ShapeExtend_MsgRegistrator
PrintStatistics()
  • Prints statistics on Shape Processing onto the current Messenger.
Return type:None
RecordModification()
Parameters:
  • repl (Handle_ShapeBuild_ReShape &) –
  • repl
  • msg (Handle_ShapeExtend_MsgRegistrator &) –
  • repl
Return type:

None

Return type:

None

Return type:

None

  • Records modifications and resets result accordingly NOTE: modification of resulting shape should be explicitly defined in the maps along with modifications of subshapes In the last function, sh is the shape on which Modifier was run. It can be different from the whole shape, but in that case result as a whole should be reset later either by call to SetResult(), or by another call to RecordModification() which contains mapping of current result to a new one explicitly
Parameters:
  • sh (TopoDS_Shape &) –
  • repl (BRepTools_Modifier &) –
Return type:

None

Result()
  • Returns current result
Return type:TopoDS_Shape
SetDetalisation()
Parameters:level (TopAbs_ShapeEnum) –
Return type:None
SetResult()
  • Sets a new result shape NOTE: this method should be used very carefully to keep consistency of modifications It is recommended to use RecordModification() methods with explicit definition of mapping from current result to a new one
Parameters:S (TopoDS_Shape &) –
Return type:None
Shape()
  • Returns shape being processed
Return type:TopoDS_Shape
thisown

The membership flag

class OCC.ShapeProcess.ShapeProcess_StackItemOfDictionaryOfOperator(*args)

Bases: OCC.MMgt.MMgt_TShared

GetHandle()

ShapeProcess_StackItemOfDictionaryOfOperator_GetHandle(ShapeProcess_StackItemOfDictionaryOfOperator self) -> Handle_ShapeProcess_StackItemOfDictionaryOfOperator

Previous()
Return type:Handle_ShapeProcess_StackItemOfDictionaryOfOperator
SetValue()
Parameters:cval (Handle_ShapeProcess_DictionaryOfOperator &) –
Return type:None
Value()
Return type:Handle_ShapeProcess_DictionaryOfOperator
thisown

The membership flag

class OCC.ShapeProcess.ShapeProcess_UOperator(*args)

Bases: OCC.ShapeProcess.ShapeProcess_Operator

GetHandle()

ShapeProcess_UOperator_GetHandle(ShapeProcess_UOperator self) -> Handle_ShapeProcess_UOperator

thisown

The membership flag

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

Bases: object

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

The membership flag

value()
class OCC.ShapeProcess.shapeprocess(*args, **kwargs)

Bases: object

static FindOperator(*args)
  • Finds operator by its name
Parameters:
  • name (char *) –
  • op (Handle_ShapeProcess_Operator &) –
Return type:

bool

static Perform(*args)
  • Performs a specified sequence of operators on Context Resource file and other data should be already loaded to Context (including description of sequence seq)
Parameters:
  • context (Handle_ShapeProcess_Context &) –
  • seq (char *) –
Return type:

bool

static RegisterOperator(*args)
  • Registers operator to make it visible for Performer
Parameters:
  • name (char *) –
  • op (Handle_ShapeProcess_Operator &) –
Return type:

bool

thisown

The membership flag

OCC.ShapeProcess.shapeprocess_FindOperator(*args)
  • Finds operator by its name
Parameters:
  • name (char *) –
  • op (Handle_ShapeProcess_Operator &) –
Return type:

bool

OCC.ShapeProcess.shapeprocess_Perform(*args)
  • Performs a specified sequence of operators on Context Resource file and other data should be already loaded to Context (including description of sequence seq)
Parameters:
  • context (Handle_ShapeProcess_Context &) –
  • seq (char *) –
Return type:

bool

OCC.ShapeProcess.shapeprocess_RegisterOperator(*args)
  • Registers operator to make it visible for Performer
Parameters:
  • name (char *) –
  • op (Handle_ShapeProcess_Operator &) –
Return type:

bool