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
    IGESData_IGESModel Class Reference

    Defines the file header and entities for IGES files. These headers and entities result from a complete data translation using the IGES data exchange processor. Each entity is contained in a single model only and has a unique identifier. You can access this identifier using the method Number. Gives an access to the general data in the Start and the Global sections of an IGES file. The IGES file includes the following sections: -Start, -Global, -Directory Entry, -Parameter Data, -Terminate. More...

    #include <IGESData_IGESModel.hxx>

    Inheritance diagram for IGESData_IGESModel:

    Public Member Functions

     IGESData_IGESModel ()
    void ClearHeader () override
     Erases all data specific to IGES file Header (Start + Global).
    void DumpHeader (Standard_OStream &S, const int levellevel=0) const override
     Prints the IGES file header (Start and Global Sections) to the log file. The integer parameter is intended to be used as a level indicator but is not used at present.
    occ::handle< NCollection_HSequence< occ::handle< TCollection_HAsciiString > > > StartSection () const
     Returns Model's Start Section (list of comment lines).
    int NbStartLines () const
     Returns the count of recorded Start Lines.
    const char * StartLine (const int numnum) const
     Returns a line from the IGES file Start section by specifying its number. An empty string is returned if the number given is out of range, the range being from 1 to NbStartLines.
    void ClearStartSection ()
     Clears the IGES file Start Section.
    void SetStartSection (const occ::handle< NCollection_HSequence< occ::handle< TCollection_HAsciiString > > > &list, const bool copy=true)
     Sets a new Start section from a list of strings. If copy is false, the Start section will be shared. Any modifications made to the strings later on, will have an effect on the Start section. If copy is true (default value), an independent copy of the strings is created and used as the Start section. Any modifications made to the strings later on, will have no effect on the Start section.
    void AddStartLine (const char *const line, const int atnum=0)
     Adds a new string to the existing Start section at the end if atnum is 0 or not given, or before atnumth line.
    const IGESData_GlobalSectionGlobalSection () const
     Returns the Global section of the IGES file.
    IGESData_GlobalSectionChangeGlobalSection ()
     Returns the Global section of the IGES file.
    void SetGlobalSection (const IGESData_GlobalSection &header)
     Sets the Global section of the IGES file.
    bool ApplyStatic (const char *const paramparam="")
     Sets some of the Global section parameters with the values defined by the translation parameters. param may be:
    occ::handle< IGESData_IGESEntityEntity (const int numnum) const
     Returns an IGES entity given by its rank number.
    int DNum (const occ::handle< IGESData_IGESEntity > &ent) const
     Returns the equivalent DE Number for an Entity, i.e. 2*Number(ent)-1 , or 0 if <ent> is unknown from <me> This DE Number is used for File Writing for instance.
    void GetFromAnother (const occ::handle< Interface_InterfaceModel > &other) override
     gets Header (GlobalSection) from another Model
    occ::handle< Interface_InterfaceModelNewEmptyModel () const override
     Returns a New Empty Model, same type as <me> i.e. IGESModel.
    void VerifyCheck (occ::handle< Interface_Check > &ach) const override
     Checks that the IGES file Global section contains valid data that conforms to the IGES specifications.
    void SetLineWeights (const double defw)
     Sets LineWeights of contained Entities according header data (MaxLineWeight and LineWeightGrad) or to a default value for undefined weights.
    void ClearLabels () override
     erases specific labels, i.e. does nothing
    void PrintLabel (const occ::handle< Standard_Transient > &ent, Standard_OStream &S) const override
     Prints label specific to IGES norm for a given entity, i.e. its directory entry number (2*Number-1).
    void PrintToLog (const occ::handle< Standard_Transient > &ent, Standard_OStream &S) const override
     Prints label specific to IGES norm for a given – – entity, i.e. its directory entry number (2*Number-1) in the log file format.
    void PrintInfo (const occ::handle< Standard_Transient > &ent, Standard_OStream &S) const
     Prints label specific to IGES norm for a given entity, i.e. its directory entry number (2*Number-1).
    occ::handle< TCollection_HAsciiStringStringLabel (const occ::handle< Standard_Transient > &ent) const override
     Returns a string with the label attached to a given entity, i.e. a string "Dnn" with nn = directory entry number (2*N-1).
    Public Member Functions inherited from Interface_InterfaceModel
    void Destroy ()
     Clears the list of entities (service WhenDelete).
     ~Interface_InterfaceModel () override
    void SetProtocol (const occ::handle< Interface_Protocol > &proto)
     Sets a Protocol for this Model It is also set by a call to AddWithRefs with Protocol It is used for : DumpHeader (as required), ClearEntities ...
    virtual occ::handle< Interface_ProtocolProtocol () const
     Returns the Protocol which has been set by SetProtocol, or AddWithRefs with Protocol.
    void SetGTool (const occ::handle< Interface_GTool > &gtool)
     Sets a GTool for this model, which already defines a Protocol.
    occ::handle< Interface_GToolGTool () const
     Returns the GTool, set by SetProtocol or by SetGTool.
    bool & DispatchStatus ()
     Returns the Dispatch Status, either for get or set A Model which is produced from Dispatch may share entities with the original (according to the Protocol), hence these non-copied entities should not be deleted.
    virtual void Clear ()
     Erases contained data; used when a Model is copied to others : the new copied ones begin from clear Clear calls specific method ClearHeader (see below).
    virtual void ClearEntities ()
     Clears the entities; uses the general service WhenDelete, in addition to the standard Memory Manager; can be redefined.
    int NbEntities () const
     Returns count of contained Entities.
    bool Contains (const occ::handle< Standard_Transient > &anentity) const
     Returns True if a Model contains an Entity (for a ReportEntity, looks for the ReportEntity itself AND its Concerned Entity).
    int Number (const occ::handle< Standard_Transient > &anentity) const
     Returns the Number of an Entity in the Model if it contains it. Else returns 0. For a ReportEntity, looks at Concerned Entity. Returns the Directory entry Number of an Entity in the Model if it contains it. Else returns 0. For a ReportEntity, looks at Concerned Entity.
    const occ::handle< Standard_Transient > & Value (const int numnum) const
     Returns an Entity identified by its number in the Model Each sub-class of InterfaceModel can define its own method Entity to return its specific class of Entity (e.g. for VDA, VDAModel returns a VDAEntity), working by calling Value Remark : For a Reported Entity, (Erroneous, Corrected, Unknown), this method returns this Reported Entity. See ReportEntity for other questions.
    int NbTypes (const occ::handle< Standard_Transient > &ent) const
     Returns the count of DISTINCT types under which an entity may be processed. Defined by the Protocol, which gives default as 1 (dynamic Type).
    occ::handle< Standard_TypeType (const occ::handle< Standard_Transient > &ent, const int numnum=1) const
     Returns a type, given its rank : defined by the Protocol (by default, the first one).
    const char * TypeName (const occ::handle< Standard_Transient > &ent, const bool complete=true) const
     Returns the type name of an entity, from the list of types (one or more ...) <complete> True (D) gives the complete type, else packages are removed WARNING : buffered, to be immediately copied or printed.
    Interface_DataState EntityState (const int numnum) const
     Returns the State of an entity, given its number.
    bool IsReportEntity (const int numnum, const bool semantic=false) const
     Returns True if <num> identifies a ReportEntity in the Model Hence, ReportEntity can be called.
    occ::handle< Interface_ReportEntityReportEntity (const int numnum, const bool semantic=false) const
     Returns a ReportEntity identified by its number in the Model, or a Null Handle If <num> does not identify a ReportEntity.
    bool IsErrorEntity (const int numnum) const
     Returns True if <num> identifies an Error Entity : in this case, a ReportEntity brings Fail Messages and possibly an "undefined" Content, see IsRedefinedEntity.
    bool IsRedefinedContent (const int numnum) const
     Returns True if <num> identifies an Entity which content is redefined through a ReportEntity (i.e. with literal data only) This happens when an entity is syntactically erroneous in the way that its basic content remains empty. For more details (such as content itself), see ReportEntity.
    bool ClearReportEntity (const int numnum)
     Removes the ReportEntity attached to Entity <num>. Returns True if done, False if no ReportEntity was attached to <num>. Warning : the caller must assume that this clearing is meaningful.
    bool SetReportEntity (const int numnum, const occ::handle< Interface_ReportEntity > &rep)
     Sets or Replaces a ReportEntity for the Entity <num>. Returns True if Report is replaced, False if it has been replaced Warning : the caller must assume that this setting is meaningful.
    bool AddReportEntity (const occ::handle< Interface_ReportEntity > &rep, const bool semantic=false)
     Adds a ReportEntity as such. Returns False if the concerned entity is not recorded in the Model Else, adds it into, either the main report list or the list for semantic checks, then returns True.
    bool IsUnknownEntity (const int numnum) const
     Returns True if <num> identifies an Unknown Entity : in this case, a ReportEntity with no Check Messages designates it.
    void FillSemanticChecks (const Interface_CheckIterator &checks, const bool clear=true)
     Fills the list of semantic checks. This list is computed (by CheckTool). Hence, it can be stored in the model for later queries <clear> True (D) : new list replaces <clear> False : new list is cumulated.
    bool HasSemanticChecks () const
     Returns True if semantic checks have been filled.
    const occ::handle< Interface_Check > & Check (const int numnum, const bool syntactic) const
     Returns the check attached to an entity, designated by its Number. 0 for global check <semantic> True : recorded semantic check <semantic> False : recorded syntactic check (see ReportEntity) If no check is recorded for <num>, returns an empty Check.
    virtual void Reservate (const int nbent)
     Does a reservation for the List of Entities (for optimized storage management). If it is not called, storage management can be less efficient. <nbent> is the expected count of Entities to store.
    virtual void AddEntity (const occ::handle< Standard_Transient > &anentity)
     Internal method for adding an Entity. Used by file reading (defined by each Interface) and Transfer tools. It adds the entity required to be added, not its refs : see AddWithRefs. If <anentity> is a ReportEntity, it is added to the list of Reports, its Concerned Entity (Erroneous or Corrected, else Unknown) is added to the list of Entities. That is, the ReportEntity must be created before Adding.
    void AddWithRefs (const occ::handle< Standard_Transient > &anent, const occ::handle< Interface_Protocol > &proto, const int levellevel=0, const bool listall=false)
     Adds to the Model, an Entity with all its References, as they are defined by General Services FillShared and ListImplied. Process is recursive (any sub-levels) if <level> = 0 (Default) Else, adds sub-entities until the required sub-level. Especially, if <level> = 1, adds immediate subs and that's all.
    void AddWithRefs (const occ::handle< Standard_Transient > &anent, const int levellevel=0, const bool listall=false)
     Same as above, but works with the Protocol of the Model.
    void AddWithRefs (const occ::handle< Standard_Transient > &anent, const Interface_GeneralLib &lib, const int levellevel=0, const bool listall=false)
     Same as above, but works with an already created GeneralLib.
    void ReplaceEntity (const int nument, const occ::handle< Standard_Transient > &anent)
     Replace Entity with Number=nument on other entity - "anent".
    void ReverseOrders (const int after=0)
     Reverses the Numbers of the Entities, between <after> and the total count of Entities. Thus, the entities : 1,2 ... after, after+1 ... nb-1, nb become numbered as : 1,2 ... after, nb, nb-1 ... after+1 By default (after = 0) the whole list of Entities is reversed.
    void ChangeOrder (const int oldnum, const int newnum, const int countcount=1)
     Changes the Numbers of some Entities : <oldnum> is moved to <newnum>, same for <count> entities. Thus : 1,2 ... newnum-1 newnum ... oldnum .. oldnum+count oldnum+count+1 .. gives 1,2 ... newnum-1 oldnum .. oldnum+count newnum ... oldnum+count+1 (can be seen as a circular permutation).
    void GetFromTransfer (const Interface_EntityIterator &aniter)
     Gets contents from an EntityIterator, prepared by a Transfer tool (e.g TransferCopy). Starts from clear.
    bool SetCategoryNumber (const int numnum, const int valval)
     Records a category number for an entity number Returns True when done, False if <num> is out of range.
    int CategoryNumber (const int numnum) const
     Returns the recorded category number for a given entity number 0 if none was defined for this entity.
    void FillIterator (Interface_EntityIterator &iter) const
     Allows an EntityIterator to get a list of Entities.
    Interface_EntityIterator Entities () const
     Returns the list of all Entities, as an Iterator on Entities (the Entities themselves, not the Reports).
    Interface_EntityIterator Reports (const bool semantic=false) const
     Returns the list of all ReportEntities, i.e. data about Entities read with Error or Warning information (each item has to be casted to Report Entity then it can be queried for Concerned Entity, Content, Check ...) By default, returns the main reports, is <semantic> is True it returns the list for semantic checks.
    Interface_EntityIterator Redefineds () const
     Returns the list of ReportEntities which redefine data (generally, if concerned entity is "Error", a literal content is added to it : this is a "redefined entity".
    const occ::handle< Interface_Check > & GlobalCheck (const bool syntactic=true) const
     Returns the GlobalCheck, which memorizes messages global to the file (not specific to an Entity), especially Header.
    void SetGlobalCheck (const occ::handle< Interface_Check > &ach)
     Allows to modify GlobalCheck, after getting then completing it Remark : it is SYNTACTIC check. Semantics, see FillChecks.
    void Print (const occ::handle< Standard_Transient > &ent, Standard_OStream &ss, const int modemode=0) const
     Prints identification of a given entity in <me>, in order to be printed in a list or phrase <mode> < 0 : prints only its number <mode> = 1 : just calls PrintLabel <mode> = 0 (D) : prints its number plus '/' plus PrintLabel If <ent> == <me>, simply prints "Global" If <ent> is unknown, prints "??/its type".
    virtual int NextNumberForLabel (const char *const labellabel, const int lastnum=0, const bool exact=true) const
     Searches a label which matches with one entity. Begins from <lastnum>+1 (default:1) and scans the entities until <NbEntities>. For the first which matches <label>, this method returns its Number. Returns 0 if nothing found Can be called recursively (labels are not specified as unique) <exact> : if True (default), exact match is required else, checks the END of entity label.
    Public Member Functions inherited from Standard_Transient
     Standard_Transient ()
     Empty constructor.
     Standard_Transient (const Standard_Transient &)
     Copy constructor – does nothing.
    Standard_Transientoperator= (const Standard_Transient &)
     Assignment operator, needed to avoid copying reference counter.
    virtual ~Standard_Transient ()=default
     Destructor must be virtual.
    virtual const opencascade::handle< Standard_Type > & DynamicType () const
     Returns a type descriptor about this object.
    bool IsInstance (const opencascade::handle< Standard_Type > &theType) const
     Returns a true value if this is an instance of Type.
    bool IsInstance (const char *const theTypeName) const
     Returns a true value if this is an instance of TypeName.
    bool IsKind (const opencascade::handle< Standard_Type > &theType) const
     Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
    bool IsKind (const char *const theTypeName) const
     Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
    Standard_TransientThis () const
     Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
    int GetRefCount () const noexcept
     Get the reference counter of this object.
    void IncrementRefCounter () noexcept
     Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations.
    int DecrementRefCounter () noexcept
     Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement.
    virtual void Delete () const
     Memory deallocator for transient classes.

    Additional Inherited Members

    typedef void base_type
     Returns a type descriptor about this object.
    Static Public Member Functions inherited from Interface_InterfaceModel
    static const char * ClassName (const char *const typnam)
     From a CDL Type Name, returns the Class part (package dropped) WARNING : buffered, to be immediately copied or printed.
    static bool HasTemplate (const char *const namename)
     Returns true if a template is attached to a given name.
    static occ::handle< Interface_InterfaceModelTemplate (const char *const namename)
     Returns the template model attached to a name, or a Null Handle.
    static bool SetTemplate (const char *const namename, const occ::handle< Interface_InterfaceModel > &model)
     Records a new template model with a name. If the name was already recorded, the corresponding template is replaced by the new one. Then, WARNING : test HasTemplate to avoid surprises.
    static occ::handle< NCollection_HSequence< occ::handle< TCollection_HAsciiString > > > ListTemplates ()
     Returns the complete list of names attached to template models.
    static constexpr const char * get_type_name ()
     Returns a type descriptor about this object.
    static const opencascade::handle< Standard_Type > & get_type_descriptor ()
     Returns type descriptor of Standard_Transient class.
    Protected Member Functions inherited from Interface_InterfaceModel
     Interface_InterfaceModel ()
     Defines empty InterfaceModel, ready to be filled.

    Detailed Description

    Defines the file header and entities for IGES files. These headers and entities result from a complete data translation using the IGES data exchange processor. Each entity is contained in a single model only and has a unique identifier. You can access this identifier using the method Number. Gives an access to the general data in the Start and the Global sections of an IGES file. The IGES file includes the following sections: -Start, -Global, -Directory Entry, -Parameter Data, -Terminate.

    Constructor & Destructor Documentation

    ◆ IGESData_IGESModel()

    IGESData_IGESModel::IGESData_IGESModel ( )

    Member Function Documentation

    ◆ AddStartLine()

    void IGESData_IGESModel::AddStartLine ( const char *const line,
    const int atnum = 0 )

    Adds a new string to the existing Start section at the end if atnum is 0 or not given, or before atnumth line.

    ◆ ApplyStatic()

    bool IGESData_IGESModel::ApplyStatic ( const char *const param = "")

    Sets some of the Global section parameters with the values defined by the translation parameters. param may be:

    • receiver (value read in XSTEP.iges.header.receiver),
    • author (value read in XSTEP.iges.header.author),
    • company (value read in XSTEP.iges.header.company). The default value for param is an empty string. Returns True when done and if param is given, False if param is unknown or empty. Note: Set the unit in the IGES file Global section via IGESData_BasicEditor class.

    ◆ ChangeGlobalSection()

    IGESData_GlobalSection & IGESData_IGESModel::ChangeGlobalSection ( )
    inline

    Returns the Global section of the IGES file.

    ◆ ClearHeader()

    void IGESData_IGESModel::ClearHeader ( )
    overridevirtual

    Erases all data specific to IGES file Header (Start + Global).

    Implements Interface_InterfaceModel.

    ◆ ClearLabels()

    void IGESData_IGESModel::ClearLabels ( )
    overridevirtual

    erases specific labels, i.e. does nothing

    Implements Interface_InterfaceModel.

    ◆ ClearStartSection()

    void IGESData_IGESModel::ClearStartSection ( )

    Clears the IGES file Start Section.

    ◆ DNum()

    int IGESData_IGESModel::DNum ( const occ::handle< IGESData_IGESEntity > & ent) const

    Returns the equivalent DE Number for an Entity, i.e. 2*Number(ent)-1 , or 0 if <ent> is unknown from <me> This DE Number is used for File Writing for instance.

    ◆ DumpHeader()

    void IGESData_IGESModel::DumpHeader ( Standard_OStream & S,
    const int level = 0 ) const
    overridevirtual

    Prints the IGES file header (Start and Global Sections) to the log file. The integer parameter is intended to be used as a level indicator but is not used at present.

    Implements Interface_InterfaceModel.

    ◆ Entity()

    occ::handle< IGESData_IGESEntity > IGESData_IGESModel::Entity ( const int num) const

    Returns an IGES entity given by its rank number.

    ◆ GetFromAnother()

    void IGESData_IGESModel::GetFromAnother ( const occ::handle< Interface_InterfaceModel > & other)
    overridevirtual

    gets Header (GlobalSection) from another Model

    Implements Interface_InterfaceModel.

    ◆ GlobalSection()

    const IGESData_GlobalSection & IGESData_IGESModel::GlobalSection ( ) const
    inline

    Returns the Global section of the IGES file.

    ◆ NbStartLines()

    int IGESData_IGESModel::NbStartLines ( ) const

    Returns the count of recorded Start Lines.

    ◆ NewEmptyModel()

    occ::handle< Interface_InterfaceModel > IGESData_IGESModel::NewEmptyModel ( ) const
    overridevirtual

    Returns a New Empty Model, same type as <me> i.e. IGESModel.

    Implements Interface_InterfaceModel.

    ◆ PrintInfo()

    void IGESData_IGESModel::PrintInfo ( const occ::handle< Standard_Transient > & ent,
    Standard_OStream & S ) const

    Prints label specific to IGES norm for a given entity, i.e. its directory entry number (2*Number-1).

    ◆ PrintLabel()

    void IGESData_IGESModel::PrintLabel ( const occ::handle< Standard_Transient > & ent,
    Standard_OStream & S ) const
    overridevirtual

    Prints label specific to IGES norm for a given entity, i.e. its directory entry number (2*Number-1).

    Implements Interface_InterfaceModel.

    ◆ PrintToLog()

    void IGESData_IGESModel::PrintToLog ( const occ::handle< Standard_Transient > & ent,
    Standard_OStream & S ) const
    overridevirtual

    Prints label specific to IGES norm for a given – – entity, i.e. its directory entry number (2*Number-1) in the log file format.

    Reimplemented from Interface_InterfaceModel.

    ◆ SetGlobalSection()

    void IGESData_IGESModel::SetGlobalSection ( const IGESData_GlobalSection & header)

    Sets the Global section of the IGES file.

    ◆ SetLineWeights()

    void IGESData_IGESModel::SetLineWeights ( const double defw)

    Sets LineWeights of contained Entities according header data (MaxLineWeight and LineWeightGrad) or to a default value for undefined weights.

    ◆ SetStartSection()

    void IGESData_IGESModel::SetStartSection ( const occ::handle< NCollection_HSequence< occ::handle< TCollection_HAsciiString > > > & list,
    const bool copy = true )

    Sets a new Start section from a list of strings. If copy is false, the Start section will be shared. Any modifications made to the strings later on, will have an effect on the Start section. If copy is true (default value), an independent copy of the strings is created and used as the Start section. Any modifications made to the strings later on, will have no effect on the Start section.

    ◆ StartLine()

    const char * IGESData_IGESModel::StartLine ( const int num) const

    Returns a line from the IGES file Start section by specifying its number. An empty string is returned if the number given is out of range, the range being from 1 to NbStartLines.

    ◆ StartSection()

    occ::handle< NCollection_HSequence< occ::handle< TCollection_HAsciiString > > > IGESData_IGESModel::StartSection ( ) const

    Returns Model's Start Section (list of comment lines).

    ◆ StringLabel()

    occ::handle< TCollection_HAsciiString > IGESData_IGESModel::StringLabel ( const occ::handle< Standard_Transient > & ent) const
    overridevirtual

    Returns a string with the label attached to a given entity, i.e. a string "Dnn" with nn = directory entry number (2*N-1).

    Implements Interface_InterfaceModel.

    ◆ VerifyCheck()

    void IGESData_IGESModel::VerifyCheck ( occ::handle< Interface_Check > & ach) const
    overridevirtual

    Checks that the IGES file Global section contains valid data that conforms to the IGES specifications.

    Reimplemented from Interface_InterfaceModel.


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