OpenCascade.js
API ReferenceDataExchangeTKDESTEP

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)

Instance methods(5)

  • Check whether shape S is assembly Returns True if shape is registered in assemblies map.

    Parameters (2)
    • theModel
    • S
      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.

  • 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)

Static methods(3)

Instance methods(1)

STEPCAFControl_ExternFile

Auxiliary class serving as container for data resulting from translation of external file.

Constructors(1)

Static methods(2)

Instance methods(13)

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)

Static methods(1)

Instance methods(35)

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)

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)
    • theDoc
    • theMode
    • theIsMulti
    • theProgress
  • 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)
    • theLabel
    • theMode
    • theIsMulti
    • theProgress
  • 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)
    • theLabelSeq
    • theMode
    • theIsMulti
    • theProgress
  • Perform(theDoc: TDocStd_Document, theFileName: TCollection_AsciiString, theProgress: Message_ProgressRange): boolean
    Parameters (3)
    • theDoc
    • theFileName
    • theProgress
  • 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)
    • theDoc
    • theFileName
    • theProgress
  • 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
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • theExtFile: 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
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • theExtFile: 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&GTs 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
  • 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.
  • Returns the flag indicating whether duplicates should be removed from the model.

    Returns

    the flag indicating whether duplicates should be removed from the model.

  • Sets parameters for shape processing.

    Parameters (1)
    • theParameters
      the parameters for shape processing.
  • Returns parameters for shape processing that was set by SetParameters() method.

    Returns

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

    Returns

    Pair of values defining operations to be performed on shapes and a boolean value that indicates whether the flags were set.