DATAKIT SDK  V2026.2
jtw.h
Go to the documentation of this file.
1 #ifndef _JTW_H
2 #define _JTW_H
3 #include "def/define.h"
4 #include "struct/str_def.h"
9 #include "util/dtk_maindoc.hpp"
10 #include "util/dtk_render.hpp"
11 #include "util/error_dtk.hpp"
13 #include "util/util_ent_dtk.hpp"
14 #include "util/util_stl_dtk.hpp"
16 
17 //! \ingroup jtw_utils
18 //! \class Dtk_Jtw_Interface
19 //! \brief This is Jt Interface class used to write Jt files.
21 {
22 public:
23  enum breptype
24  {
25  nobrep = 0,
26  xtbrep = 1,
27  };
29  {
31  overwritecolor = 1
32  };
34  {
35  version80 = 80,
36  version90 = 90,
37  version91 = 91,
38  version92 = 92,
39  version93 = 93,
40  version94 = 94,
41  version95 = 95,
42  version100 = 100,
43  version101 = 101,
44  version102 = 102,
45  version103 = 103,
46  version104 = 104,
47  version105 = 105,
48  version106 = 106,
49  version107 = 107,
50  version108 = 108,
51  version109 = 109,
52  version1010 = 1010
53  };
54  enum unit
55  {
58  meters = 2,
59  inches = 3,
60  feet = 4,
61  yards = 5,
65  mils = 9,
66  miles = 10
67  };
68 private:
69  void* vdata;
70  Dtk_Jtw_Interface(const Dtk_Jtw_Interface&) {} // uncopiable
71  Dtk_Jtw_Interface& operator=(const Dtk_Jtw_Interface&) { return *this; } // uncopiable
72  Dtk_string m_filename;
73 public:
74  //! \brief Constructor, initialize the Jt Writer
75  //! \param [in] inFileWritten : File to write
76  //! \param [out] outErr : Error returned. dtkNoError on success.
77  //! \param [in] inBrep : Which brep should be integrated : see breptype enum. nobrep for no brep (only mesh, packed file (default)), or xtbrep : contain Parasolid Brep, need Parasolid Writer.
78  //! \param [in] inVersion : Version to write : see writeversion enum, default is version95
79  //! \param [in] inUnit : Unit of file, see unit enum. Default is millimeters
80  Dtk_Jtw_Interface(const Dtk_string& inFileWritten, Dtk_ErrorStatus& outErr, breptype inBrep = nobrep,
81  writeversion inVersion = version95, unit inUnit = millimeters);
82  //! \brief Destructor, finalise the process
84 
85 // TreeControl
86 
87  //! \brief Open a new Instance for the assembly writing.
88  //! \remark Tree Contole method
89  //! \brief Note that at least a node must be opened before writing a mesh.
90  //! \return dtkNoError if ok.
91  //! \param [in] inName : Name of the node (written in Jt2Go assembly tree)
92  //! \param [in] inTrans : Local matrix of the node. Default is an identity matrix.
93  //! \param [in] inExternfile : if string lengths>0, open a new file from this child, allowing multiple Jt files (shattered, perpart, percomponent, or customized)
94  Dtk_ErrorStatus OpenInstance(const Dtk_string& inName, const Dtk_transfo& inTrans = Dtk_transfo(), const Dtk_string& inExternfile = Dtk_string());
95  //! \brief Open a new Instance for the assembly writing.
96  //! \remark Note that at least a node must be opened before writing a mesh.
97  //! \remark Tree Contole method
98  //! \return dtkNoError if ok.
99  //! \param [in] inName : Name of the node (written in Jt2Go assembly tree)
100  //! \param [in] inIdpart : ID to reinstance a part : if you give 2 times the same ID, the part is reinstancied.
101  //! \param [in] inTrans : Local matrix of the node. Default is an identity matrix.
102  //! \param [in] inExternfile : if string lengths>0, open a new file from this child, allowing multiple Jt files (shattered, perpart, percomponent, or customized)
103  //! \return dtkNoError if ok.
104  Dtk_ErrorStatus OpenInstance(const Dtk_string& inName, Dtk_Int64 inIdpart, const Dtk_transfo& inTrans = Dtk_transfo(), const Dtk_string& inExternfile = Dtk_string());
105  //! \brief Set a Color to previously opened instance
106  //! \remark Tree Contole method
107  //! \param [in] inRgb : Color to apply to instance.
108  //! \param [in] inColorstrategy : see colorstrategy enum, with keepsubcolor color will affect only uncolored objects, overwritecolor will re-color all objects
109  //! \return dtkNoError if ok.
111  //! \brief Set a Lightmap to previously opened instance. A lightmap is more complete that Dtk_RGB, this fonction override same fonction with Dtk_RGB
112  //! \remark Tree Contole method
113  //! \param [in] inLightmap : Color to apply to instance.
114  //! \param [in] inColorstrategy : see colorstrategy enum, with keepsubcolor color will affect only uncolored objects, overwritecolor will re-color all objects
115  //! \return dtkNoError if ok.
117  //! \brief Set previously opened instance as invisible
118  //! \remark Tree Contole method
119  //! \return dtkNoError if ok.
121  //! \brief Set an instance ID to previously opened instance
122  //! \remark Tree Contole method
123  //! \param [in] inInstanceID : Giving an ID to this instance if a connector needs to target a specific instance
124  //! \return dtkNoError if ok.
126  //! \brief Close the last opened node.
127  //! \remark Tree Contole method
128  //! \return dtkNoError if ok.
130  //! \brief Ask the writer if a part already exist.
131  //! \remark Tree Contole method
132  //! \param [in] inIdpart : ID of a part.
133  //! \return dtkNoError if ok.
134  Dtk_bool ExistIdPart(Dtk_Int64 inIdpart) const;
135 
136 // Geometry
137 
138  //! \brief Add a body into the current node.
139  //! \remark Tesselate it to store into JT File, and add the body as brep depending inBrep parameter in constructor
140  //! \remark You may give a body ID (for ConnectPMI_Geom) using inBody->info()->SetId(id)
141  //! \param [in] inBody : Body to Write.
142  //! \param [in] inLodDatas : couples of linear_tolerance/angular_tolerances (radian) for each LOD : so nblod = InLodDatas.size()/2. -1 value mean disabled. Empty tab = 1 LOD with (-1,-1)
143  //! \param [in] inLossytol : Set lossycompression tolerance for mesh : ie move vertices with maximum tolerance value for better compression. Keep 0 for lossless comrpession
144  //! \return dtkNoError if ok.
145  Dtk_ErrorStatus AddBody(const Dtk_BodyPtr& inToWrite, const Dtk_tab<Dtk_Float32>& makelods = Dtk_tab<Dtk_Float32>(), Dtk_Float32 inLossytol = 0);
146  //! \brief Add a mesh into the current node.
147  //! \param [in] inMesh : Mesh to Write.
148  //! \param [in] inLossytol : Set lossycompression tolerance for mesh : ie move vertices with maximum tolerance value for better compression. Keep 0 for lossless comrpession
149  //! \return dtkNoError if ok.
150  Dtk_ErrorStatus AddMesh(const Dtk_MeshPtr& inToWrite, Dtk_Float32 inLossytol = 0);
151  //! \brief Add a Metdata into the current node.
152  //! \param [in] inToWrite : MetDatas to Write.
153  //! \return dtkNoError if ok.
155  //! \brief Add a Layer informations.
156  //! \return dtkNoError if ok.
157  //! \param [in] inToWrite : Dtk_LayerInfosSetPtr to Write.
159 
160 // PMI
161  //! \brief Add a fdt into the current node.
162  //! \param [in] inPMI : PMI to Write.
163  //! \param [in] inIdpmi : You may give an ID for FDT, to connect on. -1 for automatic ID.
164  //! \return dtkNoError if ok.
165  Dtk_ErrorStatus AddPMI(const Dtk_FdtPtr& inPMI, Dtk_Int64 inIdpmi = -1);
166  //! \brief Add a modelView into the current node.
167  //! \param [in] inModelview : modelView to Write.
168  //! \param [in] inIdmodelview : You may give an ID for modelview, to connect on. -1 for automatic ID.
169  //! \return dtkNoError if ok.
170  Dtk_ErrorStatus AddModelView(const Dtk_ModelDisplayPtr& inModelview, Dtk_Int64 inIdmodelview = -1);
171  //! \brief Add an axis system into the current node.
172  //! \param [in] inAxisSystem : axis system to Write.
173  //! \param [in] inIdaxis : You may give an ID for axis system, to connect on. -1 for automatic ID.
174  //! \return dtkNoError if ok.
175  Dtk_ErrorStatus AddAxisSystem(const Dtk_AxisSystemPtr& inAxisSystem, Dtk_Int64 inIdaxis = -1);
176  //! \brief Add a reference geometry into the current node.
177  //! \remark Stored is a body as one face with plane for reference plane, wire segment for reference axis, wire point for reference point
178  //! \param [in] inRefgeom : reference geometry to Write.
179  //! \param [in] inIdrefgeom : You may give an ID for reference geometry, to connect on. -1 for automatic ID.
180  //! \return dtkNoError if ok.
181  Dtk_ErrorStatus AddReferenceGeometry(const Dtk_BodyPtr& inRefgeom, Dtk_Int64 inIdrefgeom = -1);
182 
183 // connectors
184 
185  //! \brief Connect a PMI on a ModelView
186  //! \param [in] inIdpmi : PMI to connect. (ID given with AddPMI)
187  //! \param [in] inIdModelView : ModelView to Connect. (ID given with AddModelView)
188  //! \param [in] inRoute : if PMI is not in the same assembly node, indicate the route to reach it.
189  //! \remark : route should contain at least the final target node, the ID given as inIdpart in OpenInstance.
190  //! \remark : for a full route, start with current assembly node ID, it can also contain some inInstanceID, but it should finish with a inIdpart
191  //! \remark : if route is empty, API try to find automaticly.
192  //! \return dtkNoError if ok.
194  //! \brief Connect a PMI on a body face/edge/vertex
195  //! \param [in] inIdfdt : PMI to connect on (ID given with AddPMI)
196  //! \param [in] inGeomid : Geometry to link : DtkFacePtr::info()->GetId() / DtkEdgePtr::info()->GetId() / DtkVertexPtr::info()->GetId()
197  //! \param [in] inTypegeom : Type of connection : DTK_TYPE_FACE or DTK_TYPE_EDGE or DTK_TYPE_VERTEX
198  //! \param [in] inRoute : Route to body (see remarks of ConnectPMI_ModelView)
199  //! \param [in] inBodyID : For a case of multiple bodies added into same node, give the inBody->info()->GetId() filled with function AddBody
200  //! \return dtkNoError if ok.
201  Dtk_ErrorStatus ConnectPMI_Geom(Dtk_Int64 inIdfdt, Dtk_Int64 inGeomid, type_detk inTypegeom, const Dtk_tab<Dtk_Int64>& inRoute = Dtk_tab<Dtk_Int64>(), Dtk_ID inBodyID = 0);
202  //! \brief Connect a PMI on another PMI
203  //! \param [in] inIdpmifrom : PMI to link from (ID given with AddPMI)
204  //! \param [in] inIdpmito : PMI to link to (ID given with AddPMI)
205  //! \param [in] inRoute : Route to inIDfdt2 (see remarks of ConnectPMI_ModelView)
206  //! \return dtkNoError if ok.
208  //! \brief Connect a ModelView on an Instance, for part representation restriction in a modelview
209  //! \param [in] inIdModelView : ModelView to Connect (ID given by AddModelView)
210  //! \param [in] inRoute : Route to instance (see remarks of ConnectPMI_ModelView) but this time, final ID should be inInstanceID given with LastInstance_SetInstanceID
211  //! \param [in] inHide : If instance is hidden (default add instance as visible)
212  //! \param [in] inBodyID : Restrict a target for a body into an instance.
213  //! \param [in] inExplode : For exploded view, set the instance on a new place for this view.
214  //! \return dtkNoError if ok.
215  Dtk_ErrorStatus ConnectModelView_Instance(Dtk_Int64 inIdmodelview, const Dtk_tab<Dtk_Int64>& inRoute, int inHide = 0, Dtk_ID inBodyID = 0, const Dtk_transfo* const inExplode_absolute = NULL);
216  //! \brief Set an override color for a specific instance
217  //! \param [in] inRgb : Color to apply to instance.
218  //! \param [in] inRoute : Route to instance (see remarks of ConnectPMI_ModelView) but this time, final ID should be inInstanceID given with LastInstance_SetInstanceID
219  //! \param [in] inBodyID : Restrict a target for a body into an instance.
220  //! \remark functionnality supported only from version 10.0
221  //! \return dtkNoError if ok.
222  Dtk_ErrorStatus AddOverrideColor(const Dtk_RGB& inRgb, const Dtk_tab<Dtk_Int64>& inRoute, Dtk_ID inBodyID = 0);
223  //! \brief Set a Lightmap for a specific instance
224  //! \param [in] inLightmap : Color to apply to instance.
225  //! \param [in] inRoute : Route to instance (see remarks of ConnectPMI_ModelView) but this time, final ID should be inInstanceID given with LastInstance_SetInstanceID
226  //! \param [in] inBodyID : Restrict a target for a body into an instance.
227  //! \remark functionnality supported only from version 10.0
228  //! \return dtkNoError if ok.
229  Dtk_ErrorStatus AddOverrideColor(const Dtk_LightMapPtr& inLightmap, const Dtk_tab<Dtk_Int64>& inRoute, Dtk_ID inBodyID = 0);
230 };
231 
232 
233 
234 
235 
236 
237 
238 
239 // deprecated
240 
241 #define JTW_BREP_NONE 0
242 #define JTW_BREP_XT 1
243 #define JTW_COLOR_DEFAULT 0
244 #define JTW_COLOR_OVERWRITE 1
245 #define JTW_VERSION_8_0 80
246 #define JTW_VERSION_9_5 95
247 #define JTW_UNIT_MILLIMETERS 0
248 #define JTW_UNIT_CENTIMETERS 1
249 #define JTW_UNIT_METERS 2
250 #define JTW_UNIT_INCHES 3
251 #define JTW_UNIT_FEET 4
252 #define JTW_UNIT_YARDS 5
253 #define JTW_UNIT_MICROMETERS 6
254 #define JTW_UNIT_DECIMETERS 7
255 #define JTW_UNIT_KILOMETERS 8
256 #define JTW_UNIT_MILS 9
257 #define JTW_UNIT_MILES 10
258 Dtk_ErrorStatus jtw_InitWrite(Dtk_string inFileWritten, Dtk_string inLogFile, Licence_dtk inLicFct = NULL,
259  int inExptype = 0, int inBreptype = JTW_BREP_XT,
260  int inVersion = JTW_VERSION_9_5, int inUnit = JTW_UNIT_MILLIMETERS);
261 Dtk_ErrorStatus jtw_InitChild(const Dtk_string& inName, Dtk_Int64 inIdpart, Dtk_bool& outWasAlreadyInstancied,
262  const Dtk_transfo& inTrans = Dtk_transfo(), const Dtk_RGB& inRgb = Dtk_RGB(),
263  const Dtk_string& inNewsubfile = Dtk_string(),
264  int inColorstrategy = JTW_COLOR_DEFAULT, int inVisibility = 1, Dtk_Int64 inInstanceID = -1);
266 Dtk_ErrorStatus jtw_AddMesh(const Dtk_MeshPtr& inMesh, Dtk_Float32 inLossytol = 0);
267 Dtk_ErrorStatus jtw_AddBody(const Dtk_BodyPtr& inBody, Dtk_Float32 inLossytol = 0);
268 Dtk_ErrorStatus jtw_AddBodyMultiLOD(const Dtk_BodyPtr& inBody, const Dtk_tab<Dtk_Float32>& inLodDatas, Dtk_Float32 inLossytol = 0);
269 Dtk_ErrorStatus jtw_AddFdt(const Dtk_FdtPtr& inFdt, Dtk_Int64 inIdfdt = -1);
277 Dtk_ErrorStatus jtw_ConnectFdt_Geom(Dtk_Int64 inIdfdt, Dtk_Int64 inGeomid, type_detk inTypegeom, const Dtk_tab<Dtk_Int64>& inRoute = Dtk_tab<Dtk_Int64>(), Dtk_ID inBodyID = 0);
279  const Dtk_tab<Dtk_Int64>& inRoute = Dtk_tab<Dtk_Int64>(), int inHide = 0, Dtk_ID inBodyID = 0,
280  const Dtk_transfo& inExplode = Dtk_transfo());
282 
283 #endif
284 
Dtk_Jtw_Interface::version104
@ version104
Definition: jtw.h:46
Dtk_Jtw_Interface::breptype
breptype
Definition: jtw.h:24
Dtk_Jtw_Interface::version102
@ version102
Definition: jtw.h:44
jtw_AddBody
Dtk_ErrorStatus jtw_AddBody(const Dtk_BodyPtr &inBody, Dtk_Float32 inLossytol=0)
Dtk_ID
uint32_t Dtk_ID
Definition: define.h:681
Dtk_transfo
This is the Transformation dedicated class.
Definition: dtk_transfo.hpp:19
jtw_ConnectFdt_ModelView
Dtk_ErrorStatus jtw_ConnectFdt_ModelView(Dtk_Int64 inIdfdt, Dtk_Int64 inIdModelView, const Dtk_tab< Dtk_Int64 > &inRoute=Dtk_tab< Dtk_Int64 >())
Dtk_Jtw_Interface::OpenInstance
Dtk_ErrorStatus OpenInstance(const Dtk_string &inName, const Dtk_transfo &inTrans=Dtk_transfo(), const Dtk_string &inExternfile=Dtk_string())
Open a new Instance for the assembly writing.
jtw_ConnectModelView_Instance
Dtk_ErrorStatus jtw_ConnectModelView_Instance(Dtk_Int64 inIdModelView, const Dtk_tab< Dtk_Int64 > &inRoute=Dtk_tab< Dtk_Int64 >(), int inHide=0, Dtk_ID inBodyID=0, const Dtk_transfo &inExplode=Dtk_transfo())
jtw_AddFdt
Dtk_ErrorStatus jtw_AddFdt(const Dtk_FdtPtr &inFdt, Dtk_Int64 inIdfdt=-1)
Dtk_Float32
float Dtk_Float32
Definition: define.h:692
Dtk_Jtw_Interface::version94
@ version94
Definition: jtw.h:40
Dtk_Jtw_Interface::version105
@ version105
Definition: jtw.h:47
Dtk_Jtw_Interface::version100
@ version100
Definition: jtw.h:42
jtw_ConnectFdt_Fdt
Dtk_ErrorStatus jtw_ConnectFdt_Fdt(Dtk_Int64 inIdfdt, Dtk_Int64 inIdfdt2, const Dtk_tab< Dtk_Int64 > &inRoute=Dtk_tab< Dtk_Int64 >())
Dtk_Jtw_Interface::LastInstance_SetInstanceColor
Dtk_ErrorStatus LastInstance_SetInstanceColor(const Dtk_RGB &inRgb, colorstrategy inColorstrategy=keepsubcolor)
Set a Color to previously opened instance.
Dtk_Jtw_Interface::writeversion
writeversion
Definition: jtw.h:34
jtw_InitChild
Dtk_ErrorStatus jtw_InitChild(const Dtk_string &inName, Dtk_Int64 inIdpart, Dtk_bool &outWasAlreadyInstancied, const Dtk_transfo &inTrans=Dtk_transfo(), const Dtk_RGB &inRgb=Dtk_RGB(), const Dtk_string &inNewsubfile=Dtk_string(), int inColorstrategy=0, int inVisibility=1, Dtk_Int64 inInstanceID=-1)
Dtk_Jtw_Interface::feet
@ feet
Definition: jtw.h:60
jtw_AddLayerInfosSet
Dtk_ErrorStatus jtw_AddLayerInfosSet(const Dtk_LayerInfosSetPtr &inToWrite)
jtw_EndWrite
Dtk_ErrorStatus jtw_EndWrite()
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:53
Dtk_Jtw_Interface::colorstrategy
colorstrategy
Definition: jtw.h:29
Dtk_Jtw_Interface::keepsubcolor
@ keepsubcolor
Definition: jtw.h:30
Dtk_Jtw_Interface::meters
@ meters
Definition: jtw.h:58
Dtk_Jtw_Interface::kilometers
@ kilometers
Definition: jtw.h:64
dtk_metadata.hpp
Dtk_Jtw_Interface::ConnectPMI_Geom
Dtk_ErrorStatus ConnectPMI_Geom(Dtk_Int64 inIdfdt, Dtk_Int64 inGeomid, type_detk inTypegeom, const Dtk_tab< Dtk_Int64 > &inRoute=Dtk_tab< Dtk_Int64 >(), Dtk_ID inBodyID=0)
Connect a PMI on a body face/edge/vertex.
Dtk_Jtw_Interface::CloseLastInstance
Dtk_ErrorStatus CloseLastInstance()
Close the last opened node.
Dtk_Jtw_Interface::version1010
@ version1010
Definition: jtw.h:52
JTW_VERSION_9_5
#define JTW_VERSION_9_5
Definition: jtw.h:246
Dtk_bool
char Dtk_bool
Definition: define.h:717
Dtk_Jtw_Interface::version109
@ version109
Definition: jtw.h:51
Dtk_Jtw_Interface::version90
@ version90
Definition: jtw.h:36
jtw_ConnectFdt_Geom
Dtk_ErrorStatus jtw_ConnectFdt_Geom(Dtk_Int64 inIdfdt, Dtk_Int64 inGeomid, type_detk inTypegeom, const Dtk_tab< Dtk_Int64 > &inRoute=Dtk_tab< Dtk_Int64 >(), Dtk_ID inBodyID=0)
JTW_COLOR_DEFAULT
#define JTW_COLOR_DEFAULT
Definition: jtw.h:243
Dtk_Jtw_Interface::xtbrep
@ xtbrep
Definition: jtw.h:26
util_draw_ptr_dtk.hpp
Dtk_Jtw_Interface::unit
unit
Definition: jtw.h:55
jtw_CloseChild
Dtk_ErrorStatus jtw_CloseChild()
Dtk_Jtw_Interface::ExistIdPart
Dtk_bool ExistIdPart(Dtk_Int64 inIdpart) const
Ask the writer if a part already exist.
Dtk_Jtw_Interface::centimeters
@ centimeters
Definition: jtw.h:57
Dtk_Jtw_Interface::version95
@ version95
Definition: jtw.h:41
util_topology_ptr_dtk.hpp
Dtk_Jtw_Interface::AddMetaData
Dtk_ErrorStatus AddMetaData(const Dtk_MetaDataPtr &inToWrite)
Add a Metdata into the current node.
Dtk_Int64
int64_t Dtk_Int64
Definition: define.h:684
Dtk_Jtw_Interface::~Dtk_Jtw_Interface
~Dtk_Jtw_Interface()
Destructor, finalise the process.
util_ent_dtk.hpp
Dtk_Jtw_Interface::nobrep
@ nobrep
Definition: jtw.h:25
Dtk_Jtw_Interface::AddOverrideColor
Dtk_ErrorStatus AddOverrideColor(const Dtk_RGB &inRgb, const Dtk_tab< Dtk_Int64 > &inRoute, Dtk_ID inBodyID=0)
Set an override color for a specific instance.
jtw_AddBodyMultiLOD
Dtk_ErrorStatus jtw_AddBodyMultiLOD(const Dtk_BodyPtr &inBody, const Dtk_tab< Dtk_Float32 > &inLodDatas, Dtk_Float32 inLossytol=0)
Dtk_Jtw_Interface::version106
@ version106
Definition: jtw.h:48
jtw_AddAxisSystem
Dtk_ErrorStatus jtw_AddAxisSystem(const Dtk_AxisSystemPtr &inToWrite, Dtk_Int64 idaxis=-1)
error_dtk.hpp
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
Dtk_Jtw_Interface::version107
@ version107
Definition: jtw.h:49
Dtk_Jtw_Interface::AddPMI
Dtk_ErrorStatus AddPMI(const Dtk_FdtPtr &inPMI, Dtk_Int64 inIdpmi=-1)
Add a fdt into the current node.
Dtk_Jtw_Interface::AddAxisSystem
Dtk_ErrorStatus AddAxisSystem(const Dtk_AxisSystemPtr &inAxisSystem, Dtk_Int64 inIdaxis=-1)
Add an axis system into the current node.
Dtk_Jtw_Interface::decimeters
@ decimeters
Definition: jtw.h:63
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
dtk_maindoc.hpp
Dtk_Jtw_Interface::inches
@ inches
Definition: jtw.h:59
Dtk_Jtw_Interface::version91
@ version91
Definition: jtw.h:37
JTW_UNIT_MILLIMETERS
#define JTW_UNIT_MILLIMETERS
Definition: jtw.h:247
Dtk_Jtw_Interface::version80
@ version80
Definition: jtw.h:35
jtw_AddMesh
Dtk_ErrorStatus jtw_AddMesh(const Dtk_MeshPtr &inMesh, Dtk_Float32 inLossytol=0)
dtk_transfo.hpp
Dtk_Jtw_Interface::version92
@ version92
Definition: jtw.h:38
type_detk
type_detk
Definition: define.h:21
str_def.h
Dtk_Jtw_Interface::yards
@ yards
Definition: jtw.h:61
Dtk_Jtw_Interface::LastInstance_SetInvisible
Dtk_ErrorStatus LastInstance_SetInvisible()
Set previously opened instance as invisible.
Dtk_Jtw_Interface::AddModelView
Dtk_ErrorStatus AddModelView(const Dtk_ModelDisplayPtr &inModelview, Dtk_Int64 inIdmodelview=-1)
Add a modelView into the current node.
jtw_AddReferenceGeometry
Dtk_ErrorStatus jtw_AddReferenceGeometry(const Dtk_BodyPtr &inToWrite, Dtk_Int64 idref=-1)
util_stl_dtk.hpp
Dtk_Jtw_Interface::micrometers
@ micrometers
Definition: jtw.h:62
Dtk_Jtw_Interface::version93
@ version93
Definition: jtw.h:39
define.h
Dtk_Jtw_Interface::version108
@ version108
Definition: jtw.h:50
JTW_BREP_XT
#define JTW_BREP_XT
Definition: jtw.h:242
Dtk_tab
This is a high level array class.
Definition: util_stl_dtk.hpp:84
jtw_AddMetaData
Dtk_ErrorStatus jtw_AddMetaData(const Dtk_MetaDataPtr &inToWrite)
Dtk_Jtw_Interface::millimeters
@ millimeters
Definition: jtw.h:56
Dtk_Jtw_Interface::miles
@ miles
Definition: jtw.h:66
Dtk_Jtw_Interface::version101
@ version101
Definition: jtw.h:43
Dtk_Jtw_Interface::LastInstance_SetInstanceID
Dtk_ErrorStatus LastInstance_SetInstanceID(Dtk_Int64 inInstanceID)
Set an instance ID to previously opened instance.
dtk_string.hpp
Dtk_Jtw_Interface::Dtk_Jtw_Interface
Dtk_Jtw_Interface(const Dtk_string &inFileWritten, Dtk_ErrorStatus &outErr, breptype inBrep=nobrep, writeversion inVersion=version95, unit inUnit=millimeters)
Constructor, initialize the Jt Writer
Dtk_Jtw_Interface
This is Jt Interface class used to write Jt files.
Definition: jtw.h:21
Dtk_Jtw_Interface::AddMesh
Dtk_ErrorStatus AddMesh(const Dtk_MeshPtr &inToWrite, Dtk_Float32 inLossytol=0)
Add a mesh into the current node.
dtk_render.hpp
jtw_InitWrite
Dtk_ErrorStatus jtw_InitWrite(Dtk_string inFileWritten, Dtk_string inLogFile, Licence_dtk inLicFct=NULL, int inExptype=0, int inBreptype=1, int inVersion=95, int inUnit=0)
dtk_rgb.hpp
Dtk_Jtw_Interface::OpenInstance
Dtk_ErrorStatus OpenInstance(const Dtk_string &inName, Dtk_Int64 inIdpart, const Dtk_transfo &inTrans=Dtk_transfo(), const Dtk_string &inExternfile=Dtk_string())
Open a new Instance for the assembly writing.
Dtk_RGB
Definition: dtk_rgb.hpp:7
Dtk_Jtw_Interface::ConnectPMI_ModelView
Dtk_ErrorStatus ConnectPMI_ModelView(Dtk_Int64 inIdpmi, Dtk_Int64 inIdModelView, const Dtk_tab< Dtk_Int64 > &inRoute=Dtk_tab< Dtk_Int64 >())
Connect a PMI on a ModelView.
Dtk_Jtw_Interface::ConnectPMI_PMI
Dtk_ErrorStatus ConnectPMI_PMI(Dtk_Int64 inIdpmifrom, Dtk_Int64 inIdpmito, const Dtk_tab< Dtk_Int64 > &inRoute=Dtk_tab< Dtk_Int64 >())
Connect a PMI on another PMI.
Dtk_Jtw_Interface::AddLayerInfosSet
Dtk_ErrorStatus AddLayerInfosSet(const Dtk_LayerInfosSetPtr &inToWrite)
Add a Layer informations.
Dtk_Jtw_Interface::AddReferenceGeometry
Dtk_ErrorStatus AddReferenceGeometry(const Dtk_BodyPtr &inRefgeom, Dtk_Int64 inIdrefgeom=-1)
Add a reference geometry into the current node.
Licence_dtk
char *(* Licence_dtk)(char *)
Definition: str_def.h:71
jtw_AddModelView
Dtk_ErrorStatus jtw_AddModelView(const Dtk_ModelDisplayPtr &inMdl, Dtk_Int64 inIdModelView=-1)
Dtk_Jtw_Interface::ConnectModelView_Instance
Dtk_ErrorStatus ConnectModelView_Instance(Dtk_Int64 inIdmodelview, const Dtk_tab< Dtk_Int64 > &inRoute, int inHide=0, Dtk_ID inBodyID=0, const Dtk_transfo *const inExplode_absolute=NULL)
Connect a ModelView on an Instance, for part representation restriction in a modelview.
Dtk_Jtw_Interface::overwritecolor
@ overwritecolor
Definition: jtw.h:31
Dtk_Jtw_Interface::AddBody
Dtk_ErrorStatus AddBody(const Dtk_BodyPtr &inToWrite, const Dtk_tab< Dtk_Float32 > &makelods=Dtk_tab< Dtk_Float32 >(), Dtk_Float32 inLossytol=0)
Add a body into the current node.
Dtk_Jtw_Interface::mils
@ mils
Definition: jtw.h:65
Dtk_Jtw_Interface::AddOverrideColor
Dtk_ErrorStatus AddOverrideColor(const Dtk_LightMapPtr &inLightmap, const Dtk_tab< Dtk_Int64 > &inRoute, Dtk_ID inBodyID=0)
Set a Lightmap for a specific instance.
Dtk_Jtw_Interface::LastInstance_SetInstanceColor
Dtk_ErrorStatus LastInstance_SetInstanceColor(const Dtk_LightMapPtr &inLightmap, colorstrategy inColorstrategy=keepsubcolor)
Set a Lightmap to previously opened instance. A lightmap is more complete that Dtk_RGB,...
Dtk_Jtw_Interface::version103
@ version103
Definition: jtw.h:45