OCC.Core.STEPControl module¶
STEPControl module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_stepcontrol.html
-
class
STEPControl_ActorRead
(*args)¶ Bases:
OCC.Core.Transfer.Transfer_ActorOfTransientProcess
- Return type
-
ComputeSRRWT
()¶ - Computes transformation defined by given REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION
- param SRR
- type SRR
StepRepr_RepresentationRelationship
- param TP
- type TP
Transfer_TransientProcess
- param Trsf
- type Trsf
gp_Trsf
- rtype
bool
-
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.
- param Origin
- type Origin
StepGeom_Axis2Placement3d
- param Target
- type Target
StepGeom_Axis2Placement3d
- param OrigContext
- type OrigContext
StepRepr_Representation
- param TargContext
- type TargContext
StepRepr_Representation
- param TP
- type TP
Transfer_TransientProcess
- param Trsf
- type Trsf
gp_Trsf
- rtype
bool
-
static
DownCast
(t)¶
-
PrepareUnits
()¶ - set units and tolerances context by given ShapeRepresentation
- param rep
- type rep
StepRepr_Representation
- param TP
- type TP
Transfer_TransientProcess
- rtype
None
-
ResetUnits
()¶ - reset units and tolerances context to default (mm, radians, read.precision.val, etc.)
- rtype
None
-
TransferShape
()¶ - Parameters
start –
- type start
Standard_Transient
- param TP
- type TP
Transfer_TransientProcess
- param isManifold
default value is Standard_True
- type isManifold
bool
- rtype
opencascade::handle<Transfer_Binder>
-
property
thisown
¶ The membership flag
-
class
STEPControl_ActorWrite
(*args)¶ Bases:
OCC.Core.Transfer.Transfer_ActorOfFinderProcess
- Return type
-
static
DownCast
(t)¶
-
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
- param S
- type S
TopoDS_Shape
- rtype
bool
-
Mode
()¶ - Return type
STEPControl_StepModelType
-
SetGroupMode
()¶ - Parameters
mode –
- type mode
int
- rtype
None
-
SetMode
()¶ - Parameters
M –
- type M
STEPControl_StepModelType
- rtype
None
-
SetTolerance
()¶ - Parameters
Tol –
- type Tol
float
- rtype
None
-
TransferCompound
()¶ - Parameters
start –
- type start
Transfer_Finder
- param SDR
- type SDR
StepShape_ShapeDefinitionRepresentation
- param FP
- type FP
Transfer_FinderProcess
- rtype
opencascade::handle<Transfer_Binder>
-
TransferShape
()¶ - Parameters
start –
- type start
Transfer_Finder
- param SDR
- type SDR
StepShape_ShapeDefinitionRepresentation
- param FP
- type FP
Transfer_FinderProcess
- param shapeGroup
default value is NULL
- type shapeGroup
TopTools_HSequenceOfShape
- param isManifold
default value is Standard_True
- type isManifold
bool
- rtype
opencascade::handle<Transfer_Binder>
-
TransferSubShape
()¶ - Parameters
start –
- type start
Transfer_Finder
- param SDR
- type SDR
StepShape_ShapeDefinitionRepresentation
- param AX1
- type AX1
StepGeom_Axis2Placement3d
- param FP
- type FP
Transfer_FinderProcess
- param shapeGroup
default value is NULL
- type shapeGroup
TopTools_HSequenceOfShape
- param isManifold
default value is Standard_True
- type isManifold
bool
- rtype
opencascade::handle<Transfer_Binder>
-
property
thisown
¶ The membership flag
-
class
STEPControl_Controller
(*args)¶ Bases:
OCC.Core.XSControl.XSControl_Controller
- Initializes the use of STEP Norm (the first time) and returns a Controller
- rtype
None
-
static
DownCast
(t)¶
-
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
- rtype
bool
-
property
thisown
¶ The membership flag
-
class
STEPControl_Reader
(*args)¶ Bases:
OCC.Core.XSControl.XSControl_Reader
- Creates a reader object with an empty STEP model.
- rtype
None* Creates a Reader for STEP from an already existing Session Clears the session if it was not yet set for STEP
- param WS
- type WS
XSControl_WorkSession
- param scratch
default value is Standard_True
- type scratch
bool
- rtype
None
-
FileUnits
()¶ - Returns sequence of all unit names for shape representations found in file
- param theUnitLengthNames
- type theUnitLengthNames
TColStd_SequenceOfAsciiString
- param theUnitAngleNames
- type theUnitAngleNames
TColStd_SequenceOfAsciiString
- param theUnitSolidAngleNames
- type theUnitSolidAngleNames
TColStd_SequenceOfAsciiString
- rtype
None
-
StepModel
()¶ - Returns the model as a StepModel. It can then be consulted (header, product)
- rtype
opencascade::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
- param num
default value is 1
- type num
int
- rtype
bool
-
property
thisown
¶ The membership flag
-
class
STEPControl_Writer
(*args)¶ Bases:
object
- Creates a Writer from scratch
- rtype
None* Creates a Writer from an already existing Session If <scratch> is True (D), clears already recorded data
- param WS
- type WS
XSControl_WorkSession
- param scratch
default value is Standard_True
- type scratch
bool
- rtype
None
-
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.
- param newone
default value is Standard_False
- type newone
bool
- rtype
opencascade::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.
- param what
- type what
int
- param mode
default value is 0
- type mode
int
- rtype
None
-
SetTolerance
()¶ - Sets a length-measure value that will be written to uncertainty-measure-with-unit when the next shape is translated.
- param Tol
- type Tol
float
- rtype
None
-
SetWS
()¶ - Sets a specific session to <self>
- param WS
- type WS
XSControl_WorkSession
- param scratch
default value is Standard_True
- type scratch
bool
- rtype
None
-
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.
- param sh
- type sh
TopoDS_Shape
- param mode
- type mode
STEPControl_StepModelType
- param compgraph
default value is Standard_True
- type compgraph
bool
- rtype
IFSelect_ReturnStatus
-
UnsetTolerance
()¶ - Unsets the tolerance formerly forced by SetTolerance
- rtype
None
-
WS
()¶ - Returns the session used in <self>
- rtype
opencascade::handle<XSControl_WorkSession>
-
Write
()¶ - Writes a STEP model in the file identified by filename.
- param filename
- type filename
char *
- rtype
IFSelect_ReturnStatus
-
property
thisown
¶ The membership flag