OCC.Core.ShapeProcess module¶
ShapeProcess module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_shapeprocess.html
-
class
ShapeProcess_Context
(*args)¶ Bases:
OCC.Core.Standard.Standard_Transient
- Creates an empty tool
- rtype
None* Creates a new tool and initialises by name of resource file and (if specified) starting scope Calls method Init()
- param file
- type file
char *
- param scope
default value is
- type scope
char *
- rtype
None
-
BooleanVal
()¶ - Parameters
param –
- type param
char *
- param def
- type def
bool
- rtype
bool
-
static
DownCast
(t)¶
-
GetBoolean
()¶ - Parameters
param –
- type param
char *
- param val
- type val
bool
- rtype
bool
-
GetInteger
()¶ - Parameters
param –
- type param
char *
- param val
- type val
int
- rtype
bool
-
GetReal
()¶ - Parameters
param –
- type param
char *
- param val
- type val
float
- rtype
bool
-
GetString
()¶ - Get value of parameter as being of specific type Returns False if parameter is not defined or has a wrong type
- param param
- type param
char *
- param val
- type val
TCollection_AsciiString
- rtype
bool
-
Init
()¶ - Initialises a tool by loading resource file and (if specified) sets starting scope Returns False if resource file not found
- param file
- type file
char *
- param scope
default value is
- type scope
char *
- rtype
bool
-
IntegerVal
()¶ - Parameters
param –
- type param
char *
- param def
- type def
int
- rtype
int
-
IsParamSet
()¶ - Returns True if parameter is defined in the resource file
- param param
- type param
char *
- rtype
bool
-
LoadResourceManager
()¶ - Loading Resource_Manager object if this object not equal internal static Resource_Manager object or internal static Resource_Manager object is null
- param file
- type file
char *
- rtype
opencascade::handle<Resource_Manager>
-
Messenger
()¶ - Returns Messenger used for outputting messages.
- rtype
opencascade::handle<Message_Messenger>
-
Progress
()¶ - Returns Progress Indicator.
- rtype
opencascade::handle<Message_ProgressIndicator>
-
RealVal
()¶ - Parameters
param –
- type param
char *
- param def
- type def
float
- rtype
float
-
ResourceManager
()¶ - Returns internal Resource_Manager object
- rtype
opencascade::handle<Resource_Manager>
-
SetMessenger
()¶ - Sets Messenger used for outputting messages.
- param messenger
- type messenger
Message_Messenger
- rtype
None
-
SetProgress
()¶ - Sets Progress Indicator.
- param theProgress
- type theProgress
Message_ProgressIndicator
- rtype
None
-
SetScope
()¶ - Set a new (sub)scope
- param scope
- type scope
char *
- rtype
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 1Errors traced
- param tracelev
- type tracelev
int
- rtype
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
- param param
- type param
char *
- param def
- type def
char *
- rtype
char *
-
TraceLevel
()¶ - Returns trace level used for outputting messages.
- rtype
int
-
UnSetScope
()¶ - Go out of current scope
- rtype
None
-
property
thisown
¶ The membership flag
-
class
ShapeProcess_OperLibrary
¶ Bases:
object
-
static
ApplyModifier
()¶ - Applies BRepTools_Modification to a shape, taking into account sharing of components of compounds. if theMutableInput vat is set to true then imput shape S can be modified during the modification process.
- param S
- type S
TopoDS_Shape
- param context
- type context
ShapeProcess_ShapeContext
- param M
- type M
BRepTools_Modification
- param map
- type map
TopTools_DataMapOfShapeShape
- param msg
default value is 0
- type msg
ShapeExtend_MsgRegistrator
- param theMutableInput
default value is Standard_False
- type theMutableInput
bool
- rtype
TopoDS_Shape
-
static
Init
()¶ - Registers all the operators
- rtype
void
-
property
thisown
¶ The membership flag
-
static
-
class
ShapeProcess_Operator
(*args, **kwargs)¶ Bases:
OCC.Core.Standard.Standard_Transient
Empty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
static
DownCast
(t)¶
-
Perform
()¶ - Performs operation and eventually records changes in the context
- param context
- type context
ShapeProcess_Context
- rtype
bool
-
property
thisown
¶ The membership flag
-
class
ShapeProcess_ShapeContext
(*args)¶ Bases:
OCC.Core.ShapeProcess.ShapeProcess_Context
- Parameters
file –
- type file
char *
- param seq
default value is
- type seq
char *
- rtype
None* Initializes a tool by resource file and shape to be processed
- param S
- type S
TopoDS_Shape
- param file
- type file
char *
- param seq
default value is
- type seq
char *
- rtype
None
-
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
- param S
- type S
TopoDS_Shape
- param msg
- type msg
Message_Msg
- param gravity
default value is Message_Warning
- type gravity
Message_Gravity
- rtype
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
- param param
- type param
char *
- param def
- type def
GeomAbs_Shape
- rtype
GeomAbs_Shape
-
static
DownCast
(t)¶
-
GetContinuity
()¶ - Get value of parameter as being of the type GeomAbs_Shape Returns False if parameter is not defined or has a wrong type
- param param
- type param
char *
- param val
- type val
GeomAbs_Shape
- rtype
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
- rtype
TopAbs_ShapeEnum
-
Init
()¶ - Initializes tool by a new shape and clears all results
- param S
- type S
TopoDS_Shape
- rtype
None
-
IsNonManifold
()¶ - Get NonManifold flag
- rtype
bool
-
Map
()¶ - Returns map of replacements shape -> shape This map is not recursive
- rtype
TopTools_DataMapOfShapeShape
-
Messages
()¶ - Return type
opencascade::handle<ShapeExtend_MsgRegistrator>
-
PrintStatistics
()¶ - Prints statistics on Shape Processing onto the current Messenger.
- rtype
None
-
RecordModification
()¶ - Parameters
repl –
- type repl
TopTools_DataMapOfShapeShape
- param msg
default value is 0
- type msg
ShapeExtend_MsgRegistrator
- rtype
None:param repl:
- type repl
ShapeBuild_ReShape
- param msg
- type msg
ShapeExtend_MsgRegistrator
- rtype
None:param repl:
- type repl
ShapeBuild_ReShape
- rtype
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
- param sh
- type sh
TopoDS_Shape
- param repl
- type repl
BRepTools_Modifier
- param msg
default value is 0
- type msg
ShapeExtend_MsgRegistrator
- rtype
None
-
Result
()¶ - Returns current result
- rtype
TopoDS_Shape
-
SetDetalisation
()¶ - Parameters
level –
- type level
TopAbs_ShapeEnum
- rtype
None
-
SetNonManifold
()¶ - Set NonManifold flag
- param theNonManifold
- type theNonManifold
bool
- rtype
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
- param S
- type S
TopoDS_Shape
- rtype
None
-
Shape
()¶ - Returns shape being processed
- rtype
TopoDS_Shape
-
property
thisown
¶ The membership flag
-
class
ShapeProcess_UOperator
(*args)¶ Bases:
OCC.Core.ShapeProcess.ShapeProcess_Operator
- Creates operator with implementation defined as OperFunc (static function)
- param func
- type func
ShapeProcess_OperFunc
- rtype
None
-
static
DownCast
(t)¶
-
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
()¶
-
-
class
shapeprocess
¶ Bases:
object
-
static
FindOperator
()¶ - Finds operator by its name
- param name
- type name
char *
- param op
- type op
ShapeProcess_Operator
- rtype
bool
-
static
Perform
()¶ - Performs a specified sequence of operators on Context Resource file and other data should be already loaded to Context (including description of sequence seq)
- param context
- type context
ShapeProcess_Context
- param seq
- type seq
char *
- rtype
bool
-
static
RegisterOperator
()¶ - Registers operator to make it visible for Performer
- param name
- type name
char *
- param op
- type op
ShapeProcess_Operator
- rtype
bool
-
property
thisown
¶ The membership flag
-
static