DATAKIT API  V2025.1
psw.hpp
Go to the documentation of this file.
1 /**********************************************************
2  PSW.HPP : DATAKIT PARASOLID WRITE
3 ***********************************************************/
6 
7 
14 DtkErrorStatus psw_InitFile( const Dtk_string& inFileOut, Dtk_bool muteMode, Dtk_Int32 inVersion = 180 );
15 DtkErrorStatus psw_InitFile ( Dtk_tab<char>& outParasolidStream, Dtk_bool muteMode, Dtk_Int32 inVersion=180);
16 
22 DtkErrorStatus psw_EndFile(Dtk_tab<Dtk_ID> &inTabIds, Dtk_bool binForceListOfBody = DTK_FALSE);
23 
29 
36 Dtk_ErrorStatus psw_WriteBody (Dtk_BodyPtr& inBody, Dtk_tab<Dtk_ID> &outTabIds, Dtk_Int32 writeMode = 0);
37 
45 
46 
56 DtkErrorStatus psw_WriteBody(Dtk_tab<Dtk_ID> &outTabIds, Dtk_tab<Dtk_BodyPtr> &bodies, Dtk_bool bSewing = DTK_TRUE, Dtk_Double64 tolmin = 0.01, Dtk_Double64 tolmax = 0.05, int iterationNumber = 3);
57 
63 
71 DtkErrorStatus psw_CreateInstance (Dtk_ID inIdAss, Dtk_ID inIdPart, Dtk_transfoPtr &Matrix, Dtk_ID &outIdInst);
72 
79 
86 
93 
94 
100 
107 DtkErrorStatus psw_CreateCSysAttribut (Dtk_ID inIdCompo, const Dtk_transfo &transfo, Dtk_bool bCurrent);
108 
115 
121 
122 
123 
130 
131 // How should we write faces ? combined status possible
132 // 0 No change
133 // 1 No topology saved, faces unsewed
134 // 2 all open shell saved in one body
135 void psw_SetWritingFacesMode( Dtk_Int32 inPreference );
136 
137 // How should we write mesh ?
138 // 0 No topology (default value)
139 // 1 with topology if exist
140 void psw_SetWritingMeshMode( Dtk_Int32 inPreference );
141 
142 // How should we write nonmanifold topology ?
143 // 0 manifold translation (default value)
144 // 1 conserve nonmanifold if exist
146 
147 // should we write custom Attributs readden ? (default TRUE) available only in case of Keep Kernel Data reading mode
148 void psw_SetWritingCustomAttributMode( Dtk_bool bWriteCustomAttribut );
149 
150 
Dtk_ID
uint32_t Dtk_ID
Definition: define.h:689
Dtk_transfo
This is the Transformation dedicated class.
Definition: dtk_transfo.hpp:19
psw_WriteMesh
Dtk_ErrorStatus psw_WriteMesh(Dtk_MeshPtr &inMesh, Dtk_tab< Dtk_ID > &outTabIds, Dtk_bool bExplode=DTK_FALSE)
Writes a Mesh of a 3D part.
psw_CreateInstance
DtkErrorStatus psw_CreateInstance(Dtk_ID inIdAss, Dtk_ID inIdPart, Dtk_transfoPtr &Matrix, Dtk_ID &outIdInst)
Create an Instance item of a part referenced by inIdPart.
psw_InitFile
DtkErrorStatus psw_InitFile(const Dtk_string &inFileOut, Dtk_bool muteMode, Dtk_Int32 inVersion=180)
Initialise a file to be written.
psw_SetWritingCustomAttributMode
void psw_SetWritingCustomAttributMode(Dtk_bool bWriteCustomAttribut)
DTK_TRUE
#define DTK_TRUE
Definition: define.h:727
psw_SetNoNamedAttribut
DtkErrorStatus psw_SetNoNamedAttribut(Dtk_ID inIdCompo, Dtk_InfoPtr &info)
set name attribut if not defined only (body, assembly, instance)
psw_CreateCSysAttribut
DtkErrorStatus psw_CreateCSysAttribut(Dtk_ID inIdCompo, const Dtk_transfo &transfo, Dtk_bool bCurrent)
Create Coordinate System attribut attached to a point body (body with 1 point only)
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:58
psw_WritePointBody
Dtk_ErrorStatus psw_WritePointBody(const Dtk_AxisSystemPtr &inObject, Dtk_tab< Dtk_ID > &outTabIds)
Writes a Body defined by one point only.
DTK_FALSE
#define DTK_FALSE
Definition: define.h:728
Dtk_bool
char Dtk_bool
Definition: define.h:725
psw_UpdateNameAttribut
DtkErrorStatus psw_UpdateNameAttribut(Dtk_ID inIdCompo, Dtk_InfoPtr &info)
Update name attribut only (body, assembly, instance)
DtkReaderType
DtkReaderType
Definition: dtk_maindoc.hpp:29
Dtk_Double64
double Dtk_Double64
Definition: define.h:699
psw_CreateAttribut
DtkErrorStatus psw_CreateAttribut(Dtk_ID inIdCompo, Dtk_InfoPtr &info)
Create all attribut attached to a component (body, assembly, instance)
Dtk_Int32
int32_t Dtk_Int32
Definition: define.h:687
psw_SetWritingMeshMode
void psw_SetWritingMeshMode(Dtk_Int32 inPreference)
psw_CreateEmptyAssembly
DtkErrorStatus psw_CreateEmptyAssembly(Dtk_ID &outIdass)
Create the entry item of an assembly.
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
psw_SetReaderType
Dtk_ErrorStatus psw_SetReaderType(DtkReaderType readertype)
set the current reader used on the writer activated
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
psw_WriteBody
Dtk_ErrorStatus psw_WriteBody(Dtk_BodyPtr &inBody)
Writes a Body of a 3D part (3D content of a product), of any kind (solid, shell / faces,...
Dtk_tab< char >
psw_SetPublicationAttribut
Dtk_ErrorStatus psw_SetPublicationAttribut(Dtk_ID inIdCompo, const Dtk_string &publication)
Create all publication attribut attached to a component (body)
psw_EndFile
DtkErrorStatus psw_EndFile(Dtk_tab< Dtk_ID > &inTabIds, Dtk_bool binForceListOfBody=DTK_FALSE)
Ends the writing of the Parasolid (x_t or x_b) file.
psw_LinkAttribut
DtkErrorStatus psw_LinkAttribut(Dtk_ID inIdAss)
link all attribut attached to an assembly
psw_SetWritingFacesMode
void psw_SetWritingFacesMode(Dtk_Int32 inPreference)
psw_SetWritingNonmanifoldTopolgyMode
void psw_SetWritingNonmanifoldTopolgyMode(Dtk_Int32 inPreference)