Open CASCADE Technology 7.9.0
|
This class creates and writes STEP files from Open CASCADE models. A STEP file can be written to an existing STEP file or to a new one. Translation can be performed in one or several operations. Each translation operation outputs a distinct root entity in the STEP file. More...
#include <STEPControl_Writer.hxx>
Public Member Functions | |
STEPControl_Writer () | |
Creates a Writer from scratch. | |
STEPControl_Writer (const Handle< XSControl_WorkSession > &WS, const Standard_Boolean scratch=Standard_True) | |
Creates a Writer from an already existing Session If <scratch> is True (D), clears already recorded data. | |
void | SetTolerance (const Standard_Real Tol) |
Sets a length-measure value that will be written to uncertainty-measure-with-unit when the next shape is translated. | |
void | UnsetTolerance () |
Unsets the tolerance formerly forced by SetTolerance. | |
void | SetWS (const Handle< XSControl_WorkSession > &WS, const Standard_Boolean scratch=Standard_True) |
Sets a specific session to <me> | |
Handle< XSControl_WorkSession > | WS () const |
Returns the session used in <me> | |
Handle< StepData_StepModel > | Model (const Standard_Boolean newone=Standard_False) |
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. | |
IFSelect_ReturnStatus | Transfer (const TopoDS_Shape &sh, const STEPControl_StepModelType mode, const Standard_Boolean compgraph=Standard_True, const Message_ProgressRange &theProgress=Message_ProgressRange()) |
Translates shape sh to a STEP entity. mode defines the STEP entity type to be output: | |
IFSelect_ReturnStatus | Transfer (const TopoDS_Shape &sh, const STEPControl_StepModelType mode, const DESTEP_Parameters &theParams, const Standard_Boolean compgraph=Standard_True, const Message_ProgressRange &theProgress=Message_ProgressRange()) |
Translates shape sh to a STEP entity. | |
IFSelect_ReturnStatus | Write (const Standard_CString theFileName) |
Writes a STEP model in the file identified by filename. | |
IFSelect_ReturnStatus | WriteStream (std::ostream &theOStream) |
Writes a STEP model in the std::ostream. | |
void | PrintStatsTransfer (const Standard_Integer what, const Standard_Integer mode=0) const |
Displays the statistics for the last translation. what defines the kind of statistics that are displayed: | |
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::ParameterMap & | GetShapeFixParameters () 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::ProcessingFlags & | GetShapeProcessFlags () const |
Returns flags defining operations to be performed on shapes. | |
This class creates and writes STEP files from Open CASCADE models. A STEP file can be written to an existing STEP file or to a new one. Translation can be performed in one or several operations. Each translation operation outputs a distinct root entity in the STEP file.
STEPControl_Writer::STEPControl_Writer | ( | ) |
Creates a Writer from scratch.
STEPControl_Writer::STEPControl_Writer | ( | const Handle< XSControl_WorkSession > & | WS, |
const Standard_Boolean | scratch = Standard_True ) |
Creates a Writer from an already existing Session If <scratch> is True (D), clears already recorded data.
const XSAlgo_ShapeProcessor::ParameterMap & STEPControl_Writer::GetShapeFixParameters | ( | ) | const |
Returns parameters for shape processing that was set by SetParameters() method.
const XSAlgo_ShapeProcessor::ProcessingFlags & STEPControl_Writer::GetShapeProcessFlags | ( | ) | const |
Returns flags defining operations to be performed on shapes.
Handle< StepData_StepModel > STEPControl_Writer::Model | ( | const Standard_Boolean | newone = Standard_False | ) |
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.
void STEPControl_Writer::PrintStatsTransfer | ( | const Standard_Integer | what, |
const Standard_Integer | mode = 0 ) const |
Displays the statistics for the last translation. what defines the kind of statistics that are displayed:
void STEPControl_Writer::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
.
theParameters | the parameters for shape processing. |
theAdditionalParameters | the additional parameters for shape processing. |
void STEPControl_Writer::SetShapeFixParameters | ( | const XSAlgo_ShapeProcessor::ParameterMap & | theParameters | ) |
Sets parameters for shape processing.
theParameters | the parameters for shape processing. |
void STEPControl_Writer::SetShapeFixParameters | ( | XSAlgo_ShapeProcessor::ParameterMap && | theParameters | ) |
Sets parameters for shape processing. Parameters are moved from the input map.
theParameters | the parameters for shape processing. |
void STEPControl_Writer::SetShapeProcessFlags | ( | const ShapeProcess::OperationsFlags & | theFlags | ) |
Sets flags defining operations to be performed on shapes.
theFlags | The flags defining operations to be performed on shapes. |
void STEPControl_Writer::SetTolerance | ( | const Standard_Real | Tol | ) |
Sets a length-measure value that will be written to uncertainty-measure-with-unit when the next shape is translated.
void STEPControl_Writer::SetWS | ( | const Handle< XSControl_WorkSession > & | WS, |
const Standard_Boolean | scratch = Standard_True ) |
Sets a specific session to <me>
IFSelect_ReturnStatus STEPControl_Writer::Transfer | ( | const TopoDS_Shape & | sh, |
const STEPControl_StepModelType | mode, | ||
const DESTEP_Parameters & | theParams, | ||
const Standard_Boolean | compgraph = Standard_True, | ||
const Message_ProgressRange & | theProgress = Message_ProgressRange() ) |
Translates shape sh to a STEP entity.
IFSelect_ReturnStatus STEPControl_Writer::Transfer | ( | const TopoDS_Shape & | sh, |
const STEPControl_StepModelType | mode, | ||
const Standard_Boolean | compgraph = Standard_True, | ||
const Message_ProgressRange & | theProgress = Message_ProgressRange() ) |
Translates shape sh to a STEP entity. mode defines the STEP entity type to be output:
void STEPControl_Writer::UnsetTolerance | ( | ) |
Unsets the tolerance formerly forced by SetTolerance.
IFSelect_ReturnStatus STEPControl_Writer::Write | ( | const Standard_CString | theFileName | ) |
Writes a STEP model in the file identified by filename.
IFSelect_ReturnStatus STEPControl_Writer::WriteStream | ( | std::ostream & | theOStream | ) |
Writes a STEP model in the std::ostream.
Handle< XSControl_WorkSession > STEPControl_Writer::WS | ( | ) | const |
Returns the session used in <me>