OCC.STEPControl module¶
-Purpose : This package provides external access and control for STEP,especially to deal with Shapes
-
class
Handle_STEPControl_ActorRead
(*args)¶ Bases:
object
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_STEPControl_ActorWrite
(*args)¶ Bases:
object
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_STEPControl_Controller
(*args)¶ Bases:
OCC.XSControl.Handle_XSControl_Controller
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
STEPControl_ActorRead
(*args)¶ Bases:
object
Return type: None -
ComputeSRRWT
()¶ - Computes transformation defined by given REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION
Parameters: - SRR (Handle_StepRepr_RepresentationRelationship &) –
- TP (Handle_Transfer_TransientProcess &) –
- Trsf (gp_Trsf) –
Return type:
-
ComputeTransformation
()¶ - Computes transformation defined by two axis placements (in MAPPED_ITEM or ITEM_DEFINED_TRANSFORMATION) taking into account their representation contexts (i.e. units, which may be different) Returns True if transformation is computed and is not an identity.
Parameters: - Origin (Handle_StepGeom_Axis2Placement3d &) –
- Target (Handle_StepGeom_Axis2Placement3d &) –
- OrigContext (Handle_StepRepr_Representation &) –
- TargContext (Handle_StepRepr_Representation &) –
- TP (Handle_Transfer_TransientProcess &) –
- Trsf (gp_Trsf) –
Return type:
-
GetHandle
()¶
-
PrepareUnits
()¶ - set units and tolerances context by given ShapeRepresentation
Parameters: - rep (Handle_StepRepr_Representation &) –
- TP (Handle_Transfer_TransientProcess &) –
Return type:
-
ResetUnits
()¶ - reset units and tolerances context to default (mm, radians, read.precision.val, etc.)
Return type: None
-
Transfer
()¶ Parameters: - start (Handle_Standard_Transient &) –
- TP (Handle_Transfer_TransientProcess &) –
Return type: Handle_Transfer_Binder
-
TransferShape
()¶ Parameters: - start (Handle_Standard_Transient &) –
- TP (Handle_Transfer_TransientProcess &) –
- isManifold (bool) – default value is Standard_True
Return type: Handle_Transfer_Binder
-
thisown
¶ The membership flag
-
-
class
STEPControl_ActorWrite
(*args)¶ Bases:
object
Return type: None -
GetHandle
()¶
-
IsAssembly
()¶ - Customizable method to check whether shape S should be written as assembly or not Default implementation uses flag GroupMode and analyses the shape itself NOTE: this method can modify shape
Parameters: S (TopoDS_Shape &) – Return type: bool
-
Mode
()¶ Return type: STEPControl_StepModelType
-
Transfer
()¶ Parameters: - start (Handle_Transfer_Finder &) –
- FP (Handle_Transfer_FinderProcess &) –
Return type: Handle_Transfer_Binder
-
TransferCompound
()¶ Parameters: - start (Handle_Transfer_Finder &) –
- SDR (Handle_StepShape_ShapeDefinitionRepresentation &) –
- FP (Handle_Transfer_FinderProcess &) –
Return type: Handle_Transfer_Binder
-
TransferShape
()¶ Parameters: - start (Handle_Transfer_Finder &) –
- SDR (Handle_StepShape_ShapeDefinitionRepresentation &) –
- FP (Handle_Transfer_FinderProcess &) –
- shapeGroup (Handle_TopTools_HSequenceOfShape &) – default value is NULL
- isManifold (bool) – default value is Standard_True
Return type: Handle_Transfer_Binder
-
TransferSubShape
()¶ Parameters: - start (Handle_Transfer_Finder &) –
- SDR (Handle_StepShape_ShapeDefinitionRepresentation &) –
- AX1 (Handle_StepGeom_Axis2Placement3d &) –
- FP (Handle_Transfer_FinderProcess &) –
- shapeGroup (Handle_TopTools_HSequenceOfShape &) – default value is NULL
- isManifold (bool) – default value is Standard_True
Return type: Handle_Transfer_Binder
-
thisown
¶ The membership flag
-
-
class
STEPControl_Controller
(*args)¶ Bases:
OCC.XSControl.XSControl_Controller
- Initializes the use of STEP Norm (the first time) and returns a Controller
Return type: None -
GetHandle
()¶
-
static
Init
()¶ - Standard Initialisation. It creates a Controller for STEP and records it to various names, available to select it later Returns True when done, False if could not be done
Return type: bool
-
thisown
¶ The membership flag
-
STEPControl_Controller_Init
()¶ - Standard Initialisation. It creates a Controller for STEP and records it to various names, available to select it later Returns True when done, False if could not be done
Return type: bool
-
class
STEPControl_Reader
(*args)¶ Bases:
OCC.XSControl.XSControl_Reader
- Creates a reader object with an empty STEP model.
Return type: None - Creates a Reader for STEP from an already existing Session Clears the session if it was not yet set for STEP
Parameters: - WS (Handle_XSControl_WorkSession &) –
- scratch (bool) – default value is Standard_True
Return type: -
FileUnits
()¶ - Returns sequence of all unit names for shape representations found in file
Parameters: - theUnitLengthNames (TColStd_SequenceOfAsciiString &) –
- theUnitAngleNames (TColStd_SequenceOfAsciiString &) –
- theUnitSolidAngleNames (TColStd_SequenceOfAsciiString &) –
Return type:
-
StepModel
()¶ - Returns the model as a StepModel. It can then be consulted (header, product)
Return type: Handle_StepData_StepModel
-
TransferRoot
()¶ - Transfers a root given its rank in the list of candidate roots Default is the first one Returns True if a shape has resulted, false else Same as inherited TransferOneRoot, kept for compatibility
Parameters: num (int) – default value is 1 Return type: bool
-
thisown
¶ The membership flag
-
class
STEPControl_Writer
(*args)¶ Bases:
object
- Creates a Writer from scratch
Return type: None - Creates a Writer from an already existing Session If <scratch> is True (D), clears already recorded data
Parameters: - WS (Handle_XSControl_WorkSession &) –
- scratch (bool) – default value is Standard_True
Return type: -
Model
()¶ - Returns the produced model. Produces a new one if not yet done or if <newone> is True This method allows for instance to edit product or header data before writing.
Parameters: newone (bool) – default value is Standard_False Return type: Handle_StepData_StepModel
-
PrintStatsTransfer
()¶ - Displays the statistics for the last translation. what defines the kind of statistics that are displayed: - 0 gives general statistics (number of translated roots, number of warnings, number of fail messages), - 1 gives root results, - 2 gives statistics for all checked entities, - 3 gives the list of translated entities, - 4 gives warning and fail messages, - 5 gives fail messages only. mode is used according to the use of what. If what is 0, mode is ignored. If what is 1, 2 or 3, mode defines the following: - 0 lists the numbers of STEP entities in a STEP model, - 1 gives the number, identifier, type and result type for each STEP entity and/or its status (fail, warning, etc.), - 2 gives maximum information for each STEP entity (i.e. checks), - 3 gives the number of entities by the type of a STEP entity, - 4 gives the number of of STEP entities per result type and/or status, - 5 gives the number of pairs (STEP or result type and status), - 6 gives the number of pairs (STEP or result type and status) AND the list of entity numbers in the STEP model.
Parameters: Return type:
-
SetTolerance
()¶ - Sets a length-measure value that will be written to uncertainty-measure-with-unit when the next shape is translated.
Parameters: Tol (float) – Return type: None
-
SetWS
()¶ - Sets a specific session to <self>
Parameters: - WS (Handle_XSControl_WorkSession &) –
- scratch (bool) – default value is Standard_True
Return type:
-
Transfer
()¶ - Translates shape sh to a STEP entity. mode defines the STEP entity type to be output: - STEPControlStd_AsIs translates a shape to its highest possible STEP representation. - STEPControlStd_ManifoldSolidBrep translates a shape to a STEP manifold_solid_brep or brep_with_voids entity. - STEPControlStd_FacetedBrep translates a shape into a STEP faceted_brep entity. - STEPControlStd_ShellBasedSurfaceModel translates a shape into a STEP shell_based_surface_model entity. - STEPControlStd_GeometricCurveSet translates a shape into a STEP geometric_curve_set entity.
Parameters: - sh (TopoDS_Shape &) –
- mode (STEPControl_StepModelType) –
- compgraph (bool) – default value is Standard_True
Return type: IFSelect_ReturnStatus
-
WS
()¶ - Returns the session used in <self>
Return type: Handle_XSControl_WorkSession
-
Write
()¶ - Writes a STEP model in the file identified by filename.
Parameters: filename (char *) – Return type: IFSelect_ReturnStatus
-
thisown
¶ The membership flag
-
class
SwigPyIterator
(*args, **kwargs)¶ Bases:
object
-
advance
()¶
-
copy
()¶
-
decr
()¶
-
distance
()¶
-
equal
()¶
-
incr
()¶
-
next
()¶
-
previous
()¶
-
thisown
¶ The membership flag
-
value
()¶
-
-
new_instancemethod
(func, inst, cls)¶
-
register_handle
(handle, base_object)¶ Inserts the handle into the base object to prevent memory corruption in certain cases