DATAKIT SDK  V2026.2
igesw.hpp
Go to the documentation of this file.
1 #ifndef __IGESW_HPP__
2 #define __IGESW_HPP__
3 //! \brief Exported APIs for IGES (.igs) Write Library
4 namespace Igesw
5 {
7  {
8  private:
9  Dtk_string Startsection;
10  Dtk_string ProductID;
11  Dtk_string FileName;
12  Dtk_string System;
13  Dtk_string Preprocessor;
14  Dtk_string UnitsName;
15  Dtk_string UnitFlag;
16  Dtk_string Author;
17  Dtk_string Organisation;
18  public:
21  //! \brief Add Unit in StartSection
22  //! \param [in] inString : StartSection.
23  void SetStartsection( const Dtk_string & inString );
24  //! \brief Add Unit in ProductID in GlobalSection
25  //! \param [in] inString : ProductID.
26  void SetProductID( const Dtk_string & inString );
27  //! \brief Add Unit in FileName in GlobalSection
28  //! \param [in] inString : FileName.
29  void SetFileName( const Dtk_string & inString );
30  //! \brief Add Unit in System in GlobalSection
31  //! \param [in] inString : System.
32  void SetSystem( const Dtk_string & inString );
33  //! \brief Add Unit in Preprocessor in GlobalSection
34  //! \param [in] inString : Preprocessor.
35  void SetPreprocessor( const Dtk_string & inString );
36 
37  //! \brief Add Unit in GlobalSection following iges norm
38  //! \param [in] inUnitsName : UnitName.
39  //! \param [in] inUnitFlag : UnitFlag.
40  //! \remark inGlobalSection.SetUnit( "INCH", "1" );
41  //! \remark inGlobalSection.SetUnit( "MM", "2" );
42  void SetUnit( const Dtk_string & inUnitsName, const Dtk_string & inUnitFlag );
43  //! \brief Add Unit in Author in GlobalSection
44  //! \param [in] inString : Author.
45  void SetAuthor( const Dtk_string & inString );
46  //! \brief Add Unit in Organisation in GlobalSection
47  //! \param [in] inString : Organisation.
48  void SetOrganisation( const Dtk_string & inString );
58 
59  };
60  //! \brief Initialize the Iges Writer
61  //! \return dtkNoError if it is OK.
62  //! \param [in] inOutputFile : Output file name
63  //! \param [in] inLogFile : Log file
64  //! \param [in] inHeaderInformations : StartSection and Global Section information
65  //! \remark This function is the first call for the writer, it must me called after Dtk_API::StartAPI(...)
66  DtkErrorStatus InitWrite(const Dtk_string& inOutputFile, const Dtk_string& inLogFile, IgesMetaData inHeaderInformations);
67 
68  //! \brief Creation of the output file and free the Iges Writer
69  //! \return dtkNoError if it is OK.
70  //! \remark used as the last function used for the writer.
72 
73  //! \brief Write an entity
74  //! \param [in] inEntity : The Entity to be written
75  //! \param [in] inDependancyFlag : 0 for independant entities / 1 for entities to add in Prototype
76  //! \param [out] outIndices : IDs of entity written
77  //! \return dtkNoError if it is OK.
78  //! \remark This function is used to write entities.
79  Dtk_ErrorStatus WriteEntity(const Dtk_EntityPtr& inEntity,Dtk_Char8 inDependancyFlag,Dtk_tab<Dtk_ID> &outIndices);
80 
81 
82  //! \brief Write a Prototype 308 subfigure entity
83  //! \param [in] inIndices : Entities IDs to add to 308
84  //! \param [in] inProtoInfos : Prototype infos (Name ,Color , layer)
85  //! \param [out] outProtoIndex : ID of 308 written
86  //! \return dtkNoError if it is OK.
87  Dtk_ErrorStatus WritePrototype(const Dtk_tab<Dtk_ID> &inIndices,const Dtk_InfoPtr &inProtoInfos, Dtk_ID &outProtoIndex);
88 
89 
90  //! \brief Write a Instance 408 figure entity
91  //! \param [in] inProtoIndex : Prototype to be Instanciate
92  //! \param [in] inPlacement : Matrix Placement
93  //! \param [in] inInstanceInfos : Instance infos (Name ,Color , layer)
94  //! \param [in] inDependancyFlag : 0 for independant instance / 1 for instance to add in another Prototype
95  //! \param [out] outInstanceIndex : ID of 308 written
96  //! \return dtkNoError if it is OK.
97  Dtk_ErrorStatus InstanciatePrototype(Dtk_ID inProtoIndex,const Dtk_transfo &inPlacement,const Dtk_InfoPtr &inInstanceInfos,Dtk_Char8 inDependancyFlag,Dtk_ID &outInstanceIndex);
98 
99 }
100 
101 #endif
Igesw::IgesMetaData::SetProductID
void SetProductID(const Dtk_string &inString)
Add Unit in ProductID in GlobalSection.
Dtk_ID
uint32_t Dtk_ID
Definition: define.h:681
Dtk_transfo
This is the Transformation dedicated class.
Definition: dtk_transfo.hpp:19
Igesw::WritePrototype
Dtk_ErrorStatus WritePrototype(const Dtk_tab< Dtk_ID > &inIndices, const Dtk_InfoPtr &inProtoInfos, Dtk_ID &outProtoIndex)
Write a Prototype 308 subfigure entity
Igesw::IgesMetaData::GetPreprocessor
Dtk_string GetPreprocessor()
Igesw::IgesMetaData::GetSystem
Dtk_string GetSystem()
Igesw::IgesMetaData::SetPreprocessor
void SetPreprocessor(const Dtk_string &inString)
Add Unit in Preprocessor in GlobalSection.
Igesw::WriteEntity
Dtk_ErrorStatus WriteEntity(const Dtk_EntityPtr &inEntity, Dtk_Char8 inDependancyFlag, Dtk_tab< Dtk_ID > &outIndices)
Write an entity
Igesw::IgesMetaData::SetUnit
void SetUnit(const Dtk_string &inUnitsName, const Dtk_string &inUnitFlag)
Add Unit in GlobalSection following iges norm.
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:53
Igesw::IgesMetaData::GetUnitFlag
Dtk_string GetUnitFlag()
Igesw
Exported APIs for IGES (.igs) Write Library.
Definition: igesw.hpp:5
Igesw::IgesMetaData
Definition: igesw.hpp:7
Igesw::IgesMetaData::GetOrganisation
Dtk_string GetOrganisation()
Igesw::IgesMetaData::SetStartsection
void SetStartsection(const Dtk_string &inString)
Add Unit in StartSection.
Igesw::IgesMetaData::SetSystem
void SetSystem(const Dtk_string &inString)
Add Unit in System in GlobalSection.
Igesw::InstanciatePrototype
Dtk_ErrorStatus InstanciatePrototype(Dtk_ID inProtoIndex, const Dtk_transfo &inPlacement, const Dtk_InfoPtr &inInstanceInfos, Dtk_Char8 inDependancyFlag, Dtk_ID &outInstanceIndex)
Write a Instance 408 figure entity
Igesw::EndWrite
DtkErrorStatus EndWrite()
Creation of the output file and free the Iges Writer
Igesw::IgesMetaData::~IgesMetaData
~IgesMetaData()
Igesw::InitWrite
DtkErrorStatus InitWrite(const Dtk_string &inOutputFile, const Dtk_string &inLogFile, IgesMetaData inHeaderInformations)
Initialize the Iges Writer
Igesw::IgesMetaData::SetFileName
void SetFileName(const Dtk_string &inString)
Add Unit in FileName in GlobalSection.
Igesw::IgesMetaData::GetUnitsName
Dtk_string GetUnitsName()
Dtk_Char8
char Dtk_Char8
Definition: define.h:689
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
Dtk_SmartPtr< Dtk_Entity >
Igesw::IgesMetaData::GetStartsection
Dtk_string GetStartsection()
Igesw::IgesMetaData::IgesMetaData
IgesMetaData()
Dtk_tab
This is a high level array class.
Definition: util_stl_dtk.hpp:84
Igesw::IgesMetaData::GetAuthor
Dtk_string GetAuthor()
Igesw::IgesMetaData::GetProductID
Dtk_string GetProductID()
Igesw::IgesMetaData::GetFileName
Dtk_string GetFileName()
Igesw::IgesMetaData::SetAuthor
void SetAuthor(const Dtk_string &inString)
Add Unit in Author in GlobalSection.
Igesw::IgesMetaData::SetOrganisation
void SetOrganisation(const Dtk_string &inString)
Add Unit in Organisation in GlobalSection.