DATAKIT SDK  V2026.2
xmtw_psk.hpp
Go to the documentation of this file.
1 #ifndef __INIT_WRITE_XMT
2 #define __INIT_WRITE_XMT
3 
4 //! \brief Exported APIs for XMT Write Library
5 namespace xmtw
6 {
7 
8  //! \brief Initialize the Parasolid Writer
9  //! \return dtkNoError if it is OK.
10  //! \param [in] inFileName : Output file
11  //! \param [in] inLogFile : Log file
12  //! \param [in] inLicFct : License function or Null
13  //! \param [in] inMode : Internal use
14  //! \remark This is the first function called for the writer.
15  //! \remark : If you don't need to write a parasolid file on the disc, set inFileName to ""
16  Dtk_ErrorStatus InitWrite(const Dtk_string &inFileName, const Dtk_string& inLogFile,const Dtk_string &inSchemaPath,Licence_dtk inLicFct,Dtk_Int32 inMode =0 );
17  //! \brief Write the entity provided in parameter.and generates a parasolid file
18  //! \param [in] inEntity : The Entity to be written
19  //! \param [in] inFileName : The name of the parasolid file
20  //! \param [in] inType : 'T' (default) : text file (x_t), 'B' : binary file (x_b)
21  //! \param [in] inTransmitversion : Parasolid file version
22  //! \return dtkNoError if it is OK.
23  //! \remark This function is used to write entities groups in a file and not in memory.
24  DtkErrorStatus WriteEntity( const Dtk_EntityPtr &inEntity, Dtk_string &inFileName,Dtk_Char8 inType = 'T',Dtk_Int32 inTransmitversion=100);
25  //! \brief Write the entity provided in parameter.
26  //! \param [in] inEntity : The Entity to be written
27  //! \param [out] outTabIds : Corresponding parasolid identifiers
28  //! \return dtkNoError if it is OK.
29  //! \remark This function is used to write entities groups in the PSKERNEL session.
31  //! \brief Write the entity provided in parameter using given sewing tolerances.
32  //! \param [in] inEntity : The Entity to be written
33  //! \param [out] outTabIds : Corresponding parasolid identifiers
34  //! \param [in] bSewing : Option to sew bodies
35  //! \param [in] tolmin : Minimum sewing tolerance (in mm)
36  //! \param [in] tolmax : Maximum sewing tolerance (in mm)
37  //! \return dtkNoError if it is OK.
38  //! \remark This function is used to write entities groups in the PSKERNEL session.
39  //! \remark This function is deprecated. Please use the following one
41  Dtk_bool bSewing = DTK_TRUE,
42  Dtk_Double64 tolmin = 0.01,
43  Dtk_Double64 tolmax = 0.05);
44  //! \brief Write the entity provided in parameter using given sewing tolerances.
45  //! \param [in] inEntity : The Entity to be written
46  //! \param [out] outTabIds : Corresponding parasolid identifiers
47  //! \param [in] inSewing : Option to sew bodies
48  //! \param [in] intTolmin : Minimum sewing tolerance (in mm)
49  //! \param [in] inTolmax : Maximum sewing tolerance (in mm)
50  //! \param [in] inIterationNumber : number of sewing iterations
51  //! ( 1 : using min tolerance, > 1 : iterating between min and max tolerances, 0 : calling default sewing method)
52  //! \return dtkNoError if it is OK.
53  //! \remark This function is used to write entities groups in the PSKERNEL session.
55  Dtk_bool inSewing = DTK_TRUE,
56  Dtk_Double64 intTolmin = 0.01,
57  Dtk_Double64 inTolmax = 0.05,
58  Dtk_Int32 inIterationNumber = 3);
59 
60  //! \brief Adds identifiers for writing in output parasolid file
61  //! \param [in] inTabIDs : Entities identifiers to be written
62  //! \return dtkNoError if it is OK.
63  //! \remark This function is used to transmit identifiers before creation of parasolid file.
65  //! \brief Creation of the output file and free the Parasolid Writer
66  //! \param [in] inMode : 'T' (default) : text file (x_t), 'B' : binary file (x_b)
67  //! \param [in] inTransmitversion : Parasolid file version
68  //! \return dtkNoError if it is OK.
69  //! \remark used as the last function used for the writer.
70  Dtk_ErrorStatus EndWrite(const Dtk_UChar8 &inMode='T',Dtk_Int32 inTransmitversion=100);
71  //! \brief Set inValue = -1 if you ever start a parasolid Session
72  //! \remark to be called before InitWrite and after StartAPI
73  void SetIsAlreadyStart(const Dtk_Int32& inValue);
74 
75 
76 }
77 
78 
79 #endif
80 
xmtw::AddIds
Dtk_ErrorStatus AddIds(Dtk_tab< Dtk_ID > &inTabIDs)
Adds identifiers for writing in output parasolid file.
DTK_TRUE
#define DTK_TRUE
Definition: define.h:719
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:53
Dtk_bool
char Dtk_bool
Definition: define.h:717
Dtk_Double64
double Dtk_Double64
Definition: define.h:691
xmtw::SetIsAlreadyStart
void SetIsAlreadyStart(const Dtk_Int32 &inValue)
Set inValue = -1 if you ever start a parasolid Session
xmtw::EndWrite
Dtk_ErrorStatus EndWrite(const Dtk_UChar8 &inMode='T', Dtk_Int32 inTransmitversion=100)
Creation of the output file and free the Parasolid Writer
Dtk_Int32
int32_t Dtk_Int32
Definition: define.h:679
Dtk_Char8
char Dtk_Char8
Definition: define.h:689
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
Dtk_SmartPtr< Dtk_Entity >
Dtk_UChar8
unsigned char Dtk_UChar8
Definition: define.h:690
xmtw::InitWrite
Dtk_ErrorStatus InitWrite(const Dtk_string &inFileName, const Dtk_string &inLogFile, const Dtk_string &inSchemaPath, Licence_dtk inLicFct, Dtk_Int32 inMode=0)
Initialize the Parasolid Writer
xmtw
Exported APIs for XMT Write Library.
Definition: xmtw_psk.hpp:6
Dtk_tab
This is a high level array class.
Definition: util_stl_dtk.hpp:84
xmtw::WriteEntity
DtkErrorStatus WriteEntity(const Dtk_EntityPtr &inEntity, Dtk_string &inFileName, Dtk_Char8 inType='T', Dtk_Int32 inTransmitversion=100)
Write the entity provided in parameter.and generates a parasolid file.
Licence_dtk
char *(* Licence_dtk)(char *)
Definition: str_def.h:71
xmtw::WriteBodies
Dtk_ErrorStatus WriteBodies(const Dtk_tab< Dtk_BodyPtr > &bodies, Dtk_tab< Dtk_ID > &outTabIds, Dtk_bool bSewing=DTK_TRUE, Dtk_Double64 tolmin=0.01, Dtk_Double64 tolmax=0.05)
Write the entity provided in parameter using given sewing tolerances.