DATAKIT SDK  V2026.3
dtk_maindoc.hpp
Go to the documentation of this file.
1 #ifndef __UTIL_DTK_DOCUMENT_HPP__
2 #define __UTIL_DTK_DOCUMENT_HPP__
3 
4 #include "def/define.h"
11 #include "util/dtk_maindoc_ptr.hpp"
13 #include "util/error_dtk.hpp"
15 #include "util/util_ent_dtk.hpp"
16 #include "util/util_ptr_dtk.hpp"
17 #include "util/util_stl_dtk.hpp"
19 
20 class Dtk_mesh;
22 class Dtk_feat;
24 class Dtk_Kinematic;
26 
27 
29 {
30  V5ReaderModule = 0, // CatiaV5
31  VdaReaderModule = 1, // VdaFS
32  InvReaderModule = 2, // Inventor
33  V4ReaderModule = 3, // CatiaV4
34  UgReaderModule = 4, // Unigraphics NX
35  XmtReaderModule = 5, // Parasolid using parasolid kernel
36  SwReaderModule = 6, // Solidworks
37  SeReaderModule = 7, // Solidedge
38  IgesReaderModule = 8, // Iges
39  StepReaderModule = 9, // Step
40  PsReaderModule = 10, // Parasolid via datakit
41  ProeReaderModule = 11, // Pro/Engineer - Creo Parametric
42  SatReaderModule = 12, // Internal Use Only
43  JtReaderModule = 13, // Jt
44  CgrReaderModule = 14, // Cgr
45  CaddsReaderModule = 15, // Cadds
46  AcisReaderModule = 16, // Acis
47  ProCeraReaderModule = 17,// ProCera dental format
48  CerconReaderModule = 18, // Cercon dental format
49  CerecReaderModule = 19, // Cerec Sirona dental format
50  DcmReaderModule = 20, // Dcm 3Shape dental format
51  _3dXmlReaderModule = 21, // Internal Use Only
52  XmlReaderModule = 22, // Internal Use Only
53  V6ReaderModule = 23, // 3DEXPERIENCE CatiaV6
54  DxfReaderModule = 24, // Dxf
55  PlmXmlReaderModule = 25, // PlmXml
56  Lava3mReaderModule = 26, // Lava 3M dental format
57  U3dReaderModule = 27, // Internal Use Only
58  PdfReaderModule = 28, // Internal Use Only
59  RnXmlReaderModule = 29, // Internal Use Only
60  _3dmReaderModule = 30, // Rhino
61  DwgReaderModule = 31, // Dwg
62  ObjReaderModule = 32, // Obj
63  IfcReaderModule = 33, // Ifc
64  BRepOccReaderModule = 34,// Brep Open Cascade
65  RevitReaderModule = 35, // Revit
66  CreoviewReaderModule = 36,// Creo View
67  StlReaderModule = 37, // Stl
68  FbxReaderModule = 38, // Fbx
69  CgmReaderModule = 39, // Computer Graphics Metafile
70  SdnfReaderModule = 40, // Computer Graphics Metafile
71  ArtReaderModule = 41, // Art
72  SmgReaderModule = 42, // Smg
73  PrcReaderModule = 43, // Prc
74  F3dReaderModule = 44, // F3d
75  DstvReaderModule = 45, // DSTV
76  GltfReaderModule = 46, // Gltf
77  NavisReaderModule = 47, // Navis
78  QifReaderModule = 48, // QIF
79  DwgDtkReaderModule = 49, // Dwg via datakit
80  Zw3dReaderModule = 50, // Zw3d
81  UsdReaderModule = 51, // USD
82 
85 };
86 
89 
90 
91 class Dtk_MainDoc;
92 
93 
94 /////////////////////////////////////////////////////////////////////////////
95 //! \ingroup DtkAPIGroup
96 //! \class Dtk_DocElement
97 //! \brief This is the Main Doc Element Class
98 //! The Dtk_DocElement object is common parent class of the Dtk_Node and the Dtk_Component classes
99 //! It typically used as geometry into a Part.
100 //! \SmartPtr{Dtk_DocElementPtr}
102 {
103 protected:
104 
106  struct Dtk_Handle; // Not defined here
107  Dtk_Handle *_Private; // Handle
108 protected:
109  void _Init();
110  void _Reset();
111  void _Copy(const Dtk_Node&s);
112 
113  //! \internal
114  Dtk_DocElement(const Dtk_ID& inID, Dtk_string inName);
115 
116  //! \BaseDestructor
117  virtual ~Dtk_DocElement();
118 
119 
120  //! \brief Adds a child Dtk_DocElement to main Element.
121  //! \param inChild The Dtk_DocElement to be added as a child.
122  void _AddChild(const Dtk_DocElementPtr& inChild);
123 
124  //! \brief Retrieves the ith Dtk_DocElement - read only -
125  //! \param inPos Child element index.
126  //! \return the inPos'th Dtk_DocElement
127  const Dtk_DocElementPtr _GetChild(const Dtk_Size_t& inPos) const;
128 
129  //! \brief Replaces a child by another one. Also update father lists.
130  //! \param inPos Old Child element index.
131  //! \param inNewChild The Dtk_DocElement replacing the old one
132  //! \DtkInternal
133  //! \return the DtkNoerrror if success.
134  //! \return the dtkErrorOutOfRange if bad inPos parameter.
135  //! \return the dtkErrorNullPointer if inNewChild is NULL.
136  Dtk_ErrorStatus _ReplaceChild(const Dtk_Size_t& inPos, const Dtk_DocElementPtr& inNewChild);
137 
138  friend class Dtk_SmartPtr<Dtk_DocElement>;
139  friend class Dtk_MainDoc;
140 
141 public:
142  //! \DtkDynamicType
143  Dtk_Int32 DtkDynamicType(const int& inId);
144 
145  //! \DtkDynamicCast
147 
148  //! \brief Retrieves the number of the Dtk_DocElement children - read only -
149  //! \return The Children number.
151 
152  //! \brief Retrieves the Dtk_DocElement Name - read only -
153  //! \return The Element Name.
154  const Dtk_string& Name() const;
156 
157  //! \brief Retrieves the Dtk_DocElement ID - read only -
158  //! \return The element ID.
159  Dtk_ID GetID() const;
160 
161  //! \brief Retrieves Dtk_DocElement ith FatherID - read only -
162  //! \return The ith FatherID.
164 
165  //! \brief GetNumFather
166  //! \return Number of fathers
168 
169  void GetReadID(Dtk_ID& outReadID) const;
170  void SetReadID(const Dtk_ID & inNewID);
171 
172 
173  //! \brief Retrieves the Dtk_DocElement Dtk_InfoPtr - read only -
174  //! \return The element Dtk_InfoPtr.
176  void SetInfos(const Dtk_InfoPtr& inInfos);
177 
178 
179  //! \brief Retrieves the Dtk_DocElement Dtk_MaterialPtr - read only -
180  //! \return The element Dtk_MaterialPtrif if exists
181  //!\deprecated use GetInfos()->GetRenderInfos and GetInfos()->GetPhysicalMaterialInfos methods instead
182  SetAsDeprecated( "2026.3", "use GetInfos()->GetRenderInfos and GetInfos()->GetPhysicalMaterialInfos methods instead." )
183  Dtk_MaterialPtr GetMaterial() const;
184  //!\deprecated use GetInfos()->AddRenderInfos and GetInfos()->AddMaterialInfos methods instead
185  SetAsDeprecated( "2026.3", "use GetInfos()->AddRenderInfos and GetInfos()->AddMaterialInfos methods instead." )
186  void SetMaterial(Dtk_MaterialPtr inMaterial);
187 
188 
189  //! \brief Retrieves the Dtk_DocElement Dtk_PreviewPtr - read only -
190  //! \return The element Dtk_PreviewPtr if exists.
192  void SetPreview(Dtk_PreviewPtr inPreview);
194 
195 
196  //! \brief Adds a Dtk_MetaDataPtr to the Dtk_DocElement.
197  //! \param inMetaData The Dtk_MetaDataPtr to be added.
198  void AddMetaData(const Dtk_MetaDataPtr& inMetaData);
199 
200  //! \brief Adds a Dtk_MetaDataGroupPtr to the Dtk_DocElement.
201  //! \param inMetaDataGroup The Dtk_MetaDataGroupPtr to be added.
202  //! \param inAddMetadata If we also add the metadata of the group to the Dtk_DocElement
203  void AddMetaDataGroup(const Dtk_MetaDataGroupPtr& inMetaDataGroup, Dtk_bool inAddMetadata = DTK_FALSE);
204 
205  //! \brief Adds a Dtk_PropertiesPtr to the Dtk_DocElement.
206  //! \param inProperty The Dtk_PropertiesPtr to be added.
207  void AddProperty(const Dtk_PropertiesPtr & inProperty);
208 
209  //! \brief Retrieves the ith Dtk_MetaDataPtr - read only -
210  //! \param inPos Metadata index.
211  //! \return the inPos'th Dtk_MetaDataPtr
213 
214  //! \brief Retrieves the ith Dtk_MetaDataGrouplPtr - read only -
215  //! \param inPos Group index.
216  //! \return the inPos'th Dtk_MetaDataGrouplPtr
218 
219  //! \brief Retrieves the number of the Dtk_MetaDataPtr - read only -
220  //! \return The Metadata number.
222 
223  //! \brief Retrieves the number of the Dtk_MetaDataGroupPtr - read only -
224  //! \return The Group number.
226 };
227 
228 /////////////////////////////////////////////////////////////////////////////
229 //! \ingroup DtkAPIGroup
230 //! \class Dtk_Node
231 //! \brief This is the Node Class
232 //! \brief The Dtk_Node is used to retrieve information from a Dtk_Component.
233 //! \details It is typically used as geometry into a Part.
234 //! \SmartPtr{Dtk_NodePtr}
235 class Dtk_Node : public Dtk_DocElement
236 {
237 public:
238 
240  {
241  UnknownType = 0,
242  HasPoints = 1,
243  HasCurves = 2,
244  HasSurfaces = 4,
245  HasSolids = 8,
246  HasAxis = 16,
247  HasMesh = 32,
248  HasMeshSurfaces = 64
249  };
250 
252  {
253  NullType = 0,
254  BodyType, // for 3D
255  MeshType, // for 3D Tesselated
256  AnnotationSetType, // for FdtAnnotationSet -- Obsolete
257  FdtType, // for Fdt
258  DrawingType, // for 2D
259  KinematicsType, // Kinematics
260  AxisSystemType, // AxisPlacement
261  LayerInfosSetType, // LayerInfosSet
262  ColorInfosSetType, // ColorInfosSet
263  MetaDataType, // MetaData
264  ModelDisplayType, // Model Display
265  CameraType, // Camera
266  VirtualType, // just for containing children
267  ConstraintType, // ConstraintType
268  MaxNodeDataType
269  };
270  //! \ingroup DtkAPIGroup
271  //! \class Dtk_Node::FullType
272  //! \brief This is the Node FullType Class
273  //! The Dtk_Node::FullType object is used to retrieve the full informations about Dtk_Node Type - Primary and SubType -
274  class FullType
275  {
276  public:
277  friend class Dtk_Node;
278  private:
279  //! \brief Primary Node Type
280  NodeDataTypeEnum _PrimaryType;
281  //! \brief SubType - if relevant -
282  type_detk _SubType;
283  public:
284  FullType( const NodeDataTypeEnum inPrimaryType, const type_detk inSubType ) : _PrimaryType(inPrimaryType), _SubType(inSubType) {}
286  FullType() : _PrimaryType(NullType), _SubType(DTK_TYPE_UNKNOWN) {}
287  inline NodeDataTypeEnum PrimaryType() const {return _PrimaryType;}
288  inline type_detk SubType() const {return _SubType;}
289  };
290 
291 
293  {
294  switch( inEnum )
295  {
296  case NullType: return L"NullType";
297  case BodyType: return L"BodyType";
298  case MeshType: return L"MeshType";
299  case AnnotationSetType: return L"AnnotationSetType";
300  case FdtType: return L"FdtType";
301  case DrawingType: return L"DrawingType";
302  case KinematicsType: return L"KinematicsType";
303  case AxisSystemType: return L"AxisSystemType";
304  case LayerInfosSetType: return L"LayerInfosSetType";
305  case ColorInfosSetType: return L"ColorInfosSetType";
306  case MetaDataType: return L"MetaDataType";
307  case VirtualType: return L"VirtualType";
308  case ModelDisplayType : return L"ModelDisplayType";
309  case CameraType : return L"CameraType";
310  case ConstraintType: return L"Constraint";
311  default: return L"Unknown";
312  }
313  }
314 
315  static inline Dtk_Int32 NodeDataStringToEnumType( const Dtk_string &type )
316  {
317  if( type == L"NullType" )
318  return NullType;
319  else if( type == L"BodyType" )
320  return BodyType;
321  else if( type == L"MeshType" )
322  return MeshType;
323  else if( type == L"AnnotationSetType" )
324  return AnnotationSetType;
325  else if( type == L"FdtType" )
326  return FdtType;
327  else if( type == L"DrawingType" )
328  return DrawingType;
329  else if( type == L"KinematicsType" )
330  return KinematicsType;
331  else if( type == L"AxisSystemType" )
332  return AxisSystemType;
333  else if (type == L"LayerInfosSetType")
334  return LayerInfosSetType;
335  else if (type == L"ColorInfosSetType")
336  return ColorInfosSetType;
337  else if( type == L"MetaDataType" )
338  return MetaDataType;
339  else if( type == L"VirtualType" )
340  return VirtualType;
341  else if (type == L"ModelDisplayType")
342  return ModelDisplayType;
343  else if (type == L"CameraType")
344  return CameraType;
345  else if (type == L"ConstraintType")
346  return ConstraintType;
347  else return -1;
348  }
349 
350 protected:
351 
352  enum { _typeID = DTK_TYPE_NODE };
353  struct Dtk_Handle; // Not defined here
354  Dtk_Handle *_Private; // Handle
355  friend class Dtk_Component;
356 private:
357  void _Init();
358  void _Reset();
359  void _Copy(const Dtk_Node&s);
360 
361  //! \sa Dtk_Component::CreateVirtualNode( const Dtk_string& )
362  //! \sa Dtk_Component::CreateMeshNode(const Dtk_string&, const Dtk_ID&);
363  //! \sa Dtk_Component::CreateBodyNode(const Dtk_string&, const Dtk_ID&);
364  //! \sa Dtk_Component::CreateKinematicsNode(const Dtk_string&, const Dtk_KinematicsPtr&);
365  //! \sa Dtk_Component::CreateDrawingNode(const Dtk_string&, const Dtk_DrawingPtr&);
366  Dtk_Node(const Dtk_NodeID& inID,
367  const Dtk_ComponentID inOwningComponentId,
368  Dtk_string inName, const NodeDataTypeEnum& inDataNodeType, const Dtk_ID inEntityID, const Dtk_Int32 inBodyFlag = UnknownType, const type_detk inSubType = DTK_TYPE_NO_SUBTYPE);
369 
370  //! \BaseDestructor
372 
373  friend class Dtk_SmartPtr<Dtk_Node>;
374 
375 public:
376  //! \DtkDynamicType
377  Dtk_Int32 DtkDynamicType(const int& inId);
378 
379  //! \DtkDynamicCast
381 
382  //! \brief Adds a child Dtk_Node to main Node.
383  //! \param inChild The Dtk_Node to be added as a child.
384  inline void AddChild(const Dtk_NodePtr& inChild)
386 
387  //! \brief Retrieves the ith Dtk_Node - read only -
388  //! \param inPos Child node index.
389  //! \return the inPos'th Dtk_Node
390  inline const Dtk_NodePtr GetChild(const Dtk_Size_t& inPos) const
391  { return Dtk_NodePtr::DtkDynamicCast( _GetChild(inPos) ); }
392 
393  //! \brief Replaces a child Dtk_NodePtr by another one. Also updates father lists.
394  //! \param inPos Old Child Dtk_NodePtr element index.
395  //! \param inNewChild The Dtk_NodePtr replacing the old one
396  //! \DtkInternal
397  //! \return the DtkNoerrror if success.
398  //! \return the dtkErrorOutOfRange if bad inPos parameter.
399  //! \return the dtkErrorNullPointer if inNewChild is NULL.
400  inline Dtk_ErrorStatus ReplaceChildNode(const Dtk_Size_t& inPos, const Dtk_NodePtr& inNewChild)
401  { return _ReplaceChild( inPos, Dtk_DocElementPtr::DtkDynamicCast(inNewChild) ); }
402 
403  //! \brief Retrieves the Dtk_Node Node Type - read only -
404  //! \return The Node Type.
405  //! \deprecated
406  //! \sa Dtk_Node::GetNodeFullType()
407  //SetAsDeprecated("Undefined", "Use GetNodeFullType")
409 
410  //! \brief Retrieves the Node SubType - if relevant - - read only -
411  //! \return The Node SubType.
412  //! \deprecated
413  //! \sa Dtk_Node::GetNodeFullType()
414  //SetAsDeprecated("Undefined", "Use GetNodeFullType")
416 
417  //! \brief Retrieves the Node FullType - Primary ans Sub Type - - read only -
418  //! \return The Node FullType.
420 
421  //! \brief Return DTK_TRUE if Dtk_Node Type Body or Mesh contains points entity
423  //! \brief Return DTK_TRUE if Dtk_Node Type Body or Mesh contains curves entity
425  //! \brief Return DTK_TRUE if Dtk_Node Type Body contains solid entity
427  //! \brief Return DTK_TRUE if Dtk_Node Type Body contains surfacic entity
429  //! \brief Return DTK_TRUE if Dtk_Node Type Body contains mesh surface entity
431  //! \brief Return DTK_TRUE if Dtk_Node Type Body contains axis entity
433  //! \brief Return DTK_TRUE if Dtk_Node Type Body or Mesh contains mesh entity
435 
436 
437  //! \brief Retrieves the Dtk_Node as a Dtk_BodyPtr - if exists -
438  //! \return The Dtk_Node as a Dtk_BodyPtr if exists. Null Dtk_BodyPtr else.
439  //! \remark This method is used to retrieve the body
440  //! informations - if GetNodeType() method returns BodyType -.
442 
443  //! \brief Retrieves the Dtk_Node as a Dtk_meshPtr - if exists -
444  //! \return The Dtk_Node as a Dtk_meshPtr if exists. Null Dtk_meshPtr else.
445  //! \remark This method is used to retrieve the mesh
446  //! informations - if GetNodeType() method returns MeshType -.
448 
449  //! \brief Retrieves the Dtk_Node as a Dtk_FeaturePtr - if exists -
450  //! \return The Dtk_Node as a Dtk_FeaturePtr if exists. Null Dtk_FeaturePtr else.
451  //! \remark This method is used to retrieve the feature
452  //! informations - if GetNodeType() method returns Virtual Type or Body Type-.
454  //! \brief Retrieves the Dtk_Node as a Dtk_AdvancedFeaturePtr - if exists - Internal Use !!!
455  //! \return The Dtk_Node as a Dtk_FeaturePtr if exists. Null Dtk_FeaturePtr else.
456  //! \remark
458 
459 
460  //! \brief Retrieves the Dtk_Node as a Dtk_FdtPtr - if exists -
461  //! \return The Dtk_Node as a Dtk_FdtPtr if exists. Null Dtk_FdtPtr else.
462  //! \remark This method is used to retrieve the FDT
463  //! informations - if GetNodeType() method returns FdtType -.
465 
466 
467  //! \brief Retrieves the Dtk_Node as a Dtk_KinematicPtr - if exists -
468  //! \return The Dtk_Node as a Dtk_KinematicsPtr if exists. Null Dtk_KinematicPtr else.
469  //! \remark This method is used to retrieve the Kinematics
470  //! informations - if GetNodeType() method returns KinematicsType -.
472 
473  //! \brief Retrieves the Dtk_Node as a Dtk_MetaDataPtr - if exists -
474  //! \return The Dtk_Node as a MetaDataPtr if exists. Null MetaDataPtr else.
475  //! \remark This method is used to retrieve the MetaData
476  //! informations - if GetNodeType() method returns MetaDataType -.
478 
479  //! \brief Retrieves the Dtk_Node as a Dtk_DrawingPtr - if exists -
480  //! \return The Dtk_Node as a Dtk_DrawingPtr if exists. Null Dtk_DrawingPtr else.
481  //! \remark This method is used to retrieve the drawing
482  //! informations - if GetNodeType() method returns DrawingType -.
484 
485  //! \brief Retrieves the Dtk_Node as a Dtk_AxisSystemPtr - if exists -
486  //! \return The Dtk_Node as a Dtk_AxisSystemPtr if exists. Null Dtk_AxisSystemPtr else.
487  //! \remark This method is used to retrieve the axis placement
488  //! informations - if GetNodeType() method returns AxisSystemType -.
490 
491  //! \brief Retrieves the Dtk_Node as a Dtk_LayerInfosSetPtr - if exists -
492  //! \return The Dtk_Node as a Dtk_LayerInfosSetPtr if exists. Null Dtk_LayerInfosSetPtr else.
493  //! \remark This method is used to retrieve the layer infos set
494  //! informations - if GetNodeType() method returns LayerInfosSetType -.
496 
497  //! \brief Retrieves the Dtk_Node as a Dtk_ColorInfosSetPtr - if exists -
498  //! \return The Dtk_Node as a Dtk_ColorInfosSetPtr if exists. Null Dtk_ColorInfosSetPtr else.
499  //! \remark This method is used to retrieve the color infos set
500  //! informations - if GetNodeType() method returns ColorInfosSetType -.
502 
503  //! \brief Retrieves the Dtk_Node as a Dtk_ModelDisplayPtr - if exists -
504  //! \return The Dtk_Node as a Dtk_ModelDisplayPtr if exists. Null Dtk_ModelDisplayPtr else.
505  //! \remark This method is used to retrieve the display model entity (camera capture)
506  //! informations - if GetNodeType() method returns ModelDisplayType -.
508 
509  //! \brief Retrieves the Dtk_Node as a Dtk_CameraPtr - if exists -
510  //! \return The Dtk_Node as a Dtk_CameraPtr if exists. Null Dtk_CameraPtr else.
511  //! \remark This method is used to retrieve the camera entity
512  //! informations - if GetNodeType() method returns CameraType -.
514 
515  //! \brief Retrieves the Dtk_Node as a Dtk_ConstraintPtr - if exists -
516  //! \return The Dtk_Node as a Dtk_ConstraintPtr if exists. Null Dtk_ConstraintPtr else.
517  //! \remark This method is used to retrieve the Constraint entity
518  //! informations - if GetNodeType() method returns ConstraintType -.
520 
521  //! \brief Retrieves the Dtk_Node as a Dtk_KinematicsPtr - if exists -
522  //! \return The Dtk_Node as a Dtk_Kinematic if exists. Null Dtk_Kinematics else.
523  //! \remark This method is used to retrieve the kinematic info
524  //! informations - if GetNodeType() method returns KinematicFilterType -.
525  //Dtk_KinematicsPtr GetDtk_KinematicPtr();
526 
527  //! \brief Adds associated entity - Dtk_NodeConnectorPtr - to the Dtk_Node.
528  //! \return DtkNoError if success.
529  //! \param inAssociatedEntity AssociatedEntity to be added.
530  void AddAssociatedEntity ( const Dtk_NodeConnectorPtr& inAssociatedEntity );
531 
532  //! \brief Adds associated entities - Dtk_NodeConnectorPtr - to the Dtk_Node.
533  //! \return DtkNoError if success.
534  //! \param inAssociatedEntities AssociatedEntities to be added.
535  void AddAssociatedEntities ( const Dtk_tab< Dtk_NodeConnectorPtr >& inAssociatedEntities );
536 
537  //! \brief Retrieves the entities associated to the Dtk_Node. They are retrieved via Dtk_NodeConnectorPtr.
538  //! \return DtkNoError if success.
539  //! \param outAssociatedEntities The associatedEntities to be retrieved.
541 
542  //Internal Use
544  void SetStoredInfos(const Dtk_StoredInfoPtr& inInfos);
545 
546  //! \brief Retrieves the Dtk_Node EntityID - read only -
547  //! \return The Entity ID of Node.
549 };
550 /////////////////////////////////////////////////////////////////////////////
551 
552 /////////////////////////////////////////////////////////////////////////////
553 //! \ingroup DtkAPIGroup
554 //! \class Dtk_Component
555 //! \brief This is the Component Class.\n
556 //! The Dtk_ComponentPtr object is used as element into an assembly tree.\n
557 //! Is typically used as a Part into an Assembly Tree.\n
558 //! \SmartPtr{Dtk_ComponentPtr}
560 {
561 public:
563  {
564  ComponentMissing = 0x1,
565  ComponentFound = 0x2,
566  ComponentInternal = 0x4,
567  ComponentPhantom = 0x8,
568  ComponentAdditionnalReference = 0x10,
569  ComponentAssemblyGeometry = 0x20,
570  ComponentWithUnavailableReader = 0x40
571  };
573  {
574  InstanceComponentType = 0,
577  VirtualComponentType
578 
579  };
580 
582  {
583  switch( inEnum )
584  {
585  case ComponentMissing: return L"ComponentMissing";
586  case ComponentFound: return L"ComponentFound";
587  case ComponentInternal: return L"ComponentInternal";
588  case ComponentPhantom: return L"ComponentPhantom";
589  case ComponentAdditionnalReference: return L"ComponentAdditionnalReference";
590  case ComponentAssemblyGeometry: return L"ComponentAssemblyGeometry";
591  case ComponentWithUnavailableReader: return L"ComponentWithUnavailableReader";
592 
593  default: return L"Unknown";
594  }
595  }
596 
598  {
599  switch( inEnum )
600  {
601  case CatalogComponentType: return L"CatalogComponentType";
602  case VirtualComponentType: return L"VirtualComponentType";
603  case InstanceComponentType: return L"InstanceComponentType";
604  case PrototypeComponentType: return L"PrototypeComponentType";
605 
606  default: return L"Unknown";
607  }
608  }
609 
610  static inline Dtk_Int32 ComponentTypeStringToInt( const Dtk_string &name )
611  {
612  Dtk_Int32 result = -1;
613 
614  if( name.len() > 0 )
615  {
616  if( name == L"CatalogComponentType" )
617  result = CatalogComponentType;
618  else if( name == L"VirtualComponentType" )
619  result = VirtualComponentType;
620  else if( name == L"InstanceComponentType" )
621  result = InstanceComponentType;
622  else if( name == L"PrototypeComponentType" )
623  result = PrototypeComponentType;
624  }
625 
626  return result;
627  }
628 
629 protected:
631  struct Dtk_Handle; // Not defined here
632  Dtk_Handle *_Private; // Handle
633  friend class Dtk_MainDoc;
634  friend class Dtk_API;
637 private:
638  void _Init();
639  void _Reset();
640  void _Copy(const Dtk_Component&s);
641 
642  //! \sa Dtk_MainDoc::CreatePhysicalDtk_Component()
643  //! \sa Dtk_MainDoc::CreateVirtualDtk_Component()
644  Dtk_Component( const Dtk_ComponentID& inID,
645  const ComponentTypeEnum& inComponentType,
646  const ComponentAvailabilityEnum& inComponentAvailability,
647  const Dtk_Int32& inAdditionnalReferenceFlag,
648  Dtk_string inComponentName,
649  Dtk_string inComponentFullPath,
650  Dtk_string inComponentInstanceName,
651  const Dtk_transfo& inTransformationMatrix,
652  const DtkReaderType& inAssociatedModule,
653  Dtk_string inComponentOriginalName);
654 
655  //! \BaseDestructor
657  friend class Dtk_SmartPtr<Dtk_Component>;
658 
659  void _CheckGlobalDataSet();
660  void _CheckFdtDataSet();
661 public:
662 
663  //! \DtkDynamicType
664  Dtk_Int32 DtkDynamicType(const int& inId);
665 
666  //! \DtkDynamicCast
668 
669  //InternalUse
672 
673 
674  //! \brief Adds a child Dtk_Component to main Component.
675  //! \param inChild The Dtk_Component to be added as a child.
676  inline void AddChild(const Dtk_ComponentPtr& inChild)
678 
679  //! \brief Retrieves the ith Dtk_ComponentPtr - read only -
680  //! \param inPos Child component index.
681  //! \return the inPos'th Dtk_ComponentPtr
682  inline const Dtk_ComponentPtr GetChild(const Dtk_Size_t& inPos) const
683  { return Dtk_ComponentPtr::DtkDynamicCast( _GetChild(inPos) ); }
684 
685  //! \brief Replaces a child Dtk_ComponentPtr by another one. Also updates father lists.
686  //! \param inPos Old Child Dtk_ComponentPtr element index.
687  //! \param inNewChild The Dtk_ComponentPtr replacing the old one
688  //! \DtkInternal
689  //! \return the DtkNoerrror if success.
690  //! \return the dtkErrorOutOfRange if bad inPos parameter.
691  //! \return the dtkErrorNullPointer if inNewChild is NULL.
692  inline Dtk_ErrorStatus ReplaceChildComponent(const Dtk_Size_t& inPos, const Dtk_ComponentPtr& inNewChild)
693  { return _ReplaceChild( inPos, Dtk_DocElementPtr::DtkDynamicCast(inNewChild) ); }
694 
695  //! \brief Retrieves the Dtk_Component Type - read only -
696  //! \return The component Type.
698 
699  //! \brief Gives Dtk_Component availability - read only -
700  //! \deprecated "Use Use Dtk_Component::IsAvailabilityFlaggedAs method instead.")
701  //! \return The component availability.
702  SetAsDeprecated( "2026.3", "Use Dtk_Component::IsAvailabilityFlaggedAs method instead." )
703  const ComponentAvailabilityEnum ComponentAvailability() const;
704 
705  //! \brief Check Dtk_Component availability - read only -
706  //! Each Dtk_Component can have several status (ex : AdditionnalReference and Missing)
707  //! \return DTK_TRUE if inStatusToCheck is activated on this component.
708  bool IsAvailabilityFlaggedAs( Dtk_Component::ComponentAvailabilityEnum inStatusToCheck ) const;
709 
710 
711  //! \brief Retrieves the Dtk_Component FullPathName - read only -
712  //! \return The component FullPathName.
713  const Dtk_string& FullPathName() const;
714 
715  //! \brief Retrieves the Dtk_Component OriginalPathName (read in file) - read only -
716  //! \return The component OriginalPathName.
717  const Dtk_string& OriginalPathName() const;
718 
719  //! \brief Retrieves the Dtk_Component TransformationMatrix - read only -
720  //! \return The component TransformationMatrix.
721  const Dtk_transfo& TransformationMatrix() const;
722 
723  //! \brief Retrieves the Dtk_Component InstanceName - read only -
724  //! \return The component InstanceName.
725  const Dtk_string& InstanceName() const;
726 
727  //! \brief Retrieves the Dtk_Component AssociatedModuleType - read only -
728  //! \return The component AssociatedModuleType.
729  const DtkReaderType& GetAssociatedModuleType() const;
730 
731  //! \brief Returns DTK_TRUE if Dtk_Component is an assembly.
732  Dtk_bool IsAssembly() const;
733 
734  //! \brief Returns DTK_TRUE if Dtk_Component is Additionnal Reference.
735  Dtk_bool IsAdditionnalReference() const;
736 
737  //! \brief Returns Default Child Index or -1 if Component isn't a catalog
738  Dtk_Int32 GetDefaultChildInCatalog() const;
739 
740  //! \brief Returns Activated Children Index or empty array if Component isn't a catalog
741  Dtk_tab<Dtk_Int32> GetActivatedChildrenInCatalog() const;
742 
743  //! \brief Creates a Virtual Dtk_NodePtr
744  //! \param inName Node name.
745  //! \return the constructed Dtk_NodePtr.
746  Dtk_NodePtr CreateVirtualNode( Dtk_string inName, const type_detk inSubType = DTK_TYPE_NO_SUBTYPE );
747 
748  //! \brief Creates a Body Dtk_NodePtr from a body ID.
749  //! \param inName Node name.
750  //! \param inBodyID Body Id.
751  //! \param inBodyFlag Body Info : Wire,Solid, MeshSurface and/or Surface.
752  //! \return the constructed Dtk_NodePtr.
753  Dtk_NodePtr CreateBodyNode( Dtk_string inName, const Dtk_ID& inBodyID, const Dtk_Int32 inBodyFlag , const type_detk inSubType = DTK_TYPE_BODY);
754 
755  //! \brief Creates a Mesh Dtk_NodePtr from a Mesh ID.
756  //! \param inName Node name.
757  //! \param inMeshID Mesh Id.
758  //! \return the constructed Dtk_NodePtr.
759  Dtk_NodePtr CreateMeshNode(
760  Dtk_string inName,
761  const Dtk_ID& inMeshID,
762  const Dtk_Int32 inMeshFlag,
763  const type_detk inSubType = DTK_TYPE_MESH );
764 
765  //! \brief Creates a Fdt Dtk_NodePtr from a Dtk_FdtPtr ID.
766  //! \param inName Node name.
767  //! \param inFdtID Dtk_FdtPtr ID.
768  //! \return the constructed Dtk_NodePtr.
769  Dtk_NodePtr CreateFdtNode(
770  Dtk_string inName,
771  const Dtk_ID& inFdtID, const type_detk inSubType = DTK_TYPE_FDT);
772 
773  //! \brief Creates a Kinematic Dtk_NodePtr from a Dtk_KinematicPtr.
774  //! \param inName Node name.
775  //! \param inKinematicData Dtk_KinematicPtr data.
776  //! \return the constructed Dtk_NodePtr.
777  Dtk_NodePtr CreateKinematicsNode(
778  Dtk_string inName,
779  const Dtk_ID& inKinematicID);
780 
781  //! \brief Creates a Drawing Dtk_NodePtr from a Dtk_DrawingPtr.
782  //! \param inName Node name.
783  //! \param inDrawingID Dtk_DrawingPtr ID.
784  //! \return the constructed Dtk_NodePtr.
785  Dtk_NodePtr CreateDrawingNode( Dtk_string inName, const Dtk_ID& inDrawingID);
786 
787  //! \brief Creates a MetaData Dtk_NodePtr from a Dtk_MetaDataPtr.
788  //! \param inName Node name.
789  //! \param inMetaDataID Dtk_MetaDataPtr ID.
790  //! \return the constructed Dtk_NodePtr.
791  Dtk_NodePtr CreateMetaDataNode( Dtk_string inName, const Dtk_ID& inMetaDataID, const type_detk inSubType = DTK_TYPE_METADATA);
792 
793  //! \brief Creates a Constraint Dtk_NodePtr from a Dtk_ConstraintPtr.
794  //! \param inName Node name.
795  //! \param inConstraintID Dtk_ConstraintPtr ID.
796  //! \return the constructed Dtk_NodePtr.
797  Dtk_NodePtr CreateConstraintNode( Dtk_string inName, const Dtk_ID& inConstraintID, const type_detk inSubType = DTK_TYPE_CONSTRAINT);
798 
799  //! \brief Creates a AxisSystem Dtk_NodePtr from a AxisSystemPtr.
800  //! \param inName Node name.
801  //! \param inAxisSystemID AxisPlacementPtr ID.
802  //! \return the constructed Dtk_NodePtr.
803  Dtk_NodePtr CreateAxisSystemNode( Dtk_string inName, const Dtk_ID& inAxisSystemID, const type_detk inSubType = DTK_TYPE_AXIS_SYSTEM);
804 
805  //! \brief Creates a LayerInfosSet Dtk_NodePtr from a LayerInfosSetPtr.
806  //! \param inName Node name.
807  //! \param inLayerInfosSetID LayerInfosSetPtr ID.
808  //! \return the constructed Dtk_NodePtr.
809  Dtk_NodePtr CreateLayerInfosSetNode( Dtk_string inName, const Dtk_ID& inLayerInfosSetID);
810 
811  //! \brief Creates a ColorInfosSet Dtk_NodePtr from a ColorInfosSetPtr.
812  //! \param inName Node name.
813  //! \param inColorInfosSetID ColorInfosSetPtr ID.
814  //! \return the constructed Dtk_NodePtr.
815  Dtk_NodePtr CreateColorInfosSetNode( Dtk_string inName, const Dtk_ID& inColorInfosSetID);
816 
817  //! \brief Creates a ModelDisplay Dtk_NodePtr from a DisplayModel.
818  //! \param inName Node name.
819  //! \param inModelDisplayID DisplayModel ID.
820  //! \return the constructed Dtk_NodePtr.
821  Dtk_NodePtr CreateModelDisplayNode( Dtk_string inName, const Dtk_ID& inDisplayModelID, const type_detk inSubType = DTK_TYPE_NO_SUBTYPE );
822 
823  //! \brief Creates a Camera Dtk_NodePtr from a Camera.
824  //! \param inName Node name.
825  //! \param inCameraID Camera ID.
826  //! \return the constructed Dtk_NodePtr.
827  Dtk_NodePtr CreateCameraNode( Dtk_string inName, const Dtk_ID& inCameraID);
828 
829  //! \brief Retrieves a Dtk_NodePtr from the Dtk_Component NodesPool giving his Id.
830  //! \param inNodeID Wanted Dtk_NodePtr Id.
831  //! \return The wanted Dtk_NodePtr.
832  Dtk_NodePtr GetNodeByID( const Dtk_NodeID& inNodeID ) const;
833 
834  //! \brief Retrieves the father Dtk_NodePtr of the given Dtk_NodePtr.
835  //! \param inNode The Dtk_NodePtr from which we want the father.
836  //! \return The wanted Dtk_NodePtr.
837  Dtk_NodePtr GetFatherNode(const Dtk_NodePtr& inNode) const;
838 
839  //! \brief Get the Original Units for documents - geometrical data are given in MM (Scale to MM)
840  ////! \param [out] outUnitScale : Unit Scale (1.0 for MM)
841  ////! \return DtkNoError if unit is read
842  Dtk_ErrorStatus GetConceptionUnitScale(Dtk_Double64 &outUnitScale)const;
843 
844  //! \deprecated Use Dtk_Component::GetConceptionUnitScale(Dtk_Double64 &outUnitScale) method instead.
845  SetAsDeprecated("2022.1", "Use Dtk_Component::GetConceptionUnitScale(Dtk_Double64 &outUnitScale) method instead.")
846  Dtk_Double64 GetConceptionUnitScale_Deprecated221() const;
847 
848  void SetConceptionUnitScale(Dtk_Double64 inUnitScale);
849 
850  //! \brief Gets File Version
851  const Dtk_string & GetFileVersion()const;
852  void SetFileVersion(const Dtk_string & inFileVersion);
853 
854  //! \brief Current layer for Component
855  SetAsDeprecated( "2026.2", "Use Dtk_LayerInfoSet::GetCurrentLayer instead")
856  Dtk_Int32 GetCurrentLayer() const;
857  SetAsDeprecated( "2026.2", "Use Dtk_LayerInfoSet::SetCurrentLayer instead")
858  void SetCurrentLayer(Dtk_Int32 inCurrentLayer);
859 
860  //! \brief Visible layer for Component
861  SetAsDeprecated( "2026.2", "Use GetLayerInfosSet() then Dtk_LayerInfosSet::GetLayersFlaggedAs( Dtk_LayerInfosSet::Layer::Status::Visible ) instead")
862  void GetVisibleLayers(Dtk_tab<Dtk_Int32> &outVisibleLayers)const;
863  SetAsDeprecated( "2026.2", "Use Dtk_LayerInfosSet::AddLayer instead" )
864  void SetVisibleLayers(const Dtk_tab<Dtk_Int32> & inVisibleLayers);
865 
866  //! \brief Selectable layer for Component
867  SetAsDeprecated( "2026.2", "Use GetLayerInfosSet() then Dtk_LayerInfosSet::GetLayersFlaggedAs( Dtk_LayerInfosSet::Layer::Status::Selectable ) instead")
868  void GetSelectableLayers(Dtk_tab<Dtk_Int32> &outSelectableLayers)const;
869  SetAsDeprecated( "2026.2", "Use Dtk_LayerInfosSet::AddLayer instead" )
870  void SetSelectableLayers(const Dtk_tab<Dtk_Int32> & inSelectableLayers);
871 
872  //! \brief Retrieves the Dtk_LayerInfosSet of this component
873  //! \remark Dtk_API::ReadComponent has to be called for the layer set to be available.
874  //! \return The Dtk_LayerInfosSet of this component.
875  Dtk_LayerInfosSetPtr GetLayerInfosSet() const;
876 
877  //! \brief SiblingName for Component
878  DtkErrorStatus GetSiblingName(Dtk_string &outSiblingName)const;
879  DtkErrorStatus SetSiblingName(const Dtk_string & inSiblingName);
880 
881 
882  //! \brief Gives number of Nodes in the Component (useful if you want to handle progress bar).
883  //! \return number of Nodes.
884  Dtk_Size_t GetNumNodes() const;
885 
886  //! \brief Attaches SelectionDataSet infos to the Dtk_Component - through the Dtk_GlobalDataSetPtr -.
887  void SetSelectionDataSet( const Dtk_SelectionDataSetPtr& inSelectionDataSet);
888 
889  //! \brief Retrieves the Dtk_GlobalDataSetPtr attached to the Dtk_Component - get only -.
890  //! \return The attached Dtk_GlobalDataSetPtr - can be null -
891  const Dtk_GlobalDataSetPtr GetGlobalDataSet() const;
892 
893 
894  //! \brief Retrieves the connectors pointing on this component.
895  //! \return The pointing connectors.
896  Dtk_ErrorStatus GetConnectorsPointingToThisComponent(Dtk_tab<Dtk_NodeConnectorPtr> &outConnectedEntities);
897 
898  //! \brief Devalidates Component into MainDoc.
899  //! \param inNodeID The NodeID to devalidate.
900  //! \return DtkNoError if success.
901  //! \remark Internal Use only.
902  Dtk_ErrorStatus DevalidateNode( const Dtk_NodeID& inNodeID );
903 
904  //! \brief Gets BoundingBox on Prototype Component if it can be read in original file
905  //! \param [out] outMin Resulting minimum coordinates
906  //! \param [out] outMax Resulting maximum coordinates
907  //! \return DtkNoError if success.
908  Dtk_ErrorStatus GetBoundingBox( Dtk_pnt& outMin, Dtk_pnt& outMax );
909 
910  //! \brief Adds Override set to a prototype component
911  //! \return dtkNoError if ok.
912  DtkErrorStatus AddOverrideSet(const Dtk_OverrideSetPtr& inOverrideSet);
913 
914  //! \brief Gives number of Override sets in a prototype component
915  //! \return Override sets.
916  Dtk_Size_t GetNumOverrideSets() const;
917 
918  //! \brief Gives array of Override sets in a prototype component
919  //! \return dtkNoError if ok.
920  DtkErrorStatus GetOverrideSets(Dtk_tab<Dtk_OverrideSetPtr>& outOverrideSet) const;
921 
922  //! \brief Sets array of Override sets in a prototype component
923  //! \return dtkNoError if ok.
924  DtkErrorStatus SetOverrideSets(const Dtk_tab<Dtk_OverrideSetPtr>& inOverrideSets);
925 };
926 /////////////////////////////////////////////////////////////////////////////
927 
928 /////////////////////////////////////////////////////////////////////////////
929 //! \ingroup DtkAPIGroup
930 //! \class Dtk_MainDoc
931 //! \brief This is the Document Class.\n
932 //! The Dtk_MainDocPtr object is used as root element produced by a translation.\n
933 //! It contains the root Dtk_ComponentPtr.
934 //! \SmartPtr{Dtk_MainDocPtr}
935 class Dtk_MainDoc : public Dtk_Object
936 {
937  friend class Dtk_MainDocWrapper;
938 public:
939  struct Dtk_Handle; // Not defined here
940 protected:
942  Dtk_Handle *_Private; // Handle
943  friend class Dtk_API;
946 private:
947  void _Init();
948  void _Reset();
949  void _Copy(const Dtk_MainDoc&s);
950 
951  //! \sa Create
952  Dtk_MainDoc();
953  //! \BaseDestructor
954  ~Dtk_MainDoc();
955 
956  void _AddComponentIntoPool(Dtk_ComponentPtr& outElt);
957 
958  friend class Dtk_SmartPtr<Dtk_MainDoc>;
959 public:
960 
961  //! \CreateBase
963 
964  //! \DtkDynamicType
965  Dtk_Int32 DtkDynamicType(const int& inId);
966 
967  //! \DtkDynamicCast
969 
970  //! \brief Set the root Dtk_ComponentPtr.
971  //! \param inRootComponent The root Ccomponent
972  void SetRootComponent(const Dtk_ComponentPtr& inRootComponent);
973 
974  //! \brief Retrieves the root Dtk_ComponentPtr of the Dtk_MainDoc.
975  //! \return The root Dtk_ComponentPtr.
977 
978  //! \brief Creates a physical Dtk_ComponentPtr.
979  //! \param inComponentType Component type - Part or Assembly -.
980  //! \param inComponentFullPath Component full path.
981  //! \param inComponentName Component name.
982  //! \param inInstanceName Instance name.
983  //! \param inTransformationMatrix Transformation matrix.
984  //! \param inAssociatedModule Associated module - Unknown by default -.
985  //! \return the constructed Dtk_ComponentPtr.
986 
987  //! \brief Creates an Instance Dtk_ComponentPtr.
988  //! \param inPrototype The Prototype Dtk_ComponentPtr used to create instance.
989  //! \param inInstanceName Instance name.
990  //! \param inTransformationMatrix Transformation matrix.
991  //! \return the constructed InstanceDtk_ComponentPtr.
992  //! \remark The Prototype is automatically linked to the instance.
994  const Dtk_ComponentPtr& inPrototype,
996  const Dtk_transfo& inTransformationMatrix);
997 
998  //! \brief Creates a Prototype Dtk_ComponentPtr.
999  //! This type handles Assemblies and part components.
1000  //! \param inComponentFullPath Component full path.
1001  //! \param inComponentName Component name.
1002  //! \param inAssociatedModule Associated module - Unknown by default -.
1003  //! \param inAvailability : Is component found/missing or internal
1004  //! \param inAdditionnalReferenceFlag : Is component an additionnal reference ( not part of assembly) or not
1005  //! \return the constructed Prototype Dtk_ComponentPtr.
1007  Dtk_string inComponentFullPath,
1008  Dtk_string inComponentName,
1009  const DtkReaderType& inAssociatedModule,
1010  const Dtk_Component::ComponentAvailabilityEnum& inAvailability,
1011  const int inAdditionnalReferenceFlag = 0,
1012  Dtk_string inOriginalName=Dtk_string());
1013 
1014  //! \brief Creates a virtual Dtk_ComponentPtr.
1015  //! \param inComponentName Component name.
1016  //! \param inAssociatedModule Associated module - Unknown by default -.
1017  //! \return the constructed Dtk_ComponentPtr.
1018  //! \remark A virtual Dtk_ComponentPtr hasn't any full path.
1020  Dtk_string inComponentName,
1021  const DtkReaderType& inAssociatedModule,
1022  Dtk_string inComponentFullPath,
1023  const Dtk_Component::ComponentAvailabilityEnum& inAvailability);
1024 
1025  //! \brief Creates a Catalog Dtk_ComponentPtr.
1026  //! \param inComponentFullPath Component full path.
1027  //! \param inComponentName Component name.
1028  //! \param inInstanceName Instance name.
1029  //! \param inTransformationMatrix Transformation matrix.
1030  //! \param inAssociatedModule Associated module - Unknown by default -.
1031  //! \return the constructed Dtk_ComponentPtr.
1033  Dtk_string inComponentFullPath,
1034  Dtk_string inComponentName,
1036  const Dtk_transfo& inTransformationMatrix,
1037  const DtkReaderType& inAssociatedModule = UnknownModule,
1039  Dtk_string inOriginalName = Dtk_string());
1040 
1041 
1042 
1043  //! \brief Retrieves a Dtk_ComponentPtr giving its ID.
1044  //! \param inComponentID The component ID
1045  //! \return The wanted Dtk_ComponentPtr.
1046  Dtk_ComponentPtr GetComponentByID( const Dtk_ComponentID& inComponentID ) const;
1047 
1048  //! \brief Retrieves the inIndexth father of the giving Dtk_ComponentPtr.
1049  //! \param inComponent The component from which we want the father.
1050  //! \param inIndex index of father wanted.
1051  //! \return The wanted Dtk_ComponentPtr.
1053 
1054  //! \brief Retrieves the inIndexth father of the giving Dtk_ComponentPtr.
1055  //! \param inComponent The component from which we want the number of fathers.
1056  //! \return The number of father.
1058 
1059  //! \brief Give number of Components in the Dtk_MainDoc (useful if you want to handle progress bar).
1060  //! \return number of Components.
1062 
1063  //! \brief Give number of InstanceComponents in the Dtk_MainDoc
1064  //! \return number of Instance Components.
1066 
1067  //! \brief Indicate that document contains several independant models
1068  //! \return DTK_TRUE if the MainDoc represent a multi model document.
1070 
1071  //! \brief Set flag to indicate that document contains several independant models
1072  void SetMultiModelFlag(Dtk_bool inMultiModelFlag);
1073 
1074  //! \brief Devalidates Component into MainDoc.
1075  //! \param inComponentID The ComponentID to devalidate.
1076  //! \return DtkNoError if success.
1077  //! \remark Internal Use only.
1079 
1080  //! \brief return list of missing files into MainDoc.
1081  //! \param outFileList : list of missing files
1082  //! \return DtkNoError if success.
1084 
1085  //! \brief return list of additional reference files into MainDoc.
1086  //! \param outFileList : list of additionnal reference files
1087  //! \return DtkNoError if success.
1089 
1090 };
1091 
1092 /////////////////////////////////////////////////////////////////////////////
1093 //! \ingroup DtkAPIGroup
1094 //! \class Dtk_NodeConnector
1095 //! \brief This is the Dtk_NodeConnector Class.\n
1096 //! \SmartPtr{Dtk_NodeConnectorPtr}
1098 {
1099 public:
1100  //! \brief Reason - Type of the Dtk_NodeConnector -. It's used to filter connectors to same elements.
1102  {
1103  Unknown = 0,
1104  //Placement Reasons
1105  VerticallyAligned, //the pointing entity is bound to the the position of pointed one, so that they stay vertically aligned
1106  HorizontallyAligned, //the pointing entity is bound to the the position of pointed one, so that they stay horizontally aligned
1107  StackedLeft, //the pointing entity is bound to the the position of pointed one, so that it is kept to the left
1108  StackedRight, //the pointing entity is bound to the the position of pointed one, so that it is kept to the right
1109  StackedAbove, //the pointing entity is bound to the the position of pointed one, so that it is kept above
1110  StackedBelow, //the pointing entity is bound to the the position of pointed one, so that it is kept below
1111  PositionallyFixed, //the pointing entity positon is constrained by the pointed one
1112  OrientationallyFixed, //the pointing entity direction is constrained by the pointed one
1113  ForceHidden, //the pointed entity is forced to be hidden
1114  ForceVisible, //the pointed entity is forced to be visible
1115  ForceColor, //the pointed entity is forced to change color
1116  ForceRender, //the pointed entity is forced to change render info
1117  ForceClipped, //the pointed entity is forced to be clipped by light section view
1118  KeepOnlyFdt, //keep only pmi
1119 
1120  //Category used to qualify links from the 1st Dtk_ReferenceBlockPtr - [PT] / [SL] / [PL] -
1121  //These links can apply to a reference into Dtk_ReferenceBlockPtr - 3 1st references handled - or to the common datum - the whole Dtk_ReferenceBlockPtr
1126 
1127  //Category used to qualify links from the 2nd Dtk_ReferenceBlockPtr - [PT] / [SL] / [PL] -
1128  //These links can apply to a reference into Dtk_ReferenceBlockPtr - 3 1st references handled - or to the common datum - the whole Dtk_ReferenceBlockPtr
1133 
1134  //Category used to qualify links from the 3rd Dtk_ReferenceBlockPtr - [PT] / [SL] / [PL] -
1135  //These links can apply to a reference into Dtk_ReferenceBlockPtr - 3 1st references handled - or to the common datum - the whole Dtk_ReferenceBlockPtr
1140 
1141  //General Associations
1153 
1155 
1156  };
1157  static inline Dtk_string ReasonLinkEnumToString(const ReasonLinkEnum& inEnum)
1158  {
1159  switch( inEnum )
1160  {
1161  case VerticallyAligned: return L"VerticallyAligned";
1162  case HorizontallyAligned: return L"HorizontallyAligned";
1163  case StackedLeft: return L"StackedLeft";
1164  case StackedRight: return L"StackedRight";
1165  case StackedAbove: return L"StackedAbove";
1166  case StackedBelow: return L"StackedBelow";
1167  case PositionallyFixed: return L"PositionallyFixed";
1168  case OrientationallyFixed: return L"OrientationallyFixed";
1169  case ForceHidden: return L"ForceHidden";
1170  case ForceVisible: return L"ForceVisible";
1171  case ForceClipped: return L"ForceClipped";
1172  case KeepOnlyFdt: return L"KeepOnlyFdt";
1173  case ForceColor: return L"ForceColor";
1174  case ForceRender: return L"ForceRender";
1175 
1176  case AssociatedGeometry: return L"AssociatedGeometry";
1177  case AssociatedFeature: return L"AssociatedFeature";
1178  case SubPMI: return L"SubPMI";
1179  case DefaultAnnotationLink: return L"DefaultAnnotationLink";
1180  case HighlightedGeometry: return L"HighlightedGeometry";
1181  case Support: return L"Support";
1182  case AssociatedAxisSystem: return L"AssociatedAxisSystem";
1183  case AssociatedXDirection: return L"AssociatedXDirection";
1184  case AssociatedYDirection: return L"AssociatedYDirection";
1185  case AssociatedZDirection: return L"AssociatedZDirection";
1186  case AssociatedCenterPoint: return L"AssociatedCenterPoint";
1187 
1188  case Context: return L"Context";
1189 
1190  case FirstRefBlockSituation_Common: return L"FirstRefBlockSituation_Common";
1191  case FirstRefBlockSituation_1: return L"FirstRefBlockSituation_1";
1192  case FirstRefBlockSituation_2: return L"FirstRefBlockSituation_2";
1193  case FirstRefBlockSituation_3: return L"FirstRefBlockSituation_3";
1194 
1195  case SecondRefBlockSituation_Common: return L"SecondRefBlockSituation_Common";
1196  case SecondRefBlockSituation_1: return L"SecondRefBlockSituation_1";
1197  case SecondRefBlockSituation_2: return L"SecondRefBlockSituation_2";
1198  case SecondRefBlockSituation_3: return L"SecondRefBlockSituation_3";
1199 
1200  case ThirdRefBlockSituation_Common: return L"ThirdRefBlockSituation_Common";
1201  case ThirdRefBlockSituation_1: return L"ThirdRefBlockSituation_1";
1202  case ThirdRefBlockSituation_2: return L"ThirdRefBlockSituation_2";
1203  case ThirdRefBlockSituation_3: return L"ThirdRefBlockSituation_3";
1204 
1205  default: return L"Unknown";
1206  }
1207  }
1208 
1209  //! \brief Reason Category. Global Category of the NodeConnector uesed to gather Reason into families.
1211  {
1212  UnknownCategory = 0,
1213  PlacementCategory, //General Placement Category gathering all Placement Reasons
1217 
1221  };
1223  {
1224  switch( inEnum )
1225  {
1226  case PlacementCategory: return L"PlacementCategory";
1227  case GeneralAssociationCategory: return L"GeneralAssociationCategory";
1228  case VisibilityCategory: return L"VisibilityCategory";
1229  case AppearanceCategory: return L"AppearanceCategory";
1230  case FirstRefBlockSituationCategory: return L"FirstRefBlockSituationCategory";
1231  case SecondRefBlockSituationCategory: return L"SecondRefBlockSituationCategory";
1232  case ThirdRefBlockSituationCategory: return L"ThirdRefBlockSituationCategory";
1233  default: return L"UnknownCategory";
1234  }
1235  }
1236 
1238  {
1239  private:
1240  Dtk_ID _SubEntityID; // optional: Set of IDs (in case the connector links to a geometric entity (construction)
1241  type_detk _SubEntityType; // optional: The list of entities types
1242  public:
1243  inline SubEntity( ) : _SubEntityID(0), _SubEntityType(DTK_TYPE_UNKNOWN){}
1244  inline SubEntity( const Dtk_ID inSubEntityID, const type_detk inSubEntityType ) : _SubEntityID(inSubEntityID), _SubEntityType(inSubEntityType){}
1245  inline SubEntity( const SubEntity& inTobeCopied ) : _SubEntityID(inTobeCopied._SubEntityID), _SubEntityType(inTobeCopied._SubEntityType){}
1246  inline ~SubEntity() {}
1247 
1248  inline Dtk_ID GetSubEntityId() const {return _SubEntityID;}
1249  inline type_detk GetSubEntityType() const {return _SubEntityType;}
1250  friend Dtk_bool operator==(const SubEntity&, const SubEntity&);
1251 
1252  };
1253 
1254 protected:
1255  struct Dtk_Handle; // Not defined here
1256  Dtk_Handle *_Private; // Handle
1257 
1258  enum
1259  {
1261  };
1262 
1263  //! \BaseConstructor
1265 
1266  //! \CopyConstructor{in}
1268 
1269  //! \BaseDestructor
1271 
1272  inline virtual Dtk_Object* Clone() { return new Dtk_NodeConnector(*this); }
1273 
1274 protected:
1275  void _Init();
1276  void _Reset();
1277  void _Copy(const Dtk_NodeConnector &s);
1278  friend class Dtk_SmartPtr<Dtk_NodeConnector>;
1279 public:
1280  friend class Dtk_Node;
1281  //! \DtkDynamicType
1283 
1284  //! \DtkDynamicCast
1286 
1287  //! \CreateBase
1289 
1290  //! \CreateCopy{in}
1292 
1293  //! \return The type of the entity type - DTK_TYPE_FDT -
1295 
1296  //! \brief Returns the Component ID referenced by the connector
1298  //! \brief Sets the component ID
1299  void SetAssociatedComponentID (const Dtk_ID &inComponentID);
1300 
1301  //! \brief Returns the Path Component ID referenced by the connector from Root to Target
1303  void GetAssociatedPathComponentID(Dtk_tab<Dtk_ID>& outAssociatedPathComponentID) const ;
1304  //! \brief Sets the Path Component ID from Root to Target
1305  void SetAssociatedPathComponentID (const Dtk_tab<Dtk_ID> &inPathComponentID);
1306  //! \brief Checks if the Path Component ID exist into Dtk_MainDocPtr
1307  //! \brief Returns true if path connector exists else returns false
1309 
1310  //! \brief Returns the Node id referenced by the connector
1311  Dtk_ID GetNodeId() const ;
1312  //! \brief Sets the Node id
1313  void SetNodeId(const Dtk_ID &inNodeId);
1314 
1315 
1316  //! \brief Returns the number of the geometric entities
1318 
1319  //! \brief Retrieves The connected SubEntities - IDs and types -
1320  //! \param outEntitiesIDs SubEntities Ids
1321  //! \param outEntitiesTypes SubEntities types
1322  //! \remark Sizes of the 2 arrays are equal
1323  //! \return DtkNoError if no error.
1324  Dtk_ErrorStatus GetSubEntities(Dtk_tab <Dtk_ID>& outEntitiesIDs, Dtk_tab <type_detk> & outEntitiesTypes) const;
1325 
1326  //! \brief Returns the set of Additional Entities defined by their IDs and Types
1327  //! \param inEntitiesIDs SubEntities Ids
1328  //! \param inEntitiesTypes SubEntities types
1329  //! \remark The size of the 2 arrays must be equal
1330  //! \return DtkNoError if no error.
1331  Dtk_ErrorStatus SetSubEntities(const Dtk_tab <Dtk_ID> &inEntitiesIDs, const Dtk_tab <type_detk> & inEntitiesTypes);
1332 
1333  //! \brief Sets of SubEntities - defined by their IDs and Types -
1334  //! \param inSubEntities SubEntities array
1335  //! \return DtkNoError if no error.
1337 
1338  //! \brief Add a set of SubEntities - defined by their IDs and Types - to the SubEntities list
1339  //! \param inSubEntities SubEntities array
1340  //! \return DtkNoError if no error.
1342 
1343  //! \brief Add a SubEntity - defined by their IDs and Types - to the SubEntities list
1344  //! \param inSubEntity SubEntity
1345  //! \return DtkNoError if no error.
1347 
1348  //! \brief Retrieves the SubEntities array - defined by their IDs and Types -
1349  //! \param outSubEntities The resulting SubEntities array
1350  //! \return DtkNoError if no error.
1352 
1353  //! \brief Retrieves the pointing entity FullType. Should be the FullType of the Dtk_Node containing the Dtk_NodeConnector
1354  //! \return The pointing entity FullType.
1356 
1357  //! \brief Sets the pointing entity Type.
1358  //! \param inPointingEntityType The pointing entity Type.
1359  void SetPointingEntityType( const Dtk_Node::FullType inPointingEntityType );
1360 
1361  //! \brief Sets the pointed entity Type.
1362  //! \param inPointedEntityType The pointed entity Type.
1363  void SetPointedEntityType( const type_detk inPointedEntityType);
1364 
1365  //! \brief Retrieves the pointed entity Type.
1366  //! \return The pointed entity Type.
1368 
1369  //! \brief Sets the Reason Link of the Dtk_NodeConnector to specify the reason of the connection.
1370  //! \param inReasonLink The Reason Link
1371  void SetReasonLink( const ReasonLinkEnum inReasonLink );
1372 
1373  //! \brief Gets the Reason Link of the Dtk_NodeConnector to specify the reason of the connection.
1374  //! \param outReasonCategory The Reason Category - processed from the ReasonLink -
1375  //! \return The Reason Link.
1377 
1378  //! \brief Set the Color Id for ForceColor connectors
1379  //! \param inColorId The Color Id
1380  void SetColorId( Dtk_ID inColorId) ;
1381 
1382  //! \brief Retrieves the Color Id for ForceColor connectors
1383  //! \return The Color Id ( > 0 if exists, 0 otherwise).
1385 
1386  //! \brief Set the Render Id for ForceRender connectors
1387  //! \param inRenderId The Render Id
1388  void SetRenderId( Dtk_ID inRenderId );
1389 
1390  //! \brief Retrieves the Render Id for ForceRender connectors
1391  //! \return The Render Id ( > 0 if exists, 0 otherwise).
1393 };
1394 
1395 
1396 /////////////////////////////////////////////////////////////////////////////
1397 
1398 
1399 #endif
Dtk_NodeConnector::SetNodeId
void SetNodeId(const Dtk_ID &inNodeId)
Sets the Node id.
Dtk_Node::FullType::FullType
FullType(const NodeDataTypeEnum inPrimaryType, const type_detk inSubType)
Definition: dtk_maindoc.hpp:284
Dtk_Node::AnnotationSetType
@ AnnotationSetType
Definition: dtk_maindoc.hpp:256
Dtk_feat
Generic Feature All metric data in feature classes are given in MM All angular data are given in degr...
Definition: str_feat_dtk.hpp:6859
Dtk_Component::SetComponentAvailability
Dtk_ErrorStatus SetComponentAvailability(ComponentAvailabilityEnum inComponentAvailability)
Dtk_NodeConnector::ReasonLinkEnum
ReasonLinkEnum
Reason - Type of the Dtk_NodeConnector -. It's used to filter connectors to same elements.
Definition: dtk_maindoc.hpp:1102
Dtk_NodeConnector::SetPointingEntityType
void SetPointingEntityType(const Dtk_Node::FullType inPointingEntityType)
Sets the pointing entity Type.
Dtk_NodeConnector::KeepOnlyFdt
@ KeepOnlyFdt
Definition: dtk_maindoc.hpp:1118
dtk_global_data_set_ptr.hpp
CaddsReaderModule
@ CaddsReaderModule
Definition: dtk_maindoc.hpp:45
Dtk_MainDoc::GetComponentByID
Dtk_ComponentPtr GetComponentByID(const Dtk_ComponentID &inComponentID) const
Retrieves a Dtk_ComponentPtr giving its ID.
RnXmlReaderModule
@ RnXmlReaderModule
Definition: dtk_maindoc.hpp:59
Dtk_Component::DtkDynamicType
Dtk_Int32 DtkDynamicType(const int &inId)
Retrieves the dynamic entity type.
UsdReaderModule
@ UsdReaderModule
Definition: dtk_maindoc.hpp:81
Dtk_NodeConnector::_Reset
void _Reset()
Dtk_ID
uint32_t Dtk_ID
Definition: define.h:688
Dtk_transfo
This is the Transformation dedicated class.
Definition: dtk_transfo.hpp:19
CerconReaderModule
@ CerconReaderModule
Definition: dtk_maindoc.hpp:48
Dtk_NodeConnector::SetPointedEntityType
void SetPointedEntityType(const type_detk inPointedEntityType)
Sets the pointed entity Type.
Dtk_NodeConnector
This is the Dtk_NodeConnector Class. .
Definition: dtk_maindoc.hpp:1098
Dtk_DocElement::GetFatherID
Dtk_ID GetFatherID(Dtk_Size_t inIndex) const
Retrieves Dtk_DocElement ith FatherID - read only -.
PlmXmlReaderModule
@ PlmXmlReaderModule
Definition: dtk_maindoc.hpp:55
NavisReaderModule
@ NavisReaderModule
Definition: dtk_maindoc.hpp:77
DTK_TYPE_UNKNOWN
@ DTK_TYPE_UNKNOWN
Definition: define.h:26
Dtk_Component::GetChild
const Dtk_ComponentPtr GetChild(const Dtk_Size_t &inPos) const
Retrieves the ith Dtk_ComponentPtr - read only -.
Definition: dtk_maindoc.hpp:682
Dtk_Node::GetDtk_ModelDisplayPtr
Dtk_ModelDisplayPtr GetDtk_ModelDisplayPtr()
Retrieves the Dtk_Node as a Dtk_ModelDisplayPtr - if exists -.
Dtk_NodeConnector::Support
@ Support
Definition: dtk_maindoc.hpp:1147
Dtk_DocElement::~Dtk_DocElement
virtual ~Dtk_DocElement()
Destructor.
Dtk_Node::FdtType
@ FdtType
Definition: dtk_maindoc.hpp:257
Dtk_Node::FullType::~FullType
~FullType()
Definition: dtk_maindoc.hpp:285
Dtk_NodeConnector::SubEntity::SubEntity
SubEntity(const SubEntity &inTobeCopied)
Definition: dtk_maindoc.hpp:1245
DTK_TYPE_MESH
@ DTK_TYPE_MESH
Definition: define.h:468
Dtk_Component::CatalogComponentType
@ CatalogComponentType
Definition: dtk_maindoc.hpp:576
_3dmReaderModule
@ _3dmReaderModule
Definition: dtk_maindoc.hpp:60
Dtk_Node::GetDtk_KinematicPtr
Dtk_KinematicPtr GetDtk_KinematicPtr()
Retrieves the Dtk_Node as a Dtk_KinematicPtr - if exists -.
Dtk_Node::BodyNodeDataTypeEnum
BodyNodeDataTypeEnum
Definition: dtk_maindoc.hpp:240
Dtk_NodeConnector::GetSubEntities
Dtk_ErrorStatus GetSubEntities(Dtk_tab< Dtk_ID > &outEntitiesIDs, Dtk_tab< type_detk > &outEntitiesTypes) const
Retrieves The connected SubEntities - IDs and types -.
Dtk_Component::AddChild
void AddChild(const Dtk_ComponentPtr &inChild)
Adds a child Dtk_Component to main Component.
Definition: dtk_maindoc.hpp:676
DTK_TYPE_NODE_CONNECTOR
@ DTK_TYPE_NODE_CONNECTOR
Definition: define.h:474
Dtk_MainDoc::GetFatherComponent
Dtk_ComponentPtr GetFatherComponent(const Dtk_ComponentPtr &inComponent, Dtk_Size_t inIndex) const
Retrieves the inIndexth father of the giving Dtk_ComponentPtr.
Dtk_NodeConnector::Create
static Dtk_NodeConnectorPtr Create(const Dtk_NodeConnector &in)
Calls copy constructor to allocate a new object.
Dtk_DocElement::Dtk_DocElement
Dtk_DocElement(const Dtk_ID &inID, Dtk_string inName)
Dtk_DocElement::_Reset
void _Reset()
Dtk_NodeConnector::VerticallyAligned
@ VerticallyAligned
Definition: dtk_maindoc.hpp:1105
Dtk_NodeConnector::ThirdRefBlockSituation_1
@ ThirdRefBlockSituation_1
Definition: dtk_maindoc.hpp:1137
DTK_TYPE_DOC_ELEMENT
@ DTK_TYPE_DOC_ELEMENT
Definition: define.h:501
Dtk_DocElement::GetNumFathers
Dtk_Size_t GetNumFathers() const
GetNumFather.
PsReaderModule
@ PsReaderModule
Definition: dtk_maindoc.hpp:40
Dtk_NodeConnector::GetColorId
Dtk_Int32 GetColorId() const
Retrieves the Color Id for ForceColor connectors.
Dtk_Node::FullType::PrimaryType
NodeDataTypeEnum PrimaryType() const
Definition: dtk_maindoc.hpp:287
Dtk_NodeConnector::ForceColor
@ ForceColor
Definition: dtk_maindoc.hpp:1115
Dtk_NodeConnector::StackedBelow
@ StackedBelow
Definition: dtk_maindoc.hpp:1110
Dtk_NodeConnector::ForceHidden
@ ForceHidden
Definition: dtk_maindoc.hpp:1113
Dtk_Node::NodeHasSolids
Dtk_bool NodeHasSolids() const
Return DTK_TRUE if Dtk_Node Type Body contains solid entity.
Dtk_Node::NodeHasPoints
Dtk_bool NodeHasPoints() const
Return DTK_TRUE if Dtk_Node Type Body or Mesh contains points entity.
Dtk_DocElement::_Private
Dtk_Handle * _Private
Definition: dtk_maindoc.hpp:106
Dtk_NodeConnector::ThirdRefBlockSituation_Common
@ ThirdRefBlockSituation_Common
Definition: dtk_maindoc.hpp:1136
Dtk_NodeConnector::AssociatedYDirection
@ AssociatedYDirection
Definition: dtk_maindoc.hpp:1150
Dtk_DocElement::GetMetaData
Dtk_MetaDataPtr GetMetaData(const Dtk_Size_t &inPos) const
Retrieves the ith Dtk_MetaDataPtr - read only -.
CerecReaderModule
@ CerecReaderModule
Definition: dtk_maindoc.hpp:49
Dtk_NodeConnector::Dtk_NodeConnector
Dtk_NodeConnector(const Dtk_NodeConnector &in)
Copy constructor.
Dtk_NodeConnector::SetRenderId
void SetRenderId(Dtk_ID inRenderId)
Set the Render Id for ForceRender connectors.
Dtk_MainDoc::_Private
Dtk_Handle * _Private
Definition: dtk_maindoc.hpp:942
Dtk_NodeConnector::FirstRefBlockSituation_3
@ FirstRefBlockSituation_3
Definition: dtk_maindoc.hpp:1125
Dtk_Node::NodeDataTypeEnum
NodeDataTypeEnum
Definition: dtk_maindoc.hpp:252
PrcReaderModule
@ PrcReaderModule
Definition: dtk_maindoc.hpp:73
V5ReaderModule
@ V5ReaderModule
Definition: dtk_maindoc.hpp:30
Dtk_DocElement::_typeID
@ _typeID
Definition: dtk_maindoc.hpp:105
Dtk_API::Dtk_Component
friend class Dtk_Component
Definition: dtk_api.hpp:137
Dtk_Node::ModelDisplayType
@ ModelDisplayType
Definition: dtk_maindoc.hpp:264
Dtk_KinematicPtr
Dtk_SmartPtr< Dtk_Kinematic > Dtk_KinematicPtr
Definition: dtk_maindoc.hpp:24
SatReaderModule
@ SatReaderModule
Definition: dtk_maindoc.hpp:42
Dtk_DocElement::_Copy
void _Copy(const Dtk_Node &s)
Dtk_NodeConnector::_Private
Dtk_Handle * _Private
Definition: dtk_maindoc.hpp:1255
Dtk_NodeConnector::AssociatedAxisSystem
@ AssociatedAxisSystem
Definition: dtk_maindoc.hpp:1148
Zw3dReaderModule
@ Zw3dReaderModule
Definition: dtk_maindoc.hpp:80
Dtk_Node::_Private
Dtk_Handle * _Private
Definition: dtk_maindoc.hpp:353
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:53
Dtk_NodeConnector::StackedAbove
@ StackedAbove
Definition: dtk_maindoc.hpp:1109
Dtk_Node::NodeHasMeshSurfaces
Dtk_bool NodeHasMeshSurfaces() const
Return DTK_TRUE if Dtk_Node Type Body contains mesh surface entity.
Dtk_Size_t
size_t Dtk_Size_t
Definition: define.h:711
Dtk_NodeConnector::SubEntity
Definition: dtk_maindoc.hpp:1238
Dtk_MainDoc::SetMultiModelFlag
void SetMultiModelFlag(Dtk_bool inMultiModelFlag)
Set flag to indicate that document contains several independant models.
Dtk_MainDoc::_ReleaseComponents
void _ReleaseComponents()
Dtk_Node::KinematicsType
@ KinematicsType
Definition: dtk_maindoc.hpp:259
XmlReaderModule
@ XmlReaderModule
Definition: dtk_maindoc.hpp:52
DTK_TYPE_AXIS_SYSTEM
@ DTK_TYPE_AXIS_SYSTEM
Definition: define.h:34
Dtk_Node::FullType::SubType
type_detk SubType() const
Definition: dtk_maindoc.hpp:288
Dtk_Node::FullType::FullType
FullType()
Definition: dtk_maindoc.hpp:286
Dtk_DocElement::DtkDynamicCast
static Dtk_DocElement * DtkDynamicCast(Dtk_Object *s)
Performs a dynamic cast - doesn't need RTTI -.
Dtk_DocElement::AddProperty
void AddProperty(const Dtk_PropertiesPtr &inProperty)
Adds a Dtk_PropertiesPtr to the Dtk_DocElement.
Dtk_DocElement::AddMetaDataGroup
void AddMetaDataGroup(const Dtk_MetaDataGroupPtr &inMetaDataGroup, Dtk_bool inAddMetadata=DTK_FALSE)
Adds a Dtk_MetaDataGroupPtr to the Dtk_DocElement.
Dtk_Node::NodeHasAxis
Dtk_bool NodeHasAxis() const
Return DTK_TRUE if Dtk_Node Type Body contains axis entity.
Dtk_NodeConnector::PlacementCategory
@ PlacementCategory
Definition: dtk_maindoc.hpp:1213
Dtk_NodeConnector::SecondRefBlockSituationCategory
@ SecondRefBlockSituationCategory
Definition: dtk_maindoc.hpp:1219
Dtk_NodeConnector::SecondRefBlockSituation_2
@ SecondRefBlockSituation_2
Definition: dtk_maindoc.hpp:1131
dtk_metadata.hpp
Dtk_DocElement::ReleasePreview
void ReleasePreview()
Dtk_NodeID
Dtk_ID Dtk_NodeID
Definition: dtk_maindoc.hpp:88
UnknownModule
@ UnknownModule
Definition: dtk_maindoc.hpp:83
Dtk_Node::BodyType
@ BodyType
Definition: dtk_maindoc.hpp:254
Dtk_NodeConnector::AppearanceCategory
@ AppearanceCategory
Definition: dtk_maindoc.hpp:1216
Dtk_DocElement::_GetChild
const Dtk_DocElementPtr _GetChild(const Dtk_Size_t &inPos) const
Retrieves the ith Dtk_DocElement - read only -.
Dtk_NodeConnector::GetPointingEntityType
Dtk_Node::FullType GetPointingEntityType() const
Retrieves the pointing entity FullType. Should be the FullType of the Dtk_Node containing the Dtk_Nod...
Dtk_Node::CameraType
@ CameraType
Definition: dtk_maindoc.hpp:265
F3dReaderModule
@ F3dReaderModule
Definition: dtk_maindoc.hpp:74
DTK_FALSE
#define DTK_FALSE
Definition: define.h:727
StlReaderModule
@ StlReaderModule
Definition: dtk_maindoc.hpp:67
Dtk_Node::GetDtk_CameraPtr
Dtk_CameraPtr GetDtk_CameraPtr()
Retrieves the Dtk_Node as a Dtk_CameraPtr - if exists -.
Dtk_bool
char Dtk_bool
Definition: define.h:724
ProCeraReaderModule
@ ProCeraReaderModule
Definition: dtk_maindoc.hpp:47
Dtk_DocElement::_ReplaceChild
Dtk_ErrorStatus _ReplaceChild(const Dtk_Size_t &inPos, const Dtk_DocElementPtr &inNewChild)
Replaces a child by another one. Also update father lists.
Dtk_NodeConnector::Clone
virtual Dtk_Object * Clone()
Definition: dtk_maindoc.hpp:1272
AcisReaderModule
@ AcisReaderModule
Definition: dtk_maindoc.hpp:46
Dtk_MainDoc::DevalidateComponent
Dtk_ErrorStatus DevalidateComponent(const Dtk_ComponentID &inComponentID)
Devalidates Component into MainDoc.
Dtk_Component::ReplaceChildComponent
Dtk_ErrorStatus ReplaceChildComponent(const Dtk_Size_t &inPos, const Dtk_ComponentPtr &inNewChild)
Replaces a child Dtk_ComponentPtr by another one. Also updates father lists.
Definition: dtk_maindoc.hpp:692
DtkReaderType
DtkReaderType
Definition: dtk_maindoc.hpp:29
Dtk_NodeConnector::SetColorId
void SetColorId(Dtk_ID inColorId)
Set the Color Id for ForceColor connectors.
Dtk_Node::GetDtk_AxisSystemPtr
Dtk_AxisSystemPtr GetDtk_AxisSystemPtr()
Retrieves the Dtk_Node as a Dtk_AxisSystemPtr - if exists -.
Dtk_MainDoc
This is the Document Class. The Dtk_MainDocPtr object is used as root element produced by a translati...
Definition: dtk_maindoc.hpp:936
Dtk_Component::ComponentAvailabilityEnum
ComponentAvailabilityEnum
Definition: dtk_maindoc.hpp:563
Dtk_NodeConnector::ThirdRefBlockSituation_3
@ ThirdRefBlockSituation_3
Definition: dtk_maindoc.hpp:1139
SwReaderModule
@ SwReaderModule
Definition: dtk_maindoc.hpp:36
Dtk_Node::GetChild
const Dtk_NodePtr GetChild(const Dtk_Size_t &inPos) const
Retrieves the ith Dtk_Node - read only -.
Definition: dtk_maindoc.hpp:390
Dtk_Double64
double Dtk_Double64
Definition: define.h:698
Dtk_MainDoc::CreatePrototypeDtk_Component
Dtk_ComponentPtr CreatePrototypeDtk_Component(Dtk_string inComponentFullPath, Dtk_string inComponentName, const DtkReaderType &inAssociatedModule, const Dtk_Component::ComponentAvailabilityEnum &inAvailability, const int inAdditionnalReferenceFlag=0, Dtk_string inOriginalName=Dtk_string())
Creates a Prototype Dtk_ComponentPtr. This type handles Assemblies and part components.
Dtk_MainDoc::IsMultiModel
Dtk_bool IsMultiModel() const
Indicate that document contains several independant models.
Dtk_Node::GetDtk_LayerInfosSetPtr
Dtk_LayerInfosSetPtr GetDtk_LayerInfosSetPtr()
Retrieves the Dtk_Node as a Dtk_LayerInfosSetPtr - if exists -.
Dtk_mesh
This is a high level mesh class.
Definition: util_mesh_dtk.hpp:485
Dtk_Node::GetAssociatedEntities
Dtk_ErrorStatus GetAssociatedEntities(Dtk_tab< Dtk_NodeConnectorPtr > &outAssociatedEntities)
Retrieves the entities associated to the Dtk_Node. They are retrieved via Dtk_NodeConnectorPtr.
Dtk_Kinematic
Dtk_Kinematic represents a kinematic.
Definition: util_kinematics_dtk.hpp:1828
util_draw_ptr_dtk.hpp
DTK_TYPE_NODE
@ DTK_TYPE_NODE
Definition: define.h:502
CgrReaderModule
@ CgrReaderModule
Definition: dtk_maindoc.hpp:44
Dtk_DocElement::Dtk_MainDoc
friend class Dtk_MainDoc
Definition: dtk_maindoc.hpp:139
Dtk_NodeConnector::_Init
void _Init()
ObjReaderModule
@ ObjReaderModule
Definition: dtk_maindoc.hpp:62
QifReaderModule
@ QifReaderModule
Definition: dtk_maindoc.hpp:78
Dtk_NodeConnector::CheckAssociatedPathComponentID
Dtk_Int32 CheckAssociatedPathComponentID(const Dtk_MainDocPtr &inMainDocPtr)
Checks if the Path Component ID exist into Dtk_MainDocPtr.
Dtk_DocElement::SetInfos
void SetInfos(const Dtk_InfoPtr &inInfos)
Dtk_Node::GetNodeType
NodeDataTypeEnum GetNodeType() const
Retrieves the Dtk_Node Node Type - read only -.
Dtk_Node::GetDtk_DrawingPtr
Dtk_DrawingPtr GetDtk_DrawingPtr()
Retrieves the Dtk_Node as a Dtk_DrawingPtr - if exists -.
Dtk_Component::ComponentType
const ComponentTypeEnum & ComponentType() const
Retrieves the Dtk_Component Type - read only -.
Dtk_NodeConnector::AssociatedGeometry
@ AssociatedGeometry
Definition: dtk_maindoc.hpp:1142
Dtk_Node::GetNodeFullType
const Dtk_Node::FullType GetNodeFullType() const
Retrieves the Node FullType - Primary ans Sub Type - - read only -.
dtk_pnt.hpp
Dtk_LayerInfosSet
This class represents a set of layer information, such as their name and identifier,...
Definition: util_ent_dtk.hpp:515
util_topology_ptr_dtk.hpp
Dtk_Node::AddAssociatedEntities
void AddAssociatedEntities(const Dtk_tab< Dtk_NodeConnectorPtr > &inAssociatedEntities)
Adds associated entities - Dtk_NodeConnectorPtr - to the Dtk_Node.
Dtk_NodeConnector::GetSubEntitiesNb
Dtk_Size_t GetSubEntitiesNb() const
Returns the number of the geometric entities.
Dtk_DocElement::DtkDynamicType
Dtk_Int32 DtkDynamicType(const int &inId)
Retrieves the dynamic entity type.
DxfReaderModule
@ DxfReaderModule
Definition: dtk_maindoc.hpp:54
Dtk_NodeConnector::~Dtk_NodeConnector
~Dtk_NodeConnector()
Destructor.
U3dReaderModule
@ U3dReaderModule
Definition: dtk_maindoc.hpp:57
Dtk_DocElement::Name
const Dtk_string & Name() const
Retrieves the Dtk_DocElement Name - read only -.
Dtk_NodeConnector::DtkDynamicType
Dtk_Int32 DtkDynamicType(const Dtk_Int32 &inId)
Retrieves the dynamic entity type.
Dtk_NodeConnector::Create
static Dtk_NodeConnectorPtr Create()
Calls default constructor to allocate a new object.
IgesReaderModule
@ IgesReaderModule
Definition: dtk_maindoc.hpp:38
Dtk_NodeConnector::ReasonCategoryEnum
ReasonCategoryEnum
Reason Category. Global Category of the NodeConnector uesed to gather Reason into families.
Definition: dtk_maindoc.hpp:1211
Dtk_MainDoc::CreateCatalogDtk_Component
Dtk_ComponentPtr CreateCatalogDtk_Component(Dtk_string inComponentFullPath, Dtk_string inComponentName, Dtk_string inInstanceName, const Dtk_transfo &inTransformationMatrix, const DtkReaderType &inAssociatedModule=UnknownModule, const Dtk_Component::ComponentAvailabilityEnum &inAvailability=Dtk_Component::ComponentInternal, Dtk_string inOriginalName=Dtk_string())
Creates a Catalog Dtk_ComponentPtr.
Dtk_NodeConnector::AssociatedCenterPoint
@ AssociatedCenterPoint
Definition: dtk_maindoc.hpp:1152
Dtk_NodeConnector::AddSubEntity
Dtk_ErrorStatus AddSubEntity(const SubEntity &inSubEntity)
Add a SubEntity - defined by their IDs and Types - to the SubEntities list.
dtk_override_ptr.hpp
_3dXmlReaderModule
@ _3dXmlReaderModule
Definition: dtk_maindoc.hpp:51
Dtk_NodeConnector::StackedRight
@ StackedRight
Definition: dtk_maindoc.hpp:1108
DTK_TYPE_METADATA
@ DTK_TYPE_METADATA
Definition: define.h:507
V6ReaderModule
@ V6ReaderModule
Definition: dtk_maindoc.hpp:53
Dtk_NodeConnector::SetSubEntities
Dtk_ErrorStatus SetSubEntities(const Dtk_tab< Dtk_ID > &inEntitiesIDs, const Dtk_tab< type_detk > &inEntitiesTypes)
Returns the set of Additional Entities defined by their IDs and Types.
SeReaderModule
@ SeReaderModule
Definition: dtk_maindoc.hpp:37
Dtk_FeaturePtr
Dtk_SmartPtr< Dtk_feat > Dtk_FeaturePtr
Definition: dtk_maindoc.hpp:22
Dtk_MeshPtr
Dtk_SmartPtr< Dtk_mesh > Dtk_MeshPtr
Definition: dtk_maindoc.hpp:20
DcmReaderModule
@ DcmReaderModule
Definition: dtk_maindoc.hpp:50
MaxReaderModules
@ MaxReaderModules
Definition: dtk_maindoc.hpp:84
util_ent_dtk.hpp
Dtk_Node
This is the Node Class.
Definition: dtk_maindoc.hpp:236
Dtk_Node::GetStoredInfos
Dtk_StoredInfoPtr GetStoredInfos() const
Dtk_Component::SetAsDeprecated
SetAsDeprecated("2026.3", "Use Dtk_Component::IsAvailabilityFlaggedAs method instead.") const ComponentAvailabilityEnum ComponentAvailability() const
Gives Dtk_Component availability - read only -.
Dtk_DocElement::AddMetaData
void AddMetaData(const Dtk_MetaDataPtr &inMetaData)
Adds a Dtk_MetaDataPtr to the Dtk_DocElement.
Dtk_NodeConnector::ThirdRefBlockSituation_2
@ ThirdRefBlockSituation_2
Definition: dtk_maindoc.hpp:1138
DTK_TYPE_BODY
@ DTK_TYPE_BODY
Definition: define.h:481
RevitReaderModule
@ RevitReaderModule
Definition: dtk_maindoc.hpp:65
Dtk_NodeConnector::ReasonLinkEnumToString
static Dtk_string ReasonLinkEnumToString(const ReasonLinkEnum &inEnum)
Definition: dtk_maindoc.hpp:1157
Dtk_Int32
int32_t Dtk_Int32
Definition: define.h:686
Dtk_Node::FullType
This is the Node FullType Class The Dtk_Node::FullType object is used to retrieve the full informatio...
Definition: dtk_maindoc.hpp:275
ArtReaderModule
@ ArtReaderModule
Definition: dtk_maindoc.hpp:71
Dtk_Component::ComponentAvailabilityEnumToString
static Dtk_string ComponentAvailabilityEnumToString(const ComponentAvailabilityEnum &inEnum)
Definition: dtk_maindoc.hpp:581
Dtk_Node::MetaDataType
@ MetaDataType
Definition: dtk_maindoc.hpp:263
dtk_maindoc_ptr.hpp
Dtk_Node::NullType
@ NullType
Definition: dtk_maindoc.hpp:253
Dtk_NodeConnector::ForceRender
@ ForceRender
Definition: dtk_maindoc.hpp:1116
Dtk_NodeConnector::Context
@ Context
Definition: dtk_maindoc.hpp:1154
Dtk_Node::GetDtk_ConstraintPtr
Dtk_ConstraintPtr GetDtk_ConstraintPtr()
Retrieves the Dtk_Node as a Dtk_ConstraintPtr - if exists -.
V4ReaderModule
@ V4ReaderModule
Definition: dtk_maindoc.hpp:33
Dtk_Component::ComponentTypeEnum
ComponentTypeEnum
Definition: dtk_maindoc.hpp:573
Dtk_MainDoc::CreateInstanceDtk_Component
Dtk_ComponentPtr CreateInstanceDtk_Component(const Dtk_ComponentPtr &inPrototype, Dtk_string inInstanceName, const Dtk_transfo &inTransformationMatrix)
Creates a physical Dtk_ComponentPtr.
Dtk_Component::ComponentTypeEnumToString
static Dtk_string ComponentTypeEnumToString(const ComponentTypeEnum &inEnum)
Definition: dtk_maindoc.hpp:597
Dtk_Node::ConstraintType
@ ConstraintType
Definition: dtk_maindoc.hpp:267
Dtk_DocElement::GetInfos
Dtk_InfoPtr GetInfos() const
Retrieves the Dtk_DocElement Dtk_InfoPtr - read only -.
Dtk_NodeConnector::ForceClipped
@ ForceClipped
Definition: dtk_maindoc.hpp:1117
StepReaderModule
@ StepReaderModule
Definition: dtk_maindoc.hpp:39
DstvReaderModule
@ DstvReaderModule
Definition: dtk_maindoc.hpp:75
Dtk_SmartPtr::DtkDynamicCast
static Dtk_SmartPtr< T > DtkDynamicCast(const Dtk_SmartPtr< T2 > &p)
Definition: util_ptr_dtk.hpp:101
Dtk_Node::DtkDynamicCast
static Dtk_Node * DtkDynamicCast(Dtk_Object *s)
Performs a dynamic cast - doesn't need RTTI -.
Dtk_NodeConnector::GetAssociatedComponentID
Dtk_ID GetAssociatedComponentID() const
Returns the Component ID referenced by the connector.
error_dtk.hpp
Dtk_NodeConnector::HorizontallyAligned
@ HorizontallyAligned
Definition: dtk_maindoc.hpp:1106
Dtk_Node::AddChild
void AddChild(const Dtk_NodePtr &inChild)
Adds a child Dtk_Node to main Node.
Definition: dtk_maindoc.hpp:384
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
Dtk_DocElement::GetNumChildren
Dtk_Size_t GetNumChildren() const
Retrieves the number of the Dtk_DocElement children - read only -.
Dtk_Node::SetStoredInfos
void SetStoredInfos(const Dtk_StoredInfoPtr &inInfos)
SdnfReaderModule
@ SdnfReaderModule
Definition: dtk_maindoc.hpp:70
Dtk_NodeConnector::FirstRefBlockSituationCategory
@ FirstRefBlockSituationCategory
Definition: dtk_maindoc.hpp:1218
Dtk_NodeConnector::GetPointedEntityType
type_detk GetPointedEntityType() const
Retrieves the pointed entity Type.
Dtk_NodeConnector::GetAssociatedPathComponentID
void GetAssociatedPathComponentID(Dtk_tab< Dtk_ID > &outAssociatedPathComponentID) const
DTK_TYPE_FDT
@ DTK_TYPE_FDT
Definition: define.h:424
Dtk_NodeConnector::ThirdRefBlockSituationCategory
@ ThirdRefBlockSituationCategory
Definition: dtk_maindoc.hpp:1220
Dtk_Node::LayerInfosSetType
@ LayerInfosSetType
Definition: dtk_maindoc.hpp:261
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
Dtk_Node::AddAssociatedEntity
void AddAssociatedEntity(const Dtk_NodeConnectorPtr &inAssociatedEntity)
Retrieves the Dtk_Node as a Dtk_KinematicsPtr - if exists -.
Dtk_NodeConnector::SetReasonLink
void SetReasonLink(const ReasonLinkEnum inReasonLink)
Sets the Reason Link of the Dtk_NodeConnector to specify the reason of the connection.
Dtk_Component::ComponentInternal
@ ComponentInternal
Definition: dtk_maindoc.hpp:566
Dtk_NodeConnector::ReasonCategoryEnumToString
static Dtk_string ReasonCategoryEnumToString(const ReasonCategoryEnum &inEnum)
Definition: dtk_maindoc.hpp:1222
VdaReaderModule
@ VdaReaderModule
Definition: dtk_maindoc.hpp:31
Dtk_Node::NodeHasCurves
Dtk_bool NodeHasCurves() const
Return DTK_TRUE if Dtk_Node Type Body or Mesh contains curves entity.
Dtk_DocElement::GetID
Dtk_ID GetID() const
Retrieves the Dtk_DocElement ID - read only -.
Dtk_Node::GetDtk_MetaDataPtr
Dtk_MetaDataPtr GetDtk_MetaDataPtr()
Retrieves the Dtk_Node as a Dtk_MetaDataPtr - if exists -.
DTK_TYPE_DOCUMENT
@ DTK_TYPE_DOCUMENT
Definition: define.h:500
Dtk_DocElement::SetPreview
void SetPreview(Dtk_PreviewPtr inPreview)
Dtk_NodeConnector::Dtk_NodeConnector
Dtk_NodeConnector()
Default constructor.
Dtk_MainDoc::SetRootComponent
void SetRootComponent(const Dtk_ComponentPtr &inRootComponent)
Set the root Dtk_ComponentPtr.
Dtk_NodeConnector::SetAssociatedComponentID
void SetAssociatedComponentID(const Dtk_ID &inComponentID)
Sets the component ID.
dtk_transfo.hpp
Dtk_pnt
This is a mathematical point class.
Definition: dtk_pnt.hpp:20
type_detk
type_detk
Definition: define.h:21
Dtk_DocElement::GetMetaDataGroup
Dtk_MetaDataGroupPtr GetMetaDataGroup(const Dtk_Size_t &inPos) const
Retrieves the ith Dtk_MetaDataGrouplPtr - read only -.
Dtk_NodeConnector::ForceVisible
@ ForceVisible
Definition: dtk_maindoc.hpp:1114
Dtk_MainDoc::GetNumComponents
Dtk_Size_t GetNumComponents() const
Give number of Components in the Dtk_MainDoc (useful if you want to handle progress bar).
Dtk_NodeConnector::PositionallyFixed
@ PositionallyFixed
Definition: dtk_maindoc.hpp:1111
Dtk_NodeConnector::get_type_detk
type_detk get_type_detk() const
Definition: dtk_maindoc.hpp:1294
util_stl_dtk.hpp
Dtk_NodeConnector::HighlightedGeometry
@ HighlightedGeometry
Definition: dtk_maindoc.hpp:1146
Dtk_DocElement::SetReadID
void SetReadID(const Dtk_ID &inNewID)
Dtk_Component::AddComponentAvailability
Dtk_ErrorStatus AddComponentAvailability(ComponentAvailabilityEnum inComponentAvailability)
Dtk_Node::ReplaceChildNode
Dtk_ErrorStatus ReplaceChildNode(const Dtk_Size_t &inPos, const Dtk_NodePtr &inNewChild)
Replaces a child Dtk_NodePtr by another one. Also updates father lists.
Definition: dtk_maindoc.hpp:400
Dtk_NodeConnector::SubEntity::SubEntity
SubEntity(const Dtk_ID inSubEntityID, const type_detk inSubEntityType)
Definition: dtk_maindoc.hpp:1244
Dtk_NodeConnector::SetSubEntities
Dtk_ErrorStatus SetSubEntities(const Dtk_tab< SubEntity > &inSubEntities)
Sets of SubEntities - defined by their IDs and Types -.
Dtk_Node::NodeDataTypeEnumToString
static Dtk_string NodeDataTypeEnumToString(const NodeDataTypeEnum &inEnum)
Definition: dtk_maindoc.hpp:292
Dtk_Node::GetDtk_MeshPtr
Dtk_MeshPtr GetDtk_MeshPtr()
Retrieves the Dtk_Node as a Dtk_meshPtr - if exists -.
util_ptr_dtk.hpp
define.h
Dtk_MainDoc::_ReleaseNodeConnectors
void _ReleaseNodeConnectors()
Dtk_Component::DtkDynamicCast
static Dtk_Component * DtkDynamicCast(Dtk_Object *s)
Performs a dynamic cast - doesn't need RTTI -.
DTK_TYPE_COMPONENT
@ DTK_TYPE_COMPONENT
Definition: define.h:503
Dtk_NodeConnector::GetRenderId
Dtk_ID GetRenderId() const
Retrieves the Render Id for ForceRender connectors.
Dtk_NodeConnector::SubEntity::SubEntity
SubEntity()
Definition: dtk_maindoc.hpp:1243
Dtk_NodeConnector::VisibilityCategory
@ VisibilityCategory
Definition: dtk_maindoc.hpp:1215
Dtk_MainDoc::DtkDynamicType
Dtk_Int32 DtkDynamicType(const int &inId)
Retrieves the dynamic entity type.
Dtk_Node::NodeDataStringToEnumType
static Dtk_Int32 NodeDataStringToEnumType(const Dtk_string &type)
Definition: dtk_maindoc.hpp:315
Dtk_tab< Dtk_NodeConnectorPtr >
DwgDtkReaderModule
@ DwgDtkReaderModule
Definition: dtk_maindoc.hpp:79
Dtk_Node::GetDtk_AdvancedFeaturePtr
Dtk_ObjectPtr GetDtk_AdvancedFeaturePtr()
Retrieves the Dtk_Node as a Dtk_AdvancedFeaturePtr - if exists - Internal Use !!!
Dtk_Node::GetDtk_FdtPtr
Dtk_FdtPtr GetDtk_FdtPtr()
Retrieves the Dtk_Node as a Dtk_FdtPtr - if exists -.
Dtk_DocElement::GetNumMetaData
Dtk_Size_t GetNumMetaData() const
Retrieves the number of the Dtk_MetaDataPtr - read only -.
Dtk_DocElement::SetAsDeprecated
SetAsDeprecated("2026.3", "use GetInfos()->GetRenderInfos and GetInfos()->GetPhysicalMaterialInfos methods instead.") Dtk_MaterialPtr GetMaterial() const
Retrieves the Dtk_DocElement Dtk_MaterialPtr - read only -.
DTK_TYPE_CONSTRAINT
@ DTK_TYPE_CONSTRAINT
Definition: define.h:599
Dtk_DocElement::GetReadID
void GetReadID(Dtk_ID &outReadID) const
Dtk_NodeConnector::DefaultAnnotationLink
@ DefaultAnnotationLink
Definition: dtk_maindoc.hpp:1145
CgmReaderModule
@ CgmReaderModule
Definition: dtk_maindoc.hpp:69
Dtk_NodeConnector::GetReasonLink
Dtk_NodeConnector::ReasonLinkEnum GetReasonLink(ReasonCategoryEnum &outReasonCategory) const
Gets the Reason Link of the Dtk_NodeConnector to specify the reason of the connection.
FbxReaderModule
@ FbxReaderModule
Definition: dtk_maindoc.hpp:68
Dtk_NodeConnector::GetNodeId
Dtk_ID GetNodeId() const
Returns the Node id referenced by the connector.
Dtk_MainDoc::DtkDynamicCast
static Dtk_MainDoc * DtkDynamicCast(Dtk_Object *s)
Performs a dynamic cast - doesn't need RTTI -.
Dtk_NodeConnector::SecondRefBlockSituation_Common
@ SecondRefBlockSituation_Common
Definition: dtk_maindoc.hpp:1129
SmgReaderModule
@ SmgReaderModule
Definition: dtk_maindoc.hpp:72
Dtk_NodeConnector::SecondRefBlockSituation_3
@ SecondRefBlockSituation_3
Definition: dtk_maindoc.hpp:1132
IfcReaderModule
@ IfcReaderModule
Definition: dtk_maindoc.hpp:63
DTK_TYPE_NO_SUBTYPE
@ DTK_TYPE_NO_SUBTYPE
Definition: define.h:532
Dtk_NodeConnector::GeneralAssociationCategory
@ GeneralAssociationCategory
Definition: dtk_maindoc.hpp:1214
Dtk_Node::GetDtk_ColorInfosSetPtr
Dtk_ColorInfosSetPtr GetDtk_ColorInfosSetPtr()
Retrieves the Dtk_Node as a Dtk_ColorInfosSetPtr - if exists -.
Dtk_Component::PrototypeComponentType
@ PrototypeComponentType
Definition: dtk_maindoc.hpp:575
Dtk_Node::GetDtk_FeaturePtr
Dtk_FeaturePtr GetDtk_FeaturePtr()
Retrieves the Dtk_Node as a Dtk_FeaturePtr - if exists -.
Dtk_NodeConnector::FirstRefBlockSituation_Common
@ FirstRefBlockSituation_Common
Definition: dtk_maindoc.hpp:1122
Dtk_DocElement
This is the Main Doc Element Class The Dtk_DocElement object is common parent class of the Dtk_Node a...
Definition: dtk_maindoc.hpp:102
Dtk_Node::ColorInfosSetType
@ ColorInfosSetType
Definition: dtk_maindoc.hpp:262
XmtReaderModule
@ XmtReaderModule
Definition: dtk_maindoc.hpp:35
Dtk_DocElement::GetNumMetaDataGroup
Dtk_Size_t GetNumMetaDataGroup() const
Retrieves the number of the Dtk_MetaDataGroupPtr - read only -.
Dtk_string::len
int len() const
Retrieve the length of the Dtk_string.
Dtk_NodeConnector::FirstRefBlockSituation_1
@ FirstRefBlockSituation_1
Definition: dtk_maindoc.hpp:1123
Dtk_Object
Definition: dtk_object.hpp:8
Dtk_Component
This is the Component Class. The Dtk_ComponentPtr object is used as element into an assembly tree....
Definition: dtk_maindoc.hpp:560
Dtk_NodeConnector::SetAssociatedPathComponentID
void SetAssociatedPathComponentID(const Dtk_tab< Dtk_ID > &inPathComponentID)
Sets the Path Component ID from Root to Target.
Dtk_DocElement::_AddChild
void _AddChild(const Dtk_DocElementPtr &inChild)
Adds a child Dtk_DocElement to main Element.
dtk_string.hpp
InvReaderModule
@ InvReaderModule
Definition: dtk_maindoc.hpp:32
Dtk_NodeConnector::SubEntity::operator==
friend Dtk_bool operator==(const SubEntity &, const SubEntity &)
Dtk_MainDoc::Create
static Dtk_MainDocPtr Create()
Calls default constructor to allocate a new object.
Dtk_ComponentID
Dtk_ID Dtk_ComponentID
Definition: dtk_maindoc.hpp:87
Dtk_NodeConnector::SubEntity::GetSubEntityType
type_detk GetSubEntityType() const
Definition: dtk_maindoc.hpp:1249
Dtk_MainDoc::GetNumFatherComponent
Dtk_Size_t GetNumFatherComponent(const Dtk_ComponentPtr &inComponent)
Retrieves the inIndexth father of the giving Dtk_ComponentPtr.
JtReaderModule
@ JtReaderModule
Definition: dtk_maindoc.hpp:43
Dtk_NodeConnector::AssociatedZDirection
@ AssociatedZDirection
Definition: dtk_maindoc.hpp:1151
Dtk_NodeConnector::StackedLeft
@ StackedLeft
Definition: dtk_maindoc.hpp:1107
Dtk_MainDoc::CreateVirtualDtk_Component
Dtk_ComponentPtr CreateVirtualDtk_Component(Dtk_string inComponentName, const DtkReaderType &inAssociatedModule, Dtk_string inComponentFullPath, const Dtk_Component::ComponentAvailabilityEnum &inAvailability)
Creates a virtual Dtk_ComponentPtr.
catiav5w::inInstanceName
const Dtk_string & inInstanceName
Definition: catiav5w.hpp:601
CreoviewReaderModule
@ CreoviewReaderModule
Definition: dtk_maindoc.hpp:66
Dtk_Component::_ReleaseVolatileData
void _ReleaseVolatileData()
Dtk_Node::VirtualType
@ VirtualType
Definition: dtk_maindoc.hpp:266
PdfReaderModule
@ PdfReaderModule
Definition: dtk_maindoc.hpp:58
Dtk_NodeConnector::AssociatedXDirection
@ AssociatedXDirection
Definition: dtk_maindoc.hpp:1149
Dtk_DocElement::_Init
void _Init()
Dtk_NodeConnector::GetSubEntities
Dtk_ErrorStatus GetSubEntities(Dtk_tab< SubEntity > &outSubEntities) const
Retrieves the SubEntities array - defined by their IDs and Types -.
Dtk_Node::DrawingType
@ DrawingType
Definition: dtk_maindoc.hpp:258
Dtk_Node::GetEntityID
Dtk_NodeID GetEntityID() const
Retrieves the Dtk_Node EntityID - read only -.
Dtk_Node::NodeHasSurfaces
Dtk_bool NodeHasSurfaces() const
Return DTK_TRUE if Dtk_Node Type Body contains surfacic entity.
GltfReaderModule
@ GltfReaderModule
Definition: dtk_maindoc.hpp:76
Dtk_Node::NodeHasMesh
Dtk_bool NodeHasMesh() const
Return DTK_TRUE if Dtk_Node Type Body or Mesh contains mesh entity.
Dtk_NodeConnector::OrientationallyFixed
@ OrientationallyFixed
Definition: dtk_maindoc.hpp:1112
Dtk_DocElement::Name
Dtk_string & Name()
Dtk_NodeConnector::SecondRefBlockSituation_1
@ SecondRefBlockSituation_1
Definition: dtk_maindoc.hpp:1130
Dtk_Node::AxisSystemType
@ AxisSystemType
Definition: dtk_maindoc.hpp:260
Dtk_Node::DtkDynamicType
Dtk_Int32 DtkDynamicType(const int &inId)
Retrieves the dynamic entity type.
Dtk_NodeConnector::FirstRefBlockSituation_2
@ FirstRefBlockSituation_2
Definition: dtk_maindoc.hpp:1124
Dtk_NodeConnector::SubEntity::~SubEntity
~SubEntity()
Definition: dtk_maindoc.hpp:1246
Dtk_NodeConnector::AddSubEntities
Dtk_ErrorStatus AddSubEntities(const Dtk_tab< SubEntity > &inSubEntities)
Add a set of SubEntities - defined by their IDs and Types - to the SubEntities list.
Dtk_Node::GetNodeSubType
type_detk GetNodeSubType() const
Retrieves the Node SubType - if relevant - - read only -.
Dtk_NodeConnector::SubPMI
@ SubPMI
Definition: dtk_maindoc.hpp:1144
Dtk_NodeConnector::DtkDynamicCast
static Dtk_NodeConnector * DtkDynamicCast(Dtk_Object *s)
Performs a dynamic cast - doesn't need RTTI -.
Dtk_NodeConnector::AssociatedFeature
@ AssociatedFeature
Definition: dtk_maindoc.hpp:1143
Dtk_MainDoc::GetNumInstances
Dtk_Int32 GetNumInstances() const
Give number of InstanceComponents in the Dtk_MainDoc.
Dtk_DocElement::GetPreview
Dtk_PreviewPtr GetPreview() const
Retrieves the Dtk_DocElement Dtk_PreviewPtr - read only -.
Dtk_Component::ComponentTypeStringToInt
static Dtk_Int32 ComponentTypeStringToInt(const Dtk_string &name)
Definition: dtk_maindoc.hpp:610
BRepOccReaderModule
@ BRepOccReaderModule
Definition: dtk_maindoc.hpp:64
Dtk_Node::MeshType
@ MeshType
Definition: dtk_maindoc.hpp:255
Dtk_Node::GetDtk_BodyPtr
Dtk_BodyPtr GetDtk_BodyPtr()
Retrieves the Dtk_Node as a Dtk_BodyPtr - if exists -.
dtk_object.hpp
Dtk_MainDoc::GetAdditionalReferenceList
Dtk_ErrorStatus GetAdditionalReferenceList(Dtk_tab< Dtk_string > &outFileList) const
return list of additional reference files into MainDoc.
Dtk_API
Definition: dtk_api.hpp:75
Dtk_MainDoc::GetMissingComponentList
Dtk_ErrorStatus GetMissingComponentList(Dtk_tab< Dtk_string > &outFileList) const
return list of missing files into MainDoc.
ProeReaderModule
@ ProeReaderModule
Definition: dtk_maindoc.hpp:41
Dtk_Component::_Private
Dtk_Handle * _Private
Definition: dtk_maindoc.hpp:631
UgReaderModule
@ UgReaderModule
Definition: dtk_maindoc.hpp:34
Lava3mReaderModule
@ Lava3mReaderModule
Definition: dtk_maindoc.hpp:56
DwgReaderModule
@ DwgReaderModule
Definition: dtk_maindoc.hpp:61
Dtk_NodeConnector::GetAssociatedPathComponentID
const Dtk_tab< Dtk_ID > & GetAssociatedPathComponentID() const
Returns the Path Component ID referenced by the connector from Root to Target.
Dtk_Component::_ReleaseNodes
void _ReleaseNodes()
Dtk_NodeConnector::SubEntity::GetSubEntityId
Dtk_ID GetSubEntityId() const
Definition: dtk_maindoc.hpp:1248
Dtk_MainDoc::RootComponent
const Dtk_ComponentPtr & RootComponent() const
Retrieves the root Dtk_ComponentPtr of the Dtk_MainDoc.