OCC.STEPControl module

class OCC.STEPControl.Handle_STEPControl_ActorRead(*args)

Bases: object

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

The membership flag

class OCC.STEPControl.Handle_STEPControl_ActorWrite(*args)

Bases: object

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

The membership flag

class OCC.STEPControl.Handle_STEPControl_Controller(*args)

Bases: OCC.XSControl.Handle_XSControl_Controller

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

The membership flag

class OCC.STEPControl.STEPControl_ActorRead

Bases: object

ComputeSRRWT()
  • Computes transformation defined by given REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION
Parameters:
  • SRR (Handle_StepRepr_RepresentationRelationship &) –
  • TP (Handle_Transfer_TransientProcess &) –
  • Trsf (gp_Trsf) –
Return type:

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.
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:

bool

GetHandle()
PrepareUnits()
  • set units and tolerances context by given ShapeRepresentation
Parameters:
  • rep (Handle_StepRepr_Representation &) –
  • TP (Handle_Transfer_TransientProcess &) –
Return type:

None

Recognize()
Parameters:start (Handle_Standard_Transient &) –
Return type:bool
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
  • start
  • TP
  • isManifold – default value is Standard_True
Return type:

Handle_Transfer_Binder

Return type:

Handle_Transfer_Binder

thisown

The membership flag

class OCC.STEPControl.STEPControl_ActorWrite

Bases: object

GetHandle()
GroupMode()
Return type:int
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
Recognize()
Parameters:start (Handle_Transfer_Finder &) –
Return type:bool
SetGroupMode()
Parameters:mode (Standard_Integer) –
Return type:None
SetMode()
Parameters:M (STEPControl_StepModelType) –
Return type:None
SetTolerance()
Parameters:Tol (float) –
Return type:None
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
  • start
  • SDR
  • FP
  • shapeGroup – default value is NULL
  • isManifold – default value is Standard_True
  • start
  • SDR
  • FP
  • shapeGroup – default value is NULL
  • isManifold – default value is Standard_True
Return type:

Handle_Transfer_Binder

Return type:

Handle_Transfer_Binder

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
  • start
  • SDR
  • AX1
  • FP
  • shapeGroup – default value is NULL
  • isManifold – default value is Standard_True
  • start
  • SDR
  • AX1
  • FP
  • shapeGroup – default value is NULL
  • isManifold – default value is Standard_True
Return type:

Handle_Transfer_Binder

Return type:

Handle_Transfer_Binder

Return type:

Handle_Transfer_Binder

thisown

The membership flag

class OCC.STEPControl.STEPControl_Controller

Bases: OCC.XSControl.XSControl_Controller

GetHandle()

STEPControl_Controller_GetHandle(STEPControl_Controller self) -> Handle_STEPControl_Controller

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
TransferWriteShape()
  • Takes one Shape and transfers it to the InterfaceModel (already created by NewModel for instance) <modeshape> is to be interpreted by each kind of XstepAdaptor Returns a status : 0 OK 1 No result 2 Fail -1 bad modeshape -2 bad model (requires a StepModel) modeshape : 1 Facetted BRep, 2 Shell, 3 Manifold Solid
Parameters:
  • shape (TopoDS_Shape &) –
  • FP (Handle_Transfer_FinderProcess &) –
  • model (Handle_Interface_InterfaceModel &) –
  • modetrans (Standard_Integer) – default value is 0
Return type:

IFSelect_ReturnStatus

  • Takes one Shape and transfers it to the InterfaceModel (already created by NewModel for instance) <modeshape> is to be interpreted by each kind of XstepAdaptor Returns a status : 0 OK 1 No result 2 Fail -1 bad modeshape -2 bad model (requires a StepModel) modeshape : 1 Facetted BRep, 2 Shell, 3 Manifold Solid
Parameters:
  • shape (TopoDS_Shape &) –
  • FP (Handle_Transfer_FinderProcess &) –
  • model (Handle_Interface_InterfaceModel &) –
  • modetrans (Standard_Integer) – default value is 0
Return type:

IFSelect_ReturnStatus

thisown

The membership flag

OCC.STEPControl.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 OCC.STEPControl.STEPControl_Reader(*args)

Bases: OCC.XSControl.XSControl_Reader

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:

None

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 (Standard_Integer) – default value is 1
Return type:bool
  • 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 (Standard_Integer) – default value is 1
Return type:bool
thisown

The membership flag

class OCC.STEPControl.STEPControl_Writer(*args)

Bases: object

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
  • 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:
  • what (Standard_Integer) –
  • mode (Standard_Integer) – default value is 0
Return type:

None

  • 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:
  • what (Standard_Integer) –
  • mode (Standard_Integer) – default value is 0
Return type:

None

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:

None

  • Sets a specific session to <self>
Parameters:
  • WS (Handle_XSControl_WorkSession &) –
  • scratch (bool) – default value is Standard_True
Return type:

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.
Parameters:
  • sh (TopoDS_Shape &) –
  • mode (STEPControl_StepModelType) –
  • compgraph (bool) – default value is Standard_True
Return type:

IFSelect_ReturnStatus

  • 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

UnsetTolerance()
  • Unsets the tolerance formerly forced by SetTolerance
Return type:None
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 OCC.STEPControl.SwigPyIterator(*args, **kwargs)

Bases: object

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

The membership flag

value()