Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions
STEPCAFControl_Reader Class Reference

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

#include <STEPCAFControl_Reader.hxx>

Public Member Functions

 STEPCAFControl_Reader ()
 Creates a reader with an empty STEP model and sets ColorMode, LayerMode, NameMode and PropsMode to true.
 
 STEPCAFControl_Reader (const occ::handle< XSControl_WorkSession > &WS, const bool scratch=true)
 Creates a reader tool and attaches it to an already existing Session Clears the session if it was not yet set for STEP.
 
virtual ~STEPCAFControl_Reader ()
 Destructor.
 
void Init (const occ::handle< XSControl_WorkSession > &WS, const bool scratch=true)
 Clears the internal data structures and attaches to a new session Clears the session if it was not yet set for STEP.
 
IFSelect_ReturnStatus ReadFile (const char *const theFileName)
 Loads a file and returns the read status Provided for use like single-file reader.
 
IFSelect_ReturnStatus ReadFile (const char *const theFileName, const DESTEP_Parameters &theParams)
 Loads a file and returns the read status Provided for use like single-file reader.
 
IFSelect_ReturnStatus ReadStream (const char *const theName, std::istream &theIStream)
 Loads a file from stream and returns the read status.
 
int NbRootsForTransfer ()
 Returns number of roots recognized for transfer Shortcut for Reader().NbRootsForTransfer()
 
bool TransferOneRoot (const int num, const occ::handle< TDocStd_Document > &doc, const Message_ProgressRange &theProgress=Message_ProgressRange())
 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.
 
bool Transfer (const occ::handle< TDocStd_Document > &doc, const Message_ProgressRange &theProgress=Message_ProgressRange())
 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.
 
bool Perform (const TCollection_AsciiString &filename, const occ::handle< TDocStd_Document > &doc, const Message_ProgressRange &theProgress=Message_ProgressRange())
 
bool Perform (const TCollection_AsciiString &filename, const occ::handle< TDocStd_Document > &doc, const DESTEP_Parameters &theParams, const Message_ProgressRange &theProgress=Message_ProgressRange())
 
bool Perform (const char *const filename, const occ::handle< TDocStd_Document > &doc, const Message_ProgressRange &theProgress=Message_ProgressRange())
 Translate STEP file given by filename into the document Return True if succeeded, and False in case of fail.
 
bool Perform (const char *const filename, const occ::handle< TDocStd_Document > &doc, const DESTEP_Parameters &theParams, const Message_ProgressRange &theProgress=Message_ProgressRange())
 Translate STEP file given by filename into the document Return True if succeeded, and False in case of fail.
 
const NCollection_DataMap< TCollection_AsciiString, occ::handle< STEPCAFControl_ExternFile > > & ExternFiles () const
 Returns data on external files Returns Null handle if no external files are read.
 
bool ExternFile (const char *const name, occ::handle< STEPCAFControl_ExternFile > &ef) const
 Returns data on external file by its name Returns False if no external file with given name is read.
 
STEPControl_ReaderChangeReader ()
 Returns basic reader.
 
const STEPControl_ReaderReader () const
 Returns basic reader as const.
 
void SetColorMode (const bool colormode)
 Set ColorMode for indicate read Colors or not.
 
bool GetColorMode () const
 
void SetNameMode (const bool namemode)
 Set NameMode for indicate read Name or not.
 
bool GetNameMode () const
 
void SetLayerMode (const bool layermode)
 Set LayerMode for indicate read Layers or not.
 
bool GetLayerMode () const
 
void SetPropsMode (const bool propsmode)
 PropsMode for indicate read Validation properties or not.
 
bool GetPropsMode () const
 
void SetMetaMode (const bool theMetaMode)
 MetaMode for indicate read Metadata or not.
 
bool GetMetaMode () const
 
void SetProductMetaMode (const bool theProductMetaMode)
 MetaMode for indicate whether to read Product Metadata or not.
 
bool GetProductMetaMode () const
 
void SetSHUOMode (const bool shuomode)
 Set SHUO mode for indicate write SHUO or not.
 
bool GetSHUOMode () const
 
void SetGDTMode (const bool gdtmode)
 Set GDT mode for indicate write GDT or not.
 
bool GetGDTMode () const
 
void SetMatMode (const bool matmode)
 Set Material mode.
 
bool GetMatMode () const
 
void SetViewMode (const bool viewmode)
 Set View mode.
 
bool GetViewMode () const
 Get View mode.
 
const NCollection_DataMap< TopoDS_Shape, TDF_Label, TopTools_ShapeMapHasher > & GetShapeLabelMap () const
 
void SetShapeFixParameters (const XSAlgo_ShapeProcessor::ParameterMap &theParameters)
 Sets parameters for shape processing.
 
void SetShapeFixParameters (XSAlgo_ShapeProcessor::ParameterMap &&theParameters)
 Sets parameters for shape processing. Parameters are moved from the input map.
 
void SetShapeFixParameters (const DE_ShapeFixParameters &theParameters, const XSAlgo_ShapeProcessor::ParameterMap &theAdditionalParameters={})
 Sets parameters for shape processing. Parameters from theParameters are copied to the internal map. Parameters from theAdditionalParameters are copied to the internal map if they are not present in theParameters.
 
const XSAlgo_ShapeProcessor::ParameterMapGetShapeFixParameters () const
 Returns parameters for shape processing that was set by SetParameters() method.
 
void SetShapeProcessFlags (const ShapeProcess::OperationsFlags &theFlags)
 Sets flags defining operations to be performed on shapes.
 
const XSAlgo_ShapeProcessor::ProcessingFlagsGetShapeProcessFlags () const
 Returns flags defining operations to be performed on shapes.
 

Static Public Member Functions

static TDF_Label FindInstance (const occ::handle< StepRepr_NextAssemblyUsageOccurrence > &NAUO, const occ::handle< XCAFDoc_ShapeTool > &STool, const STEPConstruct_Tool &Tool, const NCollection_DataMap< TopoDS_Shape, TDF_Label, TopTools_ShapeMapHasher > &ShapeLabelMap)
 Returns label of instance of an assembly component corresponding to a given NAUO.
 

Protected Member Functions

bool Transfer (STEPControl_Reader &rd, const int num, const occ::handle< TDocStd_Document > &doc, NCollection_Sequence< TDF_Label > &Lseq, const bool asOne=false, const Message_ProgressRange &theProgress=Message_ProgressRange())
 Translates STEP file already loaded into the reader into the document If num==0, translates all roots, else only root number num Returns True if succeeded, and False in case of fail If asOne is True, in case of multiple results composes them into assembly. Fills sequence of produced labels.
 
TDF_Label AddShape (const TopoDS_Shape &S, const occ::handle< XCAFDoc_ShapeTool > &STool, const NCollection_Map< TopoDS_Shape, TopTools_ShapeMapHasher > &NewShapesMap, const NCollection_DataMap< TopoDS_Shape, occ::handle< StepBasic_ProductDefinition >, TopTools_ShapeMapHasher > &ShapePDMap, const NCollection_DataMap< occ::handle< StepBasic_ProductDefinition >, occ::handle< STEPCAFControl_ExternFile > > &PDFileMap)
 Add a shape to a document Depending on a case, this shape can be added as one, or as assembly, or (in case if it is associated with external reference) taken as that referred shape.
 
occ::handle< STEPCAFControl_ExternFileReadExternFile (const char *const file, const char *const fullpath, const occ::handle< TDocStd_Document > &doc, const Message_ProgressRange &theProgress=Message_ProgressRange())
 Reads (or if returns already read) extern file with given name.
 
bool ReadColors (const occ::handle< XSControl_WorkSession > &WS, const occ::handle< TDocStd_Document > &doc, const StepData_Factors &theLocalFactors=StepData_Factors()) const
 Reads style assignments from STEP model and sets corresponding color assignments in the DECAF document.
 
bool ReadNames (const occ::handle< XSControl_WorkSession > &WS, const occ::handle< TDocStd_Document > &doc, const NCollection_DataMap< occ::handle< StepBasic_ProductDefinition >, occ::handle< STEPCAFControl_ExternFile > > &PDFileMap) const
 Reads names of parts defined in the STEP model and assigns them to corresponding labels in the DECAF document.
 
bool ReadValProps (const occ::handle< XSControl_WorkSession > &WS, const occ::handle< TDocStd_Document > &doc, const NCollection_DataMap< occ::handle< StepBasic_ProductDefinition >, occ::handle< STEPCAFControl_ExternFile > > &PDFileMap, const StepData_Factors &theLocalFactors=StepData_Factors()) const
 Reads validation properties assigned to shapes in the STEP model and assigns them to corresponding labels in the DECAF document.
 
bool ReadMetadata (const occ::handle< XSControl_WorkSession > &theWS, const occ::handle< TDocStd_Document > &theDoc, const StepData_Factors &theLocalFactors=StepData_Factors()) const
 Reads metadata assigned to shapes in the STEP model and assigns them to corresponding labels in the DECAF document.
 
bool ReadProductMetadata (const occ::handle< XSControl_WorkSession > &theWS, const occ::handle< TDocStd_Document > &theDoc) const
 
bool ReadLayers (const occ::handle< XSControl_WorkSession > &WS, const occ::handle< TDocStd_Document > &doc) const
 Reads layers of parts defined in the STEP model and set reference between shape and layers in the DECAF document.
 
bool ReadSHUOs (const occ::handle< XSControl_WorkSession > &WS, const occ::handle< TDocStd_Document > &doc, const NCollection_DataMap< occ::handle< StepBasic_ProductDefinition >, occ::handle< STEPCAFControl_ExternFile > > &PDFileMap) const
 Reads SHUO for instances defined in the STEP model and set reference between shape instances from different assemblyes.
 
bool ReadGDTs (const occ::handle< XSControl_WorkSession > &WS, const occ::handle< TDocStd_Document > &doc, const StepData_Factors &theLocalFactors=StepData_Factors())
 Reads D&GT for instances defined in the STEP model and set reference between shape instances from different assemblyes.
 
bool ReadMaterials (const occ::handle< XSControl_WorkSession > &WS, const occ::handle< TDocStd_Document > &doc, const occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > &SeqPDS, const StepData_Factors &theLocalFactors=StepData_Factors()) const
 Reads materials for instances defined in the STEP model and set reference between shape instances from different assemblyes.
 
bool ReadViews (const occ::handle< XSControl_WorkSession > &theWS, const occ::handle< TDocStd_Document > &theDoc, const StepData_Factors &theLocalFactors=StepData_Factors()) const
 Reads Views for instances defined in the STEP model.
 
TDF_Label SettleShapeData (const occ::handle< StepRepr_RepresentationItem > &theItem, const TDF_Label &theLab, const occ::handle< XCAFDoc_ShapeTool > &theShapeTool, const occ::handle< Transfer_TransientProcess > &theTP) const
 Populates the sub-Label of the passed TDF Label with shape data associated with the given STEP Representation Item, including naming and topological information.
 
void ExpandSubShapes (const occ::handle< XCAFDoc_ShapeTool > &theShapeTool, const NCollection_DataMap< TopoDS_Shape, occ::handle< StepBasic_ProductDefinition >, TopTools_ShapeMapHasher > &theShapePDMap) const
 Given the maps of already translated shapes, this method expands their correspondent Labels in XDE Document so that to have a dedicated sub-Label for each sub-shape coming with associated name in its STEP Representation Item.
 
void ExpandManifoldSolidBrep (TDF_Label &theLab, const occ::handle< StepRepr_RepresentationItem > &theItem, const occ::handle< Transfer_TransientProcess > &theTP, const occ::handle< XCAFDoc_ShapeTool > &theShapeTool) const
 Expands the topological structure of Manifold Solid BRep STEP entity to OCAF sub-tree. Entities having no names associated via their Representation Items are skipped.
 
void ExpandSBSM (TDF_Label &theLab, const occ::handle< StepRepr_RepresentationItem > &theItem, const occ::handle< Transfer_TransientProcess > &theTP, const occ::handle< XCAFDoc_ShapeTool > &theShapeTool) const
 Expands the topological structure of Shell-Based Surface Model STEP entity to OCAF sub-tree. Entities having no names associated via their Representation Items are skipped.
 
void ExpandShell (const occ::handle< StepShape_ConnectedFaceSet > &theShell, TDF_Label &theLab, const occ::handle< Transfer_TransientProcess > &theTP, const occ::handle< XCAFDoc_ShapeTool > &theShapeTool) const
 Expands STEP Shell structure to OCAF sub-tree. Entities having no names associated via their Representation Items are skipped.
 
virtual TCollection_ExtendedString convertName (const TCollection_AsciiString &theName) const
 Convert name into UNICODE text.
 

Detailed Description

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

Constructor & Destructor Documentation

◆ STEPCAFControl_Reader() [1/2]

STEPCAFControl_Reader::STEPCAFControl_Reader ( )

Creates a reader with an empty STEP model and sets ColorMode, LayerMode, NameMode and PropsMode to true.

◆ STEPCAFControl_Reader() [2/2]

STEPCAFControl_Reader::STEPCAFControl_Reader ( const occ::handle< XSControl_WorkSession > & WS,
const bool scratch = true )

Creates a reader tool and attaches it to an already existing Session Clears the session if it was not yet set for STEP.

◆ ~STEPCAFControl_Reader()

virtual STEPCAFControl_Reader::~STEPCAFControl_Reader ( )
virtual

Destructor.

Member Function Documentation

◆ AddShape()

Add a shape to a document Depending on a case, this shape can be added as one, or as assembly, or (in case if it is associated with external reference) taken as that referred shape.

◆ ChangeReader()

STEPControl_Reader & STEPCAFControl_Reader::ChangeReader ( )

Returns basic reader.

◆ convertName()

virtual TCollection_ExtendedString STEPCAFControl_Reader::convertName ( const TCollection_AsciiString & theName) const
protectedvirtual

Convert name into UNICODE text.

◆ ExpandManifoldSolidBrep()

void STEPCAFControl_Reader::ExpandManifoldSolidBrep ( TDF_Label & theLab,
const occ::handle< StepRepr_RepresentationItem > & theItem,
const occ::handle< Transfer_TransientProcess > & theTP,
const occ::handle< XCAFDoc_ShapeTool > & theShapeTool ) const
protected

Expands the topological structure of Manifold Solid BRep STEP entity to OCAF sub-tree. Entities having no names associated via their Representation Items are skipped.

◆ ExpandSBSM()

void STEPCAFControl_Reader::ExpandSBSM ( TDF_Label & theLab,
const occ::handle< StepRepr_RepresentationItem > & theItem,
const occ::handle< Transfer_TransientProcess > & theTP,
const occ::handle< XCAFDoc_ShapeTool > & theShapeTool ) const
protected

Expands the topological structure of Shell-Based Surface Model STEP entity to OCAF sub-tree. Entities having no names associated via their Representation Items are skipped.

◆ ExpandShell()

void STEPCAFControl_Reader::ExpandShell ( const occ::handle< StepShape_ConnectedFaceSet > & theShell,
TDF_Label & theLab,
const occ::handle< Transfer_TransientProcess > & theTP,
const occ::handle< XCAFDoc_ShapeTool > & theShapeTool ) const
protected

Expands STEP Shell structure to OCAF sub-tree. Entities having no names associated via their Representation Items are skipped.

◆ ExpandSubShapes()

void STEPCAFControl_Reader::ExpandSubShapes ( const occ::handle< XCAFDoc_ShapeTool > & theShapeTool,
const NCollection_DataMap< TopoDS_Shape, occ::handle< StepBasic_ProductDefinition >, TopTools_ShapeMapHasher > & theShapePDMap ) const
protected

Given the maps of already translated shapes, this method expands their correspondent Labels in XDE Document so that to have a dedicated sub-Label for each sub-shape coming with associated name in its STEP Representation Item.

◆ ExternFile()

bool STEPCAFControl_Reader::ExternFile ( const char *const name,
occ::handle< STEPCAFControl_ExternFile > & ef ) const

Returns data on external file by its name Returns False if no external file with given name is read.

◆ ExternFiles()

const NCollection_DataMap< TCollection_AsciiString, occ::handle< STEPCAFControl_ExternFile > > & STEPCAFControl_Reader::ExternFiles ( ) const

Returns data on external files Returns Null handle if no external files are read.

◆ FindInstance()

static TDF_Label STEPCAFControl_Reader::FindInstance ( const occ::handle< StepRepr_NextAssemblyUsageOccurrence > & NAUO,
const occ::handle< XCAFDoc_ShapeTool > & STool,
const STEPConstruct_Tool & Tool,
const NCollection_DataMap< TopoDS_Shape, TDF_Label, TopTools_ShapeMapHasher > & ShapeLabelMap )
static

Returns label of instance of an assembly component corresponding to a given NAUO.

◆ GetColorMode()

bool STEPCAFControl_Reader::GetColorMode ( ) const

◆ GetGDTMode()

bool STEPCAFControl_Reader::GetGDTMode ( ) const

◆ GetLayerMode()

bool STEPCAFControl_Reader::GetLayerMode ( ) const

◆ GetMatMode()

bool STEPCAFControl_Reader::GetMatMode ( ) const

◆ GetMetaMode()

bool STEPCAFControl_Reader::GetMetaMode ( ) const

◆ GetNameMode()

bool STEPCAFControl_Reader::GetNameMode ( ) const

◆ GetProductMetaMode()

bool STEPCAFControl_Reader::GetProductMetaMode ( ) const

◆ GetPropsMode()

bool STEPCAFControl_Reader::GetPropsMode ( ) const

◆ GetShapeFixParameters()

const XSAlgo_ShapeProcessor::ParameterMap & STEPCAFControl_Reader::GetShapeFixParameters ( ) const

Returns parameters for shape processing that was set by SetParameters() method.

Returns
the parameters for shape processing. Empty map if no parameters were set.

◆ GetShapeLabelMap()

const NCollection_DataMap< TopoDS_Shape, TDF_Label, TopTools_ShapeMapHasher > & STEPCAFControl_Reader::GetShapeLabelMap ( ) const
inline

◆ GetShapeProcessFlags()

const XSAlgo_ShapeProcessor::ProcessingFlags & STEPCAFControl_Reader::GetShapeProcessFlags ( ) const

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.

◆ GetSHUOMode()

bool STEPCAFControl_Reader::GetSHUOMode ( ) const

◆ GetViewMode()

bool STEPCAFControl_Reader::GetViewMode ( ) const

Get View mode.

◆ Init()

void STEPCAFControl_Reader::Init ( const occ::handle< XSControl_WorkSession > & WS,
const bool scratch = true )

Clears the internal data structures and attaches to a new session Clears the session if it was not yet set for STEP.

◆ NbRootsForTransfer()

int STEPCAFControl_Reader::NbRootsForTransfer ( )

Returns number of roots recognized for transfer Shortcut for Reader().NbRootsForTransfer()

◆ Perform() [1/4]

bool STEPCAFControl_Reader::Perform ( const char *const filename,
const occ::handle< TDocStd_Document > & doc,
const DESTEP_Parameters & theParams,
const Message_ProgressRange & theProgress = Message_ProgressRange() )

Translate STEP file given by filename into the document Return True if succeeded, and False in case of fail.

◆ Perform() [2/4]

bool STEPCAFControl_Reader::Perform ( const char *const filename,
const occ::handle< TDocStd_Document > & doc,
const Message_ProgressRange & theProgress = Message_ProgressRange() )

Translate STEP file given by filename into the document Return True if succeeded, and False in case of fail.

◆ Perform() [3/4]

bool STEPCAFControl_Reader::Perform ( const TCollection_AsciiString & filename,
const occ::handle< TDocStd_Document > & doc,
const DESTEP_Parameters & theParams,
const Message_ProgressRange & theProgress = Message_ProgressRange() )

◆ Perform() [4/4]

bool STEPCAFControl_Reader::Perform ( const TCollection_AsciiString & filename,
const occ::handle< TDocStd_Document > & doc,
const Message_ProgressRange & theProgress = Message_ProgressRange() )

◆ ReadColors()

bool STEPCAFControl_Reader::ReadColors ( const occ::handle< XSControl_WorkSession > & WS,
const occ::handle< TDocStd_Document > & doc,
const StepData_Factors & theLocalFactors = StepData_Factors() ) const
protected

Reads style assignments from STEP model and sets corresponding color assignments in the DECAF document.

◆ Reader()

const STEPControl_Reader & STEPCAFControl_Reader::Reader ( ) const

Returns basic reader as const.

◆ ReadExternFile()

occ::handle< STEPCAFControl_ExternFile > STEPCAFControl_Reader::ReadExternFile ( const char *const file,
const char *const fullpath,
const occ::handle< TDocStd_Document > & doc,
const Message_ProgressRange & theProgress = Message_ProgressRange() )
protected

Reads (or if returns already read) extern file with given name.

◆ ReadFile() [1/2]

IFSelect_ReturnStatus STEPCAFControl_Reader::ReadFile ( const char *const theFileName)

Loads a file and returns the read status Provided for use like single-file reader.

Parameters
[in]theFileNamefile to open
Returns
read status

◆ ReadFile() [2/2]

IFSelect_ReturnStatus STEPCAFControl_Reader::ReadFile ( const char *const theFileName,
const DESTEP_Parameters & theParams )

Loads a file and returns the read status Provided for use like single-file reader.

Parameters
[in]theFileNamefile to open
[in]theParamsdefault configuration parameters
Returns
read status

◆ ReadGDTs()

bool STEPCAFControl_Reader::ReadGDTs ( const occ::handle< XSControl_WorkSession > & WS,
const occ::handle< TDocStd_Document > & doc,
const StepData_Factors & theLocalFactors = StepData_Factors() )
protected

Reads D&GT for instances defined in the STEP model and set reference between shape instances from different assemblyes.

◆ ReadLayers()

bool STEPCAFControl_Reader::ReadLayers ( const occ::handle< XSControl_WorkSession > & WS,
const occ::handle< TDocStd_Document > & doc ) const
protected

Reads layers of parts defined in the STEP model and set reference between shape and layers in the DECAF document.

◆ ReadMaterials()

bool STEPCAFControl_Reader::ReadMaterials ( const occ::handle< XSControl_WorkSession > & WS,
const occ::handle< TDocStd_Document > & doc,
const occ::handle< NCollection_HSequence< occ::handle< Standard_Transient > > > & SeqPDS,
const StepData_Factors & theLocalFactors = StepData_Factors() ) const
protected

Reads materials for instances defined in the STEP model and set reference between shape instances from different assemblyes.

◆ ReadMetadata()

bool STEPCAFControl_Reader::ReadMetadata ( const occ::handle< XSControl_WorkSession > & theWS,
const occ::handle< TDocStd_Document > & theDoc,
const StepData_Factors & theLocalFactors = StepData_Factors() ) const
protected

Reads metadata assigned to shapes in the STEP model and assigns them to corresponding labels in the DECAF document.

◆ ReadNames()

bool STEPCAFControl_Reader::ReadNames ( const occ::handle< XSControl_WorkSession > & WS,
const occ::handle< TDocStd_Document > & doc,
const NCollection_DataMap< occ::handle< StepBasic_ProductDefinition >, occ::handle< STEPCAFControl_ExternFile > > & PDFileMap ) const
protected

Reads names of parts defined in the STEP model and assigns them to corresponding labels in the DECAF document.

◆ ReadProductMetadata()

bool STEPCAFControl_Reader::ReadProductMetadata ( const occ::handle< XSControl_WorkSession > & theWS,
const occ::handle< TDocStd_Document > & theDoc ) const
protected

◆ ReadSHUOs()

bool STEPCAFControl_Reader::ReadSHUOs ( const occ::handle< XSControl_WorkSession > & WS,
const occ::handle< TDocStd_Document > & doc,
const NCollection_DataMap< occ::handle< StepBasic_ProductDefinition >, occ::handle< STEPCAFControl_ExternFile > > & PDFileMap ) const
protected

Reads SHUO for instances defined in the STEP model and set reference between shape instances from different assemblyes.

◆ ReadStream()

IFSelect_ReturnStatus STEPCAFControl_Reader::ReadStream ( const char *const theName,
std::istream & theIStream )

Loads a file from stream and returns the read status.

Parameters
[in]theNameauxiliary stream name
[in]theIStreamstream to read from
Returns
read status

◆ ReadValProps()

bool STEPCAFControl_Reader::ReadValProps ( const occ::handle< XSControl_WorkSession > & WS,
const occ::handle< TDocStd_Document > & doc,
const NCollection_DataMap< occ::handle< StepBasic_ProductDefinition >, occ::handle< STEPCAFControl_ExternFile > > & PDFileMap,
const StepData_Factors & theLocalFactors = StepData_Factors() ) const
protected

Reads validation properties assigned to shapes in the STEP model and assigns them to corresponding labels in the DECAF document.

◆ ReadViews()

bool STEPCAFControl_Reader::ReadViews ( const occ::handle< XSControl_WorkSession > & theWS,
const occ::handle< TDocStd_Document > & theDoc,
const StepData_Factors & theLocalFactors = StepData_Factors() ) const
protected

Reads Views for instances defined in the STEP model.

◆ SetColorMode()

void STEPCAFControl_Reader::SetColorMode ( const bool colormode)

Set ColorMode for indicate read Colors or not.

◆ SetGDTMode()

void STEPCAFControl_Reader::SetGDTMode ( const bool gdtmode)

Set GDT mode for indicate write GDT or not.

◆ SetLayerMode()

void STEPCAFControl_Reader::SetLayerMode ( const bool layermode)

Set LayerMode for indicate read Layers or not.

◆ SetMatMode()

void STEPCAFControl_Reader::SetMatMode ( const bool matmode)

Set Material mode.

◆ SetMetaMode()

void STEPCAFControl_Reader::SetMetaMode ( const bool theMetaMode)

MetaMode for indicate read Metadata or not.

◆ SetNameMode()

void STEPCAFControl_Reader::SetNameMode ( const bool namemode)

Set NameMode for indicate read Name or not.

◆ SetProductMetaMode()

void STEPCAFControl_Reader::SetProductMetaMode ( const bool theProductMetaMode)

MetaMode for indicate whether to read Product Metadata or not.

◆ SetPropsMode()

void STEPCAFControl_Reader::SetPropsMode ( const bool propsmode)

PropsMode for indicate read Validation properties or not.

◆ SetShapeFixParameters() [1/3]

void STEPCAFControl_Reader::SetShapeFixParameters ( const DE_ShapeFixParameters & theParameters,
const XSAlgo_ShapeProcessor::ParameterMap & theAdditionalParameters = {} )

Sets parameters for shape processing. Parameters from theParameters are copied to the internal map. Parameters from theAdditionalParameters are copied to the internal map if they are not present in theParameters.

Parameters
theParametersthe parameters for shape processing.
theAdditionalParametersthe additional parameters for shape processing.

◆ SetShapeFixParameters() [2/3]

void STEPCAFControl_Reader::SetShapeFixParameters ( const XSAlgo_ShapeProcessor::ParameterMap & theParameters)

Sets parameters for shape processing.

Parameters
theParametersthe parameters for shape processing.

◆ SetShapeFixParameters() [3/3]

void STEPCAFControl_Reader::SetShapeFixParameters ( XSAlgo_ShapeProcessor::ParameterMap && theParameters)

Sets parameters for shape processing. Parameters are moved from the input map.

Parameters
theParametersthe parameters for shape processing.

◆ SetShapeProcessFlags()

void STEPCAFControl_Reader::SetShapeProcessFlags ( const ShapeProcess::OperationsFlags & theFlags)

Sets flags defining operations to be performed on shapes.

Parameters
theFlagsThe flags defining operations to be performed on shapes.

◆ SetSHUOMode()

void STEPCAFControl_Reader::SetSHUOMode ( const bool shuomode)

Set SHUO mode for indicate write SHUO or not.

◆ SettleShapeData()

TDF_Label STEPCAFControl_Reader::SettleShapeData ( const occ::handle< StepRepr_RepresentationItem > & theItem,
const TDF_Label & theLab,
const occ::handle< XCAFDoc_ShapeTool > & theShapeTool,
const occ::handle< Transfer_TransientProcess > & theTP ) const
protected

Populates the sub-Label of the passed TDF Label with shape data associated with the given STEP Representation Item, including naming and topological information.

◆ SetViewMode()

void STEPCAFControl_Reader::SetViewMode ( const bool viewmode)

Set View mode.

◆ Transfer() [1/2]

bool STEPCAFControl_Reader::Transfer ( const occ::handle< TDocStd_Document > & doc,
const Message_ProgressRange & theProgress = Message_ProgressRange() )

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.

◆ Transfer() [2/2]

bool STEPCAFControl_Reader::Transfer ( STEPControl_Reader & rd,
const int num,
const occ::handle< TDocStd_Document > & doc,
NCollection_Sequence< TDF_Label > & Lseq,
const bool asOne = false,
const Message_ProgressRange & theProgress = Message_ProgressRange() )
protected

Translates STEP file already loaded into the reader into the document If num==0, translates all roots, else only root number num Returns True if succeeded, and False in case of fail If asOne is True, in case of multiple results composes them into assembly. Fills sequence of produced labels.

◆ TransferOneRoot()

bool STEPCAFControl_Reader::TransferOneRoot ( const int num,
const occ::handle< TDocStd_Document > & doc,
const Message_ProgressRange & theProgress = Message_ProgressRange() )

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.


The documentation for this class was generated from the following file: