STEPCAFControl
OCCT package STEPCAFControl: STEPCAFControl_ActorWrite, STEPCAFControl_Controller, STEPCAFControl_ExternFile, STEPCAFControl_Reader, and 1 more bound classes.
STEPCAFControl_ActorWrite
Extends ActorWrite from STEPControl by analysis of whether shape is assembly (based on information from DECAF).
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(5)
- IsAssembly(theModel: StepData_StepModel, S: TopoDS_Shape): boolean
Check whether shape S is assembly Returns True if shape is registered in assemblies map.
Parameters (2)theModelS—Mutated in place; read the updated value from this argument after the call.
- SetStdMode(stdmode?: boolean): void
Set standard mode of work In standard mode Actor (default) behaves exactly as its ancestor, also map is cleared.
Parameters (1)stdmode
- ClearMap(): void
Clears map of shapes registered as assemblies.
- RegisterAssembly(S: TopoDS_Shape): void
Registers shape to be written as assembly The shape should be
TopoDS_Compound(else does nothing).Parameters (1)S
STEPCAFControl_Controller
Extends Controller from STEPControl in order to provide ActorWrite adapted for writing assemblies from DECAF Note that ActorRead from STEPControl is used for reading (inherited automatically).
Constructors(1)
Initializes the use of STEP Norm (the first time).
Static methods(3)
- Init(): boolean
StandardInitialisation. It creates a Controller for STEP-XCAF and records it to various names, available to select it later Returns True when done, False if could not be done. - get_type_name(): string
Instance methods(1)
STEPCAFControl_ExternFile
Auxiliary class serving as container for data resulting from translation of external file.
Constructors(1)
Creates an empty structure.
Static methods(2)
- get_type_name(): string
Instance methods(13)
- SetWS(WS: XSControl_WorkSession): voidParameters (1)
WS
- SetLoadStatus(stat: IFSelect_ReturnStatus): voidParameters (1)
stat
- SetTransferStatus(isok: boolean): voidParameters (1)
isok
- GetTransferStatus(): boolean
- SetWriteStatus(stat: IFSelect_ReturnStatus): voidParameters (1)
stat
- SetName(name: TCollection_HAsciiString): voidParameters (1)
name
- Parameters (1)
L
STEPCAFControl_Reader
Provides a tool to read STEP file and put it into DECAF document. Besides transfer of shapes (including assemblies) provided by STEPControl, supports also colors and part names.
This reader supports reading files with external references i.e. multifile reading It behaves as usual Reader (from STEPControl) for the main file (e.g. if it is single file) Results of reading other files can be accessed by name of the file or by iterating on a readers
Constructors(2)
Creates a reader with an empty STEP model and sets ColorMode, LayerMode, NameMode and PropsMode to true.
- constructor(WS: XSControl_WorkSession, scratch?: boolean): STEPCAFControl_Reader
Creates a reader tool and attaches it to an already existing Session Clears the session if it was not yet set for STEP.
Parameters (2)WSscratch
Static methods(1)
- FindInstance(NAUO: StepRepr_NextAssemblyUsageOccurrence, STool: XCAFDoc_ShapeTool, Tool: STEPConstruct_Tool, ShapeLabelMap: NCollection_DataMap_TopoDS_Shape_TDF_Label_TopTools_ShapeMapHasher): TDF_Label
Returns label of instance of an assembly component corresponding to a given NAUO.
Parameters (4)NAUOSToolToolShapeLabelMap
Instance methods(35)
- ReadFile(theFileName: string): IFSelect_ReturnStatus
Loads a file and returns the read status Provided for use like single-file reader.
Parameters (1)theFileName—file to open
Returnsread status
- NbRootsForTransfer(): number
Returns number of roots recognized for transfer Shortcut for
Reader().NbRootsForTransfer(). - TransferOneRoot(num: number, doc: TDocStd_Document, theProgress?: Message_ProgressRange): boolean
Translates currently loaded STEP file into the document Returns True if succeeded, and False in case of fail Provided for use like single-file reader.
Parameters (3)numdoctheProgress
- Transfer(doc: TDocStd_Document, theProgress: Message_ProgressRange): boolean
Translates currently loaded STEP file into the document Returns True if succeeded, and False in case of fail Provided for use like single-file reader.
Parameters (2)doctheProgress
- Perform(filename: TCollection_AsciiString, doc: TDocStd_Document, theProgress: Message_ProgressRange): booleanParameters (3)
filenamedoctheProgress
- Perform(filename: string, doc: TDocStd_Document, theProgress: Message_ProgressRange): boolean
Translate STEP file given by filename into the document Return True if succeeded, and False in case of fail.
Parameters (3)filenamedoctheProgress
Returns data on external files Returns Null handle if no external files are read.
- ExternFile(name: string): { returnValue: boolean; ef: STEPCAFControl_ExternFile; [Symbol.dispose](): void }
Returns data on external file by its name Returns False if no external file with given name is read.
Parameters (1)name
ReturnsA result object with fields:
returnValue: the C++ return valueef: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
Returns basic reader.
Returns basic reader as const.
- SetColorMode(colormode: boolean): void
Set ColorMode for indicate read Colors or not.
Parameters (1)colormode
- GetColorMode(): boolean
- SetNameMode(namemode: boolean): void
Set NameMode for indicate read Name or not.
Parameters (1)namemode
- GetNameMode(): boolean
- SetLayerMode(layermode: boolean): void
Set LayerMode for indicate read Layers or not.
Parameters (1)layermode
- GetLayerMode(): boolean
- SetPropsMode(propsmode: boolean): void
PropsMode for indicate read Validation properties or not.
Parameters (1)propsmode
- GetPropsMode(): boolean
- SetMetaMode(theMetaMode: boolean): void
MetaMode for indicate read Metadata or not.
Parameters (1)theMetaMode
- GetMetaMode(): boolean
- SetProductMetaMode(theProductMetaMode: boolean): void
MetaMode for indicate whether to read Product Metadata or not.
Parameters (1)theProductMetaMode
- GetProductMetaMode(): boolean
- SetSHUOMode(shuomode: boolean): void
Set SHUO mode for indicate write SHUO or not.
Parameters (1)shuomode
- GetSHUOMode(): boolean
- SetGDTMode(gdtmode: boolean): void
Set GDT mode for indicate write GDT or not.
Parameters (1)gdtmode
- GetGDTMode(): boolean
- SetMatMode(matmode: boolean): void
Set Material mode.
Parameters (1)matmode
- GetMatMode(): boolean
- SetViewMode(viewmode: boolean): void
Set View mode.
Parameters (1)viewmode
- GetViewMode(): boolean
Get View mode.
- SetShapeFixParameters(theParameters: NCollection_DataMap_TCollection_AsciiString_TCollection_AsciiString): void
Sets parameters for shape processing.
Parameters (1)theParameters—the parameters for shape processing.
Returns parameters for shape processing that was set by SetParameters() method.
Returnsthe parameters for shape processing. Empty map if no parameters were set.
- SetShapeProcessFlags(theFlags: any): void
Sets flags defining operations to be performed on shapes.
Parameters (1)theFlags—The flags defining operations to be performed on shapes.
- GetShapeProcessFlags(): [any, boolean]
Returns flags defining operations to be performed on shapes.
ReturnsPair of values defining operations to be performed on shapes and a boolean value that indicates whether the flags were set.
STEPCAFControl_Writer
Provides a tool to write DECAF document to the STEP file. Besides transfer of shapes (including assemblies) provided by STEPControl, supports also colors and part names.
Also supports multifile writing
Constructors(2)
Creates a writer with an empty STEP model and sets ColorMode, LayerMode, NameMode and PropsMode to true.
- constructor(theWS: XSControl_WorkSession, theScratch?: boolean): STEPCAFControl_Writer
Creates a reader tool and attaches it to an already existing Session Clears the session if it was not yet set for STEP Clears the internal data structures.
Parameters (2)theWStheScratch
Instance methods(35)
- Write(theFileName: string): IFSelect_ReturnStatus
Writes all the produced models into file In case of multimodel with extern references, filename will be a name of root file, all other files have names of corresponding parts Provided for use like single-file writer.
Parameters (1)theFileName
- Transfer(theDoc: TDocStd_Document, theMode: STEPControl_StepModelType, theIsMulti: string, theProgress: Message_ProgressRange): boolean
Transfers a document (or single label) to a STEP model The mode of translation of shape is AsIs If multi is not null pointer, it switches to multifile mode (with external refs), and string pointed by <multi> gives prefix for names of extern files (can be empty string) Returns True if translation is OK.
Parameters (4)theDoctheModetheIsMultitheProgress
- Transfer(theLabel: TDF_Label, theMode: STEPControl_StepModelType, theIsMulti: string, theProgress: Message_ProgressRange): boolean
Method to transfer part of the document specified by label.
Parameters (4)theLabeltheModetheIsMultitheProgress
- Transfer(theLabelSeq: NCollection_Sequence_TDF_Label, theMode: STEPControl_StepModelType, theIsMulti: string, theProgress: Message_ProgressRange): boolean
Method to writing sequence of root assemblies or part of the file specified by use by one label.
Parameters (4)theLabelSeqtheModetheIsMultitheProgress
- Perform(theDoc: TDocStd_Document, theFileName: TCollection_AsciiString, theProgress: Message_ProgressRange): booleanParameters (3)
theDoctheFileNametheProgress
- Perform(theDoc: TDocStd_Document, theFileName: string, theProgress: Message_ProgressRange): boolean
Transfers a document and writes it to a STEP file Returns True if translation is OK.
Parameters (3)theDoctheFileNametheProgress
Returns data on external files Returns Null handle if no external files are read.
- ExternFile(theLabel: TDF_Label): { returnValue: boolean; theExtFile: STEPCAFControl_ExternFile; [Symbol.dispose](): void }
Returns data on external file by its original label Returns False if no external file with given name is read.
Parameters (1)theLabel
ReturnsA result object with fields:
returnValue: the C++ return valuetheExtFile: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
- ExternFile(theName: string): { returnValue: boolean; theExtFile: STEPCAFControl_ExternFile; [Symbol.dispose](): void }
Returns data on external file by its name Returns False if no external file with given name is read.
Parameters (1)theName
ReturnsA result object with fields:
returnValue: the C++ return valuetheExtFile: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
Returns basic reader for root file.
Returns basic reader as const.
- SetColorMode(theColorMode: boolean): void
Set ColorMode for indicate write Colors or not.
Parameters (1)theColorMode
- GetColorMode(): boolean
- SetNameMode(theNameMode: boolean): void
Set NameMode for indicate write Name or not.
Parameters (1)theNameMode
- GetNameMode(): boolean
- SetLayerMode(theLayerMode: boolean): void
Set LayerMode for indicate write Layers or not.
Parameters (1)theLayerMode
- GetLayerMode(): boolean
- SetPropsMode(thePropsMode: boolean): void
PropsMode for indicate write Validation properties or not.
Parameters (1)thePropsMode
- GetPropsMode(): boolean
- SetMetadataMode(theMetadataMode: boolean): void
Set MetadataMode for indicate write metadata or not.
Parameters (1)theMetadataMode
- GetMetadataMode(): boolean
- SetSHUOMode(theSHUOMode: boolean): void
Set SHUO mode for indicate write SHUO or not.
Parameters (1)theSHUOMode
- GetSHUOMode(): boolean
- SetDimTolMode(theDimTolMode: boolean): void
Set dimtolmode for indicate write D>s or not.
Parameters (1)theDimTolMode
- GetDimTolMode(): boolean
- SetMaterialMode(theMaterialMode: boolean): void
Set flag for indicate write material or not.
Parameters (1)theMaterialMode
- GetMaterialMode(): boolean
- SetVisualMaterialMode(theVisualMaterialMode: boolean): void
Set flag for indicate write visual material or not.
Parameters (1)theVisualMaterialMode
- GetVisualMaterialMode(): boolean
- SetCleanDuplicates(theCleanDuplicates: boolean): void
Set clean duplicates flag. If set to True, duplicates will be removed from the model.
Parameters (1)theCleanDuplicates—the flag to set.
- GetCleanDuplicates(): boolean
Returns the flag indicating whether duplicates should be removed from the model.
Returnsthe flag indicating whether duplicates should be removed from the model.
- SetShapeFixParameters(theParameters: NCollection_DataMap_TCollection_AsciiString_TCollection_AsciiString): void
Sets parameters for shape processing.
Parameters (1)theParameters—the parameters for shape processing.
Returns parameters for shape processing that was set by SetParameters() method.
Returnsthe parameters for shape processing. Empty map if no parameters were set.
- SetShapeProcessFlags(theFlags: any): void
Sets flags defining operations to be performed on shapes.
Parameters (1)theFlags—The flags defining operations to be performed on shapes.
- GetShapeProcessFlags(): [any, boolean]
Returns flags defining operations to be performed on shapes.
ReturnsPair of values defining operations to be performed on shapes and a boolean value that indicates whether the flags were set.
StepBasic
OCCT package StepBasic: StepBasic_Action, StepBasic_ActionAssignment, StepBasic_ActionMethod, StepBasic_ActionRequestAssignment, and 144 more bound classes.
STEPConstruct
OCCT package STEPConstruct: STEPConstruct, STEPConstruct_AP203Context, STEPConstruct_Assembly, STEPConstruct_ContextTool, and 7 more bound classes.