OCCT3D OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    IGESControl_Writer Class Reference

    This class creates and writes IGES files from CAS.CADE models. An IGES file can be written to an existing IGES file or to a new one. The translation can be performed in one or several operations. Each translation operation outputs a distinct root entity in the IGES file. To write an IGES file it is possible to use the following sequence: To modify the IGES file header or to change translation parameters it is necessary to use class Interface_Static (see IGESParameters and GeneralParameters). More...

    #include <IGESControl_Writer.hxx>

    Inheritance diagram for IGESControl_Writer:

    Public Member Functions

     IGESControl_Writer ()
     Creates a writer object with the default unit (millimeters) and write mode (Face). IGESControl_Writer (const char* const unit, const int modecr = 0);.
     IGESControl_Writer (const char *const theUnit, const int theModecr=0)
     Creates a writer with given values for units and for write mode. theUnit may be any unit that is accepted by the IGES standard. By default, it is the millimeter. theModecr defines the write mode and may be:
     IGESControl_Writer (const occ::handle< IGESData_IGESModel > &theModel, const int theModecr=0)
     Creates a writer object with the prepared IGES model theModel in write mode. theModecr defines the write mode and may be:
    const occ::handle< IGESData_IGESModel > & Model () const
     Returns the IGES model to be written in output.
    const occ::handle< Transfer_FinderProcess > & TransferProcess () const
    void SetTransferProcess (const occ::handle< Transfer_FinderProcess > &TP)
     Returns/Sets the TransferProcess : it contains final results and if some, check messages.
    bool AddShape (const TopoDS_Shape &sh, const Message_ProgressRange &theProgress=Message_ProgressRange())
     Translates a Shape to IGES Entities and adds them to the model Returns True if done, False if Shape not suitable for IGES or null.
    bool AddGeom (const occ::handle< Standard_Transient > &geom)
     Translates a Geometry (Surface or Curve) to IGES Entities and adds them to the model Returns True if done, False if geom is neither a Surface or a Curve suitable for IGES or is null.
    bool AddEntity (const occ::handle< IGESData_IGESEntity > &ent)
     Adds an IGES entity (and the ones it references) to the model.
    void ComputeModel ()
     Computes the entities found in the model, which is ready to be written. This contrasts with the default computation of headers only.
    bool Write (Standard_OStream &S, const bool fnes=false)
     Computes then writes the model to an OStream Returns True when done, false in case of error.
    bool Write (const char *const file, const bool fnes=false)
     Prepares and writes an IGES model either to an OStream, S or to a file name,CString. Returns True if the operation was performed correctly and False if an error occurred (for instance, if the processor could not create the file).
    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 ShapeProcess::OperationsFlagsGetShapeProcessFlags () const
     Returns flags defining operations to be performed on shapes.

    Detailed Description

    This class creates and writes IGES files from CAS.CADE models. An IGES file can be written to an existing IGES file or to a new one. The translation can be performed in one or several operations. Each translation operation outputs a distinct root entity in the IGES file. To write an IGES file it is possible to use the following sequence: To modify the IGES file header or to change translation parameters it is necessary to use class Interface_Static (see IGESParameters and GeneralParameters).

    Constructor & Destructor Documentation

    ◆ IGESControl_Writer() [1/3]

    IGESControl_Writer::IGESControl_Writer ( )

    Creates a writer object with the default unit (millimeters) and write mode (Face). IGESControl_Writer (const char* const unit, const int modecr = 0);.

    ◆ IGESControl_Writer() [2/3]

    IGESControl_Writer::IGESControl_Writer ( const char *const theUnit,
    const int theModecr = 0 )

    Creates a writer with given values for units and for write mode. theUnit may be any unit that is accepted by the IGES standard. By default, it is the millimeter. theModecr defines the write mode and may be:

    • 0: Faces (default)
    • 1: BRep.

    ◆ IGESControl_Writer() [3/3]

    IGESControl_Writer::IGESControl_Writer ( const occ::handle< IGESData_IGESModel > & theModel,
    const int theModecr = 0 )

    Creates a writer object with the prepared IGES model theModel in write mode. theModecr defines the write mode and may be:

    • 0: Faces (default)
    • 1: BRep.

    Member Function Documentation

    ◆ AddEntity()

    bool IGESControl_Writer::AddEntity ( const occ::handle< IGESData_IGESEntity > & ent)

    Adds an IGES entity (and the ones it references) to the model.

    ◆ AddGeom()

    bool IGESControl_Writer::AddGeom ( const occ::handle< Standard_Transient > & geom)

    Translates a Geometry (Surface or Curve) to IGES Entities and adds them to the model Returns True if done, False if geom is neither a Surface or a Curve suitable for IGES or is null.

    ◆ AddShape()

    bool IGESControl_Writer::AddShape ( const TopoDS_Shape & sh,
    const Message_ProgressRange & theProgress = Message_ProgressRange() )

    Translates a Shape to IGES Entities and adds them to the model Returns True if done, False if Shape not suitable for IGES or null.

    ◆ ComputeModel()

    void IGESControl_Writer::ComputeModel ( )

    Computes the entities found in the model, which is ready to be written. This contrasts with the default computation of headers only.

    ◆ GetShapeFixParameters()

    const XSAlgo_ShapeProcessor::ParameterMap & IGESControl_Writer::GetShapeFixParameters ( ) const
    inline

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

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

    ◆ GetShapeProcessFlags()

    const ShapeProcess::OperationsFlags & IGESControl_Writer::GetShapeProcessFlags ( ) const
    inline

    Returns flags defining operations to be performed on shapes.

    Returns
    The flags defining operations to be performed on shapes.

    ◆ Model()

    const occ::handle< IGESData_IGESModel > & IGESControl_Writer::Model ( ) const
    inline

    Returns the IGES model to be written in output.

    ◆ SetShapeFixParameters() [1/3]

    void IGESControl_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.

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

    ◆ SetShapeFixParameters() [2/3]

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

    Sets parameters for shape processing.

    Parameters
    theParametersthe parameters for shape processing.

    ◆ SetShapeFixParameters() [3/3]

    void IGESControl_Writer::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 IGESControl_Writer::SetShapeProcessFlags ( const ShapeProcess::OperationsFlags & theFlags)

    Sets flags defining operations to be performed on shapes.

    Parameters
    theFlagsThe flags defining operations to be performed on shapes.

    ◆ SetTransferProcess()

    void IGESControl_Writer::SetTransferProcess ( const occ::handle< Transfer_FinderProcess > & TP)
    inline

    Returns/Sets the TransferProcess : it contains final results and if some, check messages.

    ◆ TransferProcess()

    const occ::handle< Transfer_FinderProcess > & IGESControl_Writer::TransferProcess ( ) const
    inline

    ◆ Write() [1/2]

    bool IGESControl_Writer::Write ( const char *const file,
    const bool fnes = false )

    Prepares and writes an IGES model either to an OStream, S or to a file name,CString. Returns True if the operation was performed correctly and False if an error occurred (for instance, if the processor could not create the file).

    ◆ Write() [2/2]

    bool IGESControl_Writer::Write ( Standard_OStream & S,
    const bool fnes = false )

    Computes then writes the model to an OStream Returns True when done, false in case of error.


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