DATAKIT SDK  V2026.2
util_topology_dtk.hpp
Go to the documentation of this file.
1 #ifndef _UTIL_TOPOLOGY_DTK_HPP_
2 #define _UTIL_TOPOLOGY_DTK_HPP_
3 
4 
5 class Dtk_Coedge;
6 class Dtk_Edge;
7 class Dtk_Loop;
8 class Dtk_Face;
9 class Dtk_Shell;
10 class Dtk_Volume;
11 class Dtk_Lump;
12 class Dtk_Body;
13 
14 #include "util/util_geom_dtk.hpp"
16 #include <cstdio>
17 #include "def/define.h"
18 #include <unordered_map>
19 
21 {
25 };
26 
28 {
29 protected:
31 
33  Dtk_TopologicalEntity(const Dtk_TopologicalEntity& inToBeCopied) : Dtk_Entity(inToBeCopied){}
35  friend class Dtk_SmartPtr<Dtk_TopologicalEntity>;
36  friend class Dtk_Body;
37  virtual void _Clone( Dtk_TopologicalEntityPtr &outTopo,Dtk_Body * _inParentBody) = 0;
38  virtual Dtk_Object* Clone() {return NULL;}
39 
40 public:
41  virtual Dtk_ID GetTopoID() const;
42  virtual Dtk_ErrorStatus SetParentBody(const Dtk_BodyPtr &inParentBody);
43  virtual Dtk_BodyPtr GetParentBody() const = 0;
44  //! \brief Get smart pointer type
45  //! \param [in] inId :
46  //! \return int
47  int DtkDynamicType(const int& inId);
48  //! \brief Cast object in vertex
49  //! \param [in] inObject : object to cast
50  //! \return static Dtk_Vertex or NULL
52  //! \brief Return Type of entity
53  //! \return enum type_detk
54  virtual enum type_detk get_type_detk() const;
55  //! \brief Transform object
56  //! \param [in] inTransfo : matrix to apply
57  //! \return Dtk_ErrorStatus
59 };
60 
61 //! \ingroup TOPO
62 //! \class Dtk_Vertex
63 //! \brief Vertex indicates bound of an edge. Vertex has Dtk_Point as geometry value
64 //! \SmartPtr{Dtk_VertexPtr}
66 {
67 protected:
68  struct Dtk_Handle; // Not defined here
69  Dtk_Handle *_Private; // Handle
70  enum { _typeID = DTK_TYPE_VERTEX };
71 
72 
73 
74  void _Init();
75  void _Reset();
76  void _Copy(const Dtk_Vertex &inTopo, Dtk_Body *inParentBody);
78  Dtk_Vertex(const Dtk_Vertex &inTopo, Dtk_Body *inParentBody);
79  virtual ~Dtk_Vertex();
80  void _Clone( Dtk_TopologicalEntityPtr &outTopo,Dtk_Body * _inParentBody);
81  friend class Dtk_SmartPtr<Dtk_Vertex>;
82  friend class Dtk_TopologicalEntity;
83 
84 public:
85 
86  Dtk_ID GetTopoID() const;
87 
90 //! \brief Create a vertex in a body
91 //! \param [in] inParentBody : parent body
92 //! \return Dtk_VertexPtr created
93  static Dtk_VertexPtr Create(const Dtk_BodyPtr &inParentBody);
94 //! \brief Get smart pointer type
95 //! \param [in] inId :
96 //! \return int
97  int DtkDynamicType(const int& inId);
98 //! \brief Cast object in vertex
99 //! \param [in] inObject : object to cast
100 //! \return Casted Dtk_Vertex pointer or NULL
101  static Dtk_Vertex * DtkDynamicCast(Dtk_Object * inObject);
102 //! \brief Return Type of entity
103 //! \return enum type_detk
104  enum type_detk get_type_detk() const;
105 //! \brief Return Number of Parent Edge
106 //! \return Dtk_Size_t
108 //! \brief Return parent edge at inIndex
109 //! \param [in] inIndex : index of parent edge
110 //! \param [out] outParentEdge : pointer of parent edge
111 //! \return Dtk_ErrorStatus: dtkNoError if OK
112  Dtk_ErrorStatus GetParentEdge(const Dtk_Size_t& inIndex,Dtk_EdgePtr &outParentEdge) const;
113 //! \brief Add parent Edge
114 //! \param [in] inParentEdge : pointer of parent edge
115 //! \return Dtk_ErrorStatus: dtkNoError if OK
117 //! \brief Add parent Edge
118 //! \param [in] inParentEdgeId : UUID of parent edge
119 //! \return Dtk_ErrorStatus: dtkNoError if OK
120  Dtk_ErrorStatus AddParentEdge(const Dtk_ID &inParentEdgeId);
121 //! \brief Return associated geometry
122 //! \return Dtk_PointPtr
124 //! \brief Set Geometry
125 //! \param [in] inPoint : Point
126 //! \return void
127  void SetGeom(const Dtk_PointPtr& inPoint);
128  //! \brief Get Tolerance
129  //! \deprecated
130  //! \return double Tolerance
131  //! \deprecated Use GetTolerance(Dtk_Double64 &outTolerance) method instead.
132  SetAsDeprecated("2022.1", "Use GetTolerance(Dtk_Double64 &outTolerance) method instead.")
134 
135  //! \brief Get Tolerance
136  //! \param [out] outTolerance : vertex tolerance
137  //! \return dtkNoError if value set or dtkWarningDefaultValue if default
139 
140  //! \brief Set Tolerance
141  //! \param [in] inTol : Tolerance
143 
144  //! \brief Internal Use
145  virtual Dtk_ErrorStatus _Store(void*);
146  //! \brief Internal Use
147  virtual Dtk_Size_t GetSize() const;
148 };
149 
150 
151 //! \ingroup TOPO
152 //! \class Dtk_Edge
153 //! \brief Edge has two vertex for bounds. It has a 3D curve as geometry value
154 //! \brief Geometrical orientation relative to 3D Curve is always True
155 //! \SmartPtr{Dtk_EdgePtr}
157 {
158 protected:
159  struct Dtk_Handle; // Not defined here
160  Dtk_Handle *_Private; // Handle
161  enum { _typeID = DTK_TYPE_EDGE };
162 
163  void _Init();
164  void _Reset();
165  void _Copy(const Dtk_Edge &inTopo, Dtk_Body *inParentBody);
166  void _Clone( Dtk_TopologicalEntityPtr &outTopo,Dtk_Body * _inParentBody);
167 
169  Dtk_Edge(const Dtk_Edge& inEdgeTpCopy, Dtk_Body *inParentBody);
170  virtual ~Dtk_Edge();
171  friend class Dtk_SmartPtr<Dtk_Edge>;
172  friend class Dtk_TopologicalEntity;
173 
174 public:
175  Dtk_ID GetTopoID() const;
176 
179 
180  //! \brief Create an edge in a body
181  //! \param [in] inParentBody : parent body
182  //! \return Dtk_EdgePtr created
183  static Dtk_EdgePtr Create(const Dtk_BodyPtr &inParentBody);
184 
185  int DtkDynamicType(const int& inId);
186  static Dtk_Edge * DtkDynamicCast(Dtk_Object * inObject);
187 
188  //! \brief Get Start Vertex for edge
189  //! \param [out] :outVertex start vertex of edge
190  //! \return Dtk_ErrorStatus: dtkNoError if OK
192  Dtk_ErrorStatus GetStartVertex(Dtk_ID &outVertexId) const;
193  //! \brief Set Start Vertex for edge
194  //! \param [in] :inVertex start vertex to set
195  //! \return Dtk_ErrorStatus: dtkNoError if OK
198 
199  //! \brief Get End Vertex for edge
200  //! \param [out] :outVertex end vertex of edge
201  //! \return Dtk_ErrorStatus: dtkNoError if OK
203  Dtk_ErrorStatus GetEndVertex(Dtk_ID &outVertexId) const;
204 
205  //! \brief Set End Vertex for edge
206  //! \param [in] :inVertex end vertex to set
207  //! \return Dtk_ErrorStatus: dtkNoError if OK
210 
211  //! \brief Get Number of coedges
212  //! \return Number of coedges
214 
215  //! \brief Get Corresponding coedges from index
216  //! \param [in] :inIndex coedge index
217  //! \param [out] :outSecondCoedge coedge pointer
218  //! \return Dtk_ErrorStatus: dtkNoError if OK
219  Dtk_ErrorStatus GetParentCoedge(const Dtk_Size_t &inIndex,Dtk_CoedgePtr &outCoedge) const;
220  Dtk_ErrorStatus GetParentCoedge(const Dtk_Size_t &inIndex,Dtk_ID &outCoedgeId) const;
221 
222  //! \brief Set Corresponding coedges
223  //! \param [in] :inFirstCoedge
224  //! \param [in] :inSecondCoedge
225  //! \return Dtk_ErrorStatus: dtkNoError if OK
226  Dtk_ErrorStatus SetCoedges(const Dtk_CoedgePtr& inFirstCoedge,const Dtk_CoedgePtr& inSecondCoedge);
227 
228  //! \brief Add a Coedge to Edge
229  //! \param [in] :inCoedge
230  //! \return Dtk_ErrorStatus: dtkNoError if OK
232  Dtk_ErrorStatus AddCoedge(const Dtk_ID& inCoedgeId);
233 
234  //! \brief Remove a Coedge to Edge's list of coedges
235  //! \param [in] :inCoedge
236  void RemoveCoedge(const Dtk_ID &inCoedgeId);
237 
238 
239  enum type_detk get_type_detk() const;
240 
241  //! \brief Get edge geometry
242  //! \param [in] :inWithVerticesTrim if DTK_TRUE Curve is trimmed with vertices of edge
243  //! \return Dtk_CurvePtr
244  Dtk_CurvePtr GetGeom(Dtk_bool inWithVerticesTrim = DTK_TRUE) const;
245  //! \brief Set Geometry
246  //! \param [in] inCurve3D : 3D curve supporting the edge
247  //! \return void
248  void SetGeom(const Dtk_CurvePtr& inCurve3D);
249  //! \brief Get Tolerance
250  //! \deprecated Use GetTolerance(Dtk_Double64 &outTolerance) method instead.
251  //! \return double Tolerance
252  SetAsDeprecated("2022.1", "Use GetTolerance(Dtk_Double64 &outTolerance) method instead.")
254 
255  //! \brief Get Tolerance
256  //! \param [out] outTolerance : edge tolerance
257  //! \return dtkNoError if value set or dtkWarningDefaultValue if default
259 
260  //! \brief Set Tolerance
261  //! \param [in] inTol : Tolerance
263 
264  //! \brief Internal Use
265  virtual Dtk_ErrorStatus _Store(void*);
266 
267  //! \brief Internal Use
268  virtual Dtk_Size_t GetSize() const;
269 };
270 
271 //! \ingroup TOPO
272 //! \class Dtk_Coedge
273 //! \brief Dtk_Coedge is a part of a loop. It's geometry is a UV curve on a surface
274 //! \brief Orientation is topological orientation relative to Edge
275 //! \brief Geometrical orientation relative to UV Curve is always True
276 //! \SmartPtr{Dtk_CoedgePtr}
278 {
279 protected:
280  struct Dtk_Handle; // Not defined here
281  Dtk_Handle *_Private; // Handle
283 
284  void _Init();
285  void _Reset();
286 
287  void _Copy(const Dtk_Coedge &inTopo,Dtk_Body *inParentBody);
288  void _Clone( Dtk_TopologicalEntityPtr &outTopo,Dtk_Body * _inParentBody);
289 
291  Dtk_Coedge(const Dtk_Coedge& inCoedgeToCopy,Dtk_Body *inParentBody);
292  virtual ~Dtk_Coedge();
293  friend class Dtk_SmartPtr<Dtk_Coedge>;
294  friend class Dtk_TopologicalEntity;
295 
296 public:
297  Dtk_ID GetTopoID() const;
298 
301 
302  //! \brief Create a coedge in a body
303  //! \param [in] inParentBody : parent body
304  //! \return Dtk_CoedgePtr created
305  static Dtk_CoedgePtr Create(const Dtk_BodyPtr &inParentBody);
306 
307  //downcasting
308  int DtkDynamicType(const int& inId);
309  static Dtk_Coedge * DtkDynamicCast(Dtk_Object * inObject);
310 
311  //! \brief Return orientation for coedge relative to Edge
312  //! \return True if coedge and associated Edge has same sens
314  //! \brief Set orientation for coedge relative to Edge
315  //! \param [in] :inOrientation true if coedge and associated Edge has same sens
316  //! \return Dtk_ErrorStatus: dtkNoError if OK
317  Dtk_ErrorStatus SetOrientation(const Dtk_bool& inOrientation);
318 
319  //! \brief Indicates if Coedge is degenerated or not
320  //! \return DTK_TRUE, DTK_FALSE, or DTK_BOOL_UNKNOWN
322  //! \brief Active Degenerated flag for coedge
323  //! \return Dtk_ErrorStatus: dtkNoError if OK
325 
326 
327  //! \brief Get Edge for coedge
328  //! \param [out] :outEdge Corresponding Edge
329  //! \return Dtk_ErrorStatus: dtkNoError if OK
331 
332  //! \brief Set Edge for coedge
333  //! \param [in] :inEdge Corresponding Edge
334  //! \return Dtk_ErrorStatus: dtkNoError if OK
336  Dtk_ErrorStatus SetEdge(const Dtk_ID &inEdgeId);
337 
338  //! \brief Get Number of adjacent coedges
339  //! \return Number of adjacent coedges
341 
342  //! \brief Get adjacent coedges from index
343  //! \param [in] :inIndex coedge index
344  //! \param [out] :outAdjacentCoedge coedge pointer
345  //! \return Dtk_ErrorStatus: dtkNoError if OK
346  Dtk_ErrorStatus GetAdjacentCoedge(const Dtk_Size_t &inIndex, Dtk_CoedgePtr &outAdjacentCoedge) const;
347 
348  //! \brief Get parent loop
349  //! \param [out] :outParentLoop
350  //! \return Dtk_ErrorStatus: dtkNoError if OK
352 
353  //! \brief Get parent face
354  //! \param [out] :outParentFace
355  //! \return Dtk_ErrorStatus: dtkNoError if OK
357 
358  //! \brief Get basis surface
359  //! \param [out] :outBasisSurface
360  //! \return Dtk_ErrorStatus: dtkNoError if OK
362 
363  //! \brief Set parent loop
364  //! \param [in] :inParentLoop
365  //! \return Dtk_ErrorStatus: dtkNoError if OK
367  Dtk_ErrorStatus SetParentLoop(const Dtk_ID &inParentLoopId);
368 
369  enum type_detk get_type_detk() const;
370 
371  //! \brief Get Geometry
372  //! \return Dtk_CurvePtr
374  //! \brief Set Geometry
375  //! \param [in] inCurveUV : Curve UV
376  void SetGeom(const Dtk_CurvePtr& inCurveUV);
377  virtual Dtk_ErrorStatus _Store(void*);
378  virtual Dtk_Size_t GetSize() const;
380 };
381 
382 //! \ingroup TOPO
383 //! \class Dtk_Loop
384 //! \brief Dtk_Loop is bound of a face it can be outer or inner
385 //! \SmartPtr{Dtk_LoopPtr}
386 //!
388 {
389 protected:
390  struct Dtk_Handle; // Not defined here
391  Dtk_Handle *_Private; // Handle
392  enum { _typeID = DTK_TYPE_LOOP };
393 
394  void _Init();
395  void _Reset();
396  Dtk_ErrorStatus SetCoedge(const Dtk_Size_t &inIndex, const Dtk_CoedgePtr &inCoedge,const Dtk_bool &inOrientation);
397 
398  void _Copy(const Dtk_Loop &inTopo,Dtk_Body *inParentBody);
399  void _Clone( Dtk_TopologicalEntityPtr &outTopo,Dtk_Body * _inParentBody);
400 
402  Dtk_Loop(const Dtk_Loop &inTopo,Dtk_Body *inParentBody);
403  virtual ~Dtk_Loop();
404  Dtk_ErrorStatus GetParentBody(Dtk_Body* &outParentBody) const;
405  friend class Dtk_SmartPtr<Dtk_Loop>;
406  friend class Dtk_TopologicalEntity;
407 
408 public:
409  Dtk_ID GetTopoID() const;
413 
414  //downcasting
415  int DtkDynamicType(const int& inId);
417 
422 
423 
424  //! \brief Create a loop in a body
425  //! \param [in] inParentBody : parent body
426  //! \return Dtk_LoopPtr created
427  static Dtk_LoopPtr Create(const Dtk_BodyPtr &inParentBody);
428 
429  //! \brief Create a loop in a body
430  //! \param [in] inParentBody : parent body
431  //! \param [in] inCoedgeReserve : Coedge size to reserve
432  //! \return Dtk_LoopPtr created
433  static Dtk_LoopPtr Create(const Dtk_BodyPtr &inParentBody,Dtk_UInt32 inCoedgeReserve);
434 
435  //! \brief Return true if Loop is outer
436  Dtk_bool IsOuter() const;
437  //! \brief Return true if Loop is a vertex loop
439 
440  //! \brief Return orientation for Loop relative to face
441  //! \return True if material is on the left
443  //! \brief Set orientation for Loop relative to face
444  //! \param [in] :inOrientation True if material is on the left
445  //! \return Dtk_ErrorStatus: dtkNoError if OK
446  Dtk_ErrorStatus SetOrientation(const Dtk_bool& inOrientation);
447 
448  //! \brief Return number of coedge in the loop
450  //! \brief Get a coedge in the loop
451  //! \param [in] : inIndex index of coedge to get
452  //! \param [out] : outCoedge : pointer on coedge you ask
453  //! \param [out] : outCoedgeOrientation : orientation of coedge in the loop
454  //! \return Dtk_ErrorStatus: dtkNoError if OK
455  Dtk_ErrorStatus GetCoedge(const Dtk_Size_t& inIndex,Dtk_CoedgePtr &outCoedge,Dtk_bool &outCoedgeOrientation) const;
456  Dtk_ErrorStatus GetCoedge(const Dtk_Size_t& inIndex,Dtk_ID &outCoedgeId,Dtk_bool &outCoedgeOrientation) const;
457 
458 
459  //! \brief Get an index of a coedge in the loop
460  //! \param [in] : inCoedge : pointer on coedge you want the index
461  //! \param [out] : outIndex index of the coedge
462  //! \return Dtk_ErrorStatus: dtkNoError if found
464 
465 
466  //! \brief Add coedge to the loop
467  //! \param [in] : inCoedge : pointer on coedge you add
468  //! \param [in] : inCoedgeOrientation : orientation of coedge in the loop (true is loop and coedge go in same sens)
469  //! \return Dtk_ErrorStatus: dtkNoError if OK
470  Dtk_ErrorStatus AddCoedge(const Dtk_CoedgePtr &inCoedge,const Dtk_bool &inCoedgeOrientation);
471  Dtk_ErrorStatus SetCoedges(const Dtk_tab<Dtk_CoedgePtr>& inCoedgeArray,const Dtk_tab<Dtk_bool > &inCoedgeOrientationArray);
472 
473  //! \brief Return vertex loop
474  //! \param [out] : outVertexLoop : pointer on vertex loop
475  //! \return Dtk_ErrorStatus: dtkNoError if OK
477  //! \brief Set vertex loop
478  //! \param [in] : inVertexLoop : pointer on vertex loop
479  //! \return Dtk_ErrorStatus: dtkNoError if OK
481 
482  //! \brief Return an array of consecutive UV curves representing the loop
483  //! \param [out]: outUVBound : array of consecutive UV curves
484  //! \param [in]: inComputeFlag : Force computation if not filled
485  //! \return Dtk_ErrorStatus: dtkNoError if OK
487  //! \brief Return an array of consecutive 3D curves representing the loop
488  //! \param [out]: out3DBound : array of consecutive 3D curves
489  //! \param [in]: inComputeFlag : Force computation if not filled
490  //! \return Dtk_ErrorStatus: dtkNoError if OK
492 
493  //! \brief Return pointer on parent face
494  //! \param [out]: outParentFace : parent face
495  //! \return Dtk_ErrorStatus: dtkNoError if OK
497 
498  //! \brief Set pointer on parent face
499  //! \param [in]: inParentFace : parent face
500  //! \return Dtk_ErrorStatus: dtkNoError if OK
502  Dtk_ErrorStatus SetParentFace(const Dtk_ID &inParentFaceId);
503 
504  //! \brief Inverse sens of all coedges in the loop
505  //! \return Dtk_ErrorStatus: dtkNoError if OK
507 
508  //! \brief Compute bounding Box of UV Boundaries if they exist
509  //! \param [out]: outMin : Umin and Vmin coordinates
510  //! \param [out]: outMax : Umax and Vmax coordinates
511  //! \param [in]: inComputeFlag : TRUECompute Uv boundaries if doesn't exist
512  //! \return Dtk_ErrorStatus: dtkNoError if OK
514 
515  //! \brief Compute bounding Box of 3d Boundaries if they exist
516  //! \param [out]: outMin : Umin and Vmin coordinates
517  //! \param [out]: outMax : Umax and Vmax coordinates
518  //! \return Dtk_ErrorStatus: dtkNoError if OK
520 
521  virtual Dtk_ErrorStatus _Store(void*);
522  virtual Dtk_Size_t GetSize() const;
523 };
524 
525 //! \ingroup TOPO
526 //! \class Dtk_Face
527 //! \brief is a surface bounded by Dtk_Loop.
528 //! \brief Geometrical orientation relative to basis surface is always True
529 //! \SmartPtr{Dtk_FacePtr}
531 {
532 protected:
533  struct Dtk_Handle; // Not defined here
534  Dtk_Handle *_Private; // Handle
535  enum { _typeID = DTK_TYPE_FACE };
536 
537  void _Init();
538  void _Reset();
539  void _Copy(const Dtk_Face &inTopo,Dtk_Body *inParentBody);
540  Dtk_ErrorStatus SetLoop(const Dtk_Size_t &inIndex, const Dtk_LoopPtr &inLoop);
541  void _Clone( Dtk_TopologicalEntityPtr &outTopo,Dtk_Body * _inParentBody);
542 
543  friend class Dtk_SmartPtr<Dtk_Face>;
544  friend class Dtk_TopologicalEntity;
545 
546  //constructors
548  Dtk_Face(const Dtk_Face &inTopo,Dtk_Body *inParentBody);
549 
550  virtual ~Dtk_Face();
551 public:
552  Dtk_ID GetTopoID() const;
553 
556 
558 
559  //! \brief Create a face in a body
560  //! \param [in] inParentBody : parent body
561  //! \return Dtk_FacePtr created
562  static Dtk_FacePtr Create(const Dtk_BodyPtr &inParentBody);
563 
564  //downcasting
565  int DtkDynamicType(const int& inId);
566  static Dtk_Face * DtkDynamicCast(Dtk_Object * inObject);
567 
570 
571  //! \brief Return number of parent shell (1 if manifold body)
573 
574  //! \brief Get parent shell of face
575  //! \param [in] : inIndex : index of parent shell
576  //! \param [out] : outParentShell : parent shell
577  //! \return Dtk_ErrorStatus: dtkNoError if OK
578  Dtk_ErrorStatus GetParentShell(const Dtk_Size_t & inIndex,Dtk_ShellPtr &outParentShell) const;
579 
580  //! \brief Get parent shell of face
581  //! \param [in] : inIndex : index of parent shell
582  //! \param [out] : outParentShell : parent shell
583  //! \param [out] : outOrient : face orientation in parent shell
584  //! \return Dtk_ErrorStatus: dtkNoError if OK
585  Dtk_ErrorStatus GetParentShell(const Dtk_Size_t & inIndex,Dtk_ShellPtr &outParentShell, Dtk_bool& outOrient) const;
586 
587  //! \brief Add parent shell on a face
588  //! \param [in] : inParentShell shell to add
589  //! \return Dtk_ErrorStatus: dtkNoError if OK
591  Dtk_ErrorStatus AddParentShell(const Dtk_ID &inParentShellId);
592 
593  //! \brief Return number of bounding loop for face
595 
596  //! \brief Get loop of face
597  //! \param [in] : inIndex : index of loop
598  //! \param [out] : outLoop : loop
599  //! \return Dtk_ErrorStatus: dtkNoError if OK
600  Dtk_ErrorStatus GetLoop(const Dtk_Size_t& inIndex,Dtk_LoopPtr &outLoop) const;
601  Dtk_ErrorStatus GetLoop(const Dtk_Size_t & inIndex,Dtk_ID &outLoopId) const;
602  //! \brief Add Degenerated UV curves in loops
603  //! \return Dtk_ErrorStatus: dtkNoError if OK
605 
606  //! \brief Add inner loop on a face
607  //! \param [in] : inLoop : inner loop to add
608  //! \return Dtk_ErrorStatus: dtkNoError if OK
610  //! \brief Add outer loop on a face
611  //! \param [in] : inLoop : outer loop to add
612  //! \return Dtk_ErrorStatus: dtkNoError if OK
614  //! \brief Add vertex loop on a face
615  //! \param [in] : inLoop : vertex loop to add
616  //! \return Dtk_ErrorStatus: dtkNoError if OK
618  //! \brief Add loop on a face
619  //! \param [in] : inLoop : loop to add
620  //! \param [in] : inOuterInfo : outer info for inLoop (True if outer)
621  //! \return Dtk_ErrorStatus: dtkNoError if OK
622  Dtk_ErrorStatus AddLoop(const Dtk_LoopPtr & inLoop,const Dtk_bool& inOuterInfo);
623 
624  enum type_detk get_type_detk() const;
625 
626  //! \brief Return associated geometry
627  //! \param [in] : inWithSetTrim if DTK_TRUE surface set trimuvbox like the face
628  //! \return Dtk_SurfacePtr
629  Dtk_SurfacePtr GetGeom( Dtk_bool inWithSetTrim = DTK_TRUE ) const;
630  //! \brief Set Geometry
631  //! \param [in] inSurface : Basis Surface
632  //! \return void
633  void SetGeom(const Dtk_SurfacePtr& inSurface);
634 
635  //! \brief Get Surface Trim Box : Umin = outTrimValues[0] Umax = outTrimValues[1] Vmin = outTrimValues[2] Vmax = outTrimValues[3]
636  Dtk_ErrorStatus GetTrimUVBox(Dtk_Double64 outTrimValues[]) const;
637  //! \brief Set Surface Trim Box : Umin = inTrimValues[0] Umax = inTrimValues[1] Vmin = inTrimValues[2] Vmax = inTrimValues[3]
639 
640  //! \brief Create a new face with reversed surface
641  //! \return a new single face with reversed normal
643 
645  virtual Dtk_ErrorStatus _Store(void*);
646  virtual Dtk_Size_t GetSize() const;
647 
648  //! \brief Remove a Shell to Shell's list of face
649  //! \param [in] :inShellId
650  void RemoveParentShell( const Dtk_ID &inShellId );
651 };
652 
653 
654 
655 //! \ingroup TOPO
656 //! \class Dtk_Volume
657 //! \brief A Dtk_Volume is a space limited by edges. It contain one or several Dtk_Shell.
658 //! If two objects have a common face without common edge you have to create 2 volumes.
659 //! \SmartPtr{Dtk_VolumePtr}
661 {
662 protected:
663  struct Dtk_Handle; // Not defined here
664  Dtk_Handle *_Private; // Handle
666 
667  void _Init();
668  void _Reset();
669  void _Copy(const Dtk_Volume& inToCopy,Dtk_Body *inParentBody);
670  Dtk_Volume(const Dtk_Volume& inEdgeTpCopy, Dtk_Body *inParentBody);
672  virtual ~Dtk_Volume();
673  Dtk_ErrorStatus GetParentBody(Dtk_Body* &outParentBody) const;
674  friend class Dtk_SmartPtr<Dtk_Volume>;
675  friend class Dtk_TopologicalEntity;
676  void _Clone( Dtk_TopologicalEntityPtr &outTopo,Dtk_Body * _inParentBody);
677 
678 public:
679  Dtk_ID GetTopoID() const;
680 
683 
684  //! \brief Create a volume in a body
685  //! \param [in] inParentBody : parent body
686  //! \return Dtk_VolumePtr created
687  static Dtk_VolumePtr Create(const Dtk_BodyPtr &inParentBody);
688 
689  //downcasting
690  int DtkDynamicType(const int& inId);
691  static Dtk_Volume * DtkDynamicCast(Dtk_Object * inObject);
692 
695 
696  //! \brief Get Parent Lump
697  //! \param [out] outParentLump : parent lump
698  //! \return Dtk_ErrorStatus: dtkNoError if OK
700  //! \brief Set Parent Lump
701  //! \param [in] inParentLump : parent lump
702  //! \return Dtk_ErrorStatus: dtkNoError if OK
704  Dtk_ErrorStatus SetParentLump(const Dtk_ID& inParentLumpId);
705 
706  //! \brief Get Number of Shell in Volume
707  //! \return Number of Shell in Volume
709 
710  //! \brief Get Shell
711  //! \param [in] inIndex : index of shell
712  //! \param [out] outShell : pointer on shell
713  //! \return Dtk_ErrorStatus: dtkNoError if OK
714  Dtk_ErrorStatus GetShell(const Dtk_Size_t& inIndex,Dtk_ShellPtr &outShell) const;
715  Dtk_ErrorStatus GetShell(const Dtk_Size_t& inIndex,Dtk_ID &outShellId) const;
716 
717  //! \brief Add Open Shell (only one supported)
718  //! \param [in] inShell : pointer on outer shell
719  //! \return Dtk_ErrorStatus: dtkNoError if OK error if body has already a closed (inner or outer )shell
721  //! \brief Add Outer Shell (only one supported)
722  //! \param [in] inShell : pointer on outer shell
723  //! \return Dtk_ErrorStatus: dtkNoError if OK error if body has already an open shell or an outer shell
725  //! \brief Add Inner Shell
726  //! \param [in] inShell : pointer on inner shell
727  //! \return Dtk_ErrorStatus: dtkNoError if OK
729  //! \brief Add Wire Shell
730  //! \param [in] inShell : pointer on inner shell
731  //! \return Dtk_ErrorStatus: dtkNoError if OK
732  Dtk_ErrorStatus AddWireShell(const Dtk_ShellPtr &inShell);
733 
734  enum type_detk get_type_detk() const;
736  virtual Dtk_ErrorStatus _Store(void*);
737  virtual Dtk_Size_t GetSize() const;
738 };
739 
740 //! \ingroup TOPO
741 //! \class Dtk_Lump
742 //! \brief A Dtk_Lump is a manifold part of a non manifold object
743 //! If two volumes have a common edge you have to create two lumps with a volume in each
744 //! \SmartPtr{Dtk_LumpPtr}
746 {
747 protected:
748  struct Dtk_Handle; // Not defined here
749  Dtk_Handle *_Private; // Handle
750  enum { _typeID = DTK_TYPE_LUMP };
751 
752  void _Init();
753  void _Reset();
754 
755  void _Copy(const Dtk_Lump& inLumpToCopy,Dtk_Body *inParentBody);
757  Dtk_Lump(const Dtk_Lump& inLumpToCopy,Dtk_Body *inParentBody);
758  virtual ~Dtk_Lump();
759  friend class Dtk_SmartPtr<Dtk_Lump>;
760  friend class Dtk_TopologicalEntity;
761  void _Clone( Dtk_TopologicalEntityPtr &outTopo,Dtk_Body * _inParentBody);
762 
763 public:
764  Dtk_ID GetTopoID() const;
765 
766  //! \brief Create a lump in a body
767  //! \param [in] inParentBody : parent body
768  //! \return Dtk_LumpPtr created
769  static Dtk_LumpPtr Create(const Dtk_BodyPtr &inParentBody);
770 
771  //downcasting
772  int DtkDynamicType(const int& inId);
773  static Dtk_Lump * DtkDynamicCast(Dtk_Object * inObject);
774 
777 
778  //! \brief Get Number of Volumes in lump
779  //! \return Number of Volumes in lump
781  //! \brief Get Volume
782  //! \param [in] inIndex : index of volume
783  //! \param [out] outVolume : pointer on volume
784  //! \return Dtk_ErrorStatus: dtkNoError if OK
785  Dtk_ErrorStatus GetVolume(const Dtk_Size_t inIndex,Dtk_VolumePtr &outVolume) const;
786  Dtk_ErrorStatus GetVolume(const Dtk_Size_t inIndex,Dtk_ID &outVolumeId) const;
787  //! \brief Add Volume
788  //! \param [in] inVolume : pointer on volume
789  //! \return Dtk_ErrorStatus: dtkNoError if OK
791  //! \brief Get Parent Body
792  //! \param [out] outParentBody : parent body
793  //! \return Dtk_ErrorStatus: dtkNoError if OK
795  //! \brief Set Parent Body
796  //! \param [in] inParentBody : parent body
797  //! \return Dtk_ErrorStatus: dtkNoError if OK
800 
801  enum type_detk get_type_detk() const;
803  virtual Dtk_ErrorStatus _Store(void*);
804  virtual Dtk_Size_t GetSize() const;
805 };
806 
807 //! \ingroup TOPO
808 //! \class Dtk_Body
809 //! \brief A Dtk_Body Dtk_Body is the highest level topological entity.
810 //! It allow you to handle manifold and non-manifold object , open skin or surfacic model and wire entities.
811 //! \SmartPtr{Dtk_BodyPtr}
812 class Dtk_Body:public Dtk_Entity
813 {
814 protected:
815  struct Dtk_Handle; // Not defined here
816  Dtk_Handle *_Private; // Handle
817  enum { _typeID = DTK_TYPE_BODY };
818  void _Init();
819  void _Reset();
820 
821  void _Copy(const Dtk_Body& inBodyToCopy);
822  Dtk_Body(const Dtk_Body& inBodyToCopy);
823  virtual ~Dtk_Body();
824  friend class Dtk_SmartPtr<Dtk_Body>;
825  inline virtual Dtk_Object* Clone() { return new Dtk_Body(*this); }
826 public:
828 
829  //! \brief Create a body
830  //! \return Dtk_BodyPtr created
831  static Dtk_BodyPtr Create();
832 
833  //downcasting
834  int DtkDynamicType(const int& inId);
835  static Dtk_Body* DtkDynamicCast(Dtk_Object * inObject);
836 
837 
843  Dtk_ErrorStatus GetLump(const Dtk_Size_t& inIndex,Dtk_LumpPtr &outLump) const;
844  Dtk_ErrorStatus GetLump(const Dtk_Size_t& inIndex,Dtk_ID &outLumpId) const;
847  Dtk_ID AddPtr(const Dtk_TopologicalEntityPtr &outEntityPtr);
848 
849  //! \brief Add Shell in Body in first volume of first lump (created if none)
850  //! \param [in] inShell : pointer on inner shell
851  //! \param [in] inOuterInfo : DTK_TRUE if outer - DTK_FALSE if inner not yet supported -
852  //! \param [in] inClosedInfo : DTK_TRUE if closed DTK_FALSE if open
853  //! \return Dtk_ErrorStatus: dtkNoError if OK error if body has 2 open shell or 2 outer shell or dtkWarningTopologyIncomplete if inOuterInfo == DTK_FALSE
854  //! \deprecated Use Dtk_Body::AddOpenShell, Dtk_Volume::AddOuterShell or Dtk_Volume::AddInnerShell to get valid topology
855  SetAsDeprecated("2025.1", "Use Dtk_Body::AddOpenShell, Dtk_Volume::AddOuterShell or Dtk_Volume::AddInnerShell to get valid topology")
856  Dtk_ErrorStatus AddShell(const Dtk_ShellPtr &inShell, const Dtk_bool &inOuterInfo,const Dtk_bool &inClosedInfo);
857  //
858  //! \brief Add Open Shell in first volume of first lump (created if none)
859  //! \param [in] inShell : pointer on outer open shell
860  //! \return Dtk_ErrorStatus: dtkNoError if OK error if body has already a closed (inner or outer )shell
861  Dtk_ErrorStatus AddOpenShell(const Dtk_ShellPtr &inShell);
862  Dtk_ErrorStatus AddOpenShell2(const Dtk_ShellPtr &inShell, Dtk_VolumePtr &volume);
863 
864  //! \brief Return Number of Open Shell
865  //! \return Dtk_Size_t
866  Dtk_Size_t GetNumOpenShells()const;
867  //! \brief Return Open Shell
868  //! \param [in] inIndex : index of Open Shell
869  //! \param [out] outShell : pointer on open shell
870  //! \return Dtk_ErrorStatus: dtkNoError if OK
871  Dtk_ErrorStatus GetOpenShell(Dtk_Size_t inIndex,Dtk_ShellPtr &outShell)const;
872 
873  //! \brief Add Open Shell with a one Unbounded Surface
874  //! \param [in] inSurface : pointer on surface
875  //! \param [in] InOrient : Face orientation relative to shell (DTK_TRUE if face material and shell material are on same side)
876  //! \return Dtk_ErrorStatus: dtkNoError if OK error if body has already a shell
877  Dtk_ErrorStatus AddUnboundedFace(Dtk_SurfacePtr inSurface, Dtk_bool InOrient = DTK_TRUE);
878 
879  //! \brief Add Wire Shell
880  //! \param [in] inShell : pointer on wire shell
881  //! \return Dtk_ErrorStatus: dtkNoError if OK
882  Dtk_ErrorStatus AddWireShell(const Dtk_ShellPtr &inShell);
883 
885  enum type_detk get_type_detk() const;
886 
887  int GetWireCurves (Dtk_tab<Dtk_CurvePtr> &curves);
888  int GetWireEntities (Dtk_tab<Dtk_CurvePtr> &curves,Dtk_tab<Dtk_PointPtr>& points);
889 
890  Dtk_ErrorStatus ComputeBoundingBox(Dtk_pnt& outMin, Dtk_pnt& outMax);
891  Dtk_ErrorStatus Store(FILE* inFile,Dtk_Size_t inIo=1);
892  Dtk_ErrorStatus Store(const Dtk_string& inFile,Dtk_Size_t inIo=1);
894  virtual Dtk_Size_t GetSize() const;
895 
896  //! \brief Removes all references to inVertexToRemove and replace it by inVertexToKeep
897  //! \param [in] inVertexToKeep : Vertex to use
898  //! \param [in] inVertexToRemove : Vertex to remove
899  //! \return Dtk_ErrorStatus: dtkNoError if OK
900  Dtk_ErrorStatus MergeVertices(Dtk_VertexPtr inVertexToKeep,Dtk_VertexPtr inVertexToRemove);
901 
902  //! \brief Returns DTK_TRUE if Body contains faces with surfaces
903  Dtk_bool HasFaces();
904 
905  //! \brief Returns DTK_TRUE if Body contains wireframe
906  Dtk_bool HasWire();
907 
908  //! \brief Returns DTK_TRUE if Body contains periodic surfaces
909  Dtk_bool HasPeriodicSurface();
910 
911  //! \brief Returns DTK_TRUE if Body contains mesh surfaces
912  Dtk_bool HasMeshSurface();
913 
914  //! \brief Transforms all curves and surfaces in the body into NURBS
915  //! \param [in] inRemoveTrimmedCurve : Convert Trimmed Nurbs into Nurbs
916  //! \return Dtk_ErrorStatus: dtkNoError if OK
917  Dtk_ErrorStatus ToNurbs(Dtk_bool inRemoveTrimmedCurve = 0);
918  //! \brief Get Tolerance
919  //! \deprecated Use GetTolerance(Dtk_Double64 &outTolerance) method instead.
920  //! \return double Tolerance
921  SetAsDeprecated("2022.1", "Use GetTolerance(Dtk_Double64 &outTolerance) method instead.")
923 
924  //! \brief Get Tolerance
925  //! \param [out] outTolerance : body tolerance
926  //! \return dtkNoError if value set or dtkWarningDefaultValue if default
928 
929  //! \brief Set Tolerance
930  //! \param [in] inTol : Tolerance
932 
933  //! \brief Get Num entities
934  //! \param [in] inType : Type of entities to count
935  Dtk_Size_t GetNumTopologicalEntities(type_detk inType);
936 
937  //! \brief Get entity with Info->GetId() == inInfoId
938  //! \param [in] inInfoId : Info->GetId() of entity to be found
939  //! \deprecated
940  //! \sa Dtk_Body::GetEntities(const Dtk_ID& inInfoId, Dtk_tab<Dtk_EntityPtr> &outTab)
941  //SetAsDeprecated( L"2016.1", L"Use Dtk_Body::GetEntities instead.")
942  Dtk_EntityPtr GetEntity(const Dtk_ID& inInfoId ) const;
943 
944  //! \brief Get entities with Info->GetId() == inInfoId
945  //! \param [in] inInfoId : Info->GetId() of entities to be found
946  //! \param [in] inLookAlsoForCurve : if set to DTK_TRUE, Dtk_Entity retrieved can also include Dtk_CurvePtr. Otherwise, only Dtk_TopologicalEntity can be retrieved.
947  //! \remark : several entities can have same identifiers (e.g. splitted entities....)
948  Dtk_ErrorStatus GetEntities(const Dtk_ID& inInfoId, Dtk_tab<Dtk_EntityPtr> &outTab, Dtk_bool inLookAlsoForCurve = DTK_TRUE ) const;
949 
950  //! \brief Fills a mapping table between Topological Entity identifiers (Dtk_ID from Dtk_Info::GetId) and the indices of corresponding entities within the Dtk_Body.
951  //! This allows efficient retrieval of all entities associated with a given identifier (including cases where entities have been split).
952  //! With the retrieved positions and the function Dtk_Body::GetPtr, you can directly get the corresponding Dtk_TopologicalEntityPtr, which is faster than calling Dtk_Body::GetEntities for each identifier.
953  //! \param [out] outMap : mapping table Dtk_ID -> list of entity indices in the body.
954  //! \return Dtk_ErrorStatus : dtkNoError if the mapping was successfully filled
955  Dtk_ErrorStatus FillTopologicalEntitiesIdMapping( std::unordered_map<Dtk_ID, std::vector<Dtk_Size_t>>& outMap );
956 
957  Dtk_ErrorStatus Normalize(Dtk_bool updateEdgeGeometry = DTK_TRUE);
958  Dtk_ErrorStatus RevolToStandardRevol();
959  Dtk_ErrorStatus TorusWithNegativeMaxRadiusToRevol();
960  Dtk_ErrorStatus TrimUnlimitedFaces ();
961  Dtk_ErrorStatus GetVertexBound (Dtk_pnt& pmin, Dtk_pnt& pmax);
962  Dtk_ErrorStatus GetVertexGravity(Dtk_pnt& pcenter);
963  Dtk_bool LimitInfinitEntities( Dtk_Double64 lenFoundMin, Dtk_Double64 lenNew = 1.0);
964  Dtk_ErrorStatus ExtractEdgeBody(Dtk_BodyPtr &outEdgeBody);
965  void AddStream(Dtk_StreamPtr inStream);
966  Dtk_StreamPtr GetStream(Dtk_Size_t inStreamIndex) const;
967  Dtk_Size_t GetNumStream()const;
968 
969 };
970 
971 //! \ingroup TOPO
972 //! \class Dtk_Shell
973 //! \brief Dtk_Shell is a set of faces bounding a volume. Dtk_Shell can be outer or inner.
974 //! A Dtk_Body contain at least one open_shell or one outer closed shell and 0 or several inner closed shell.
975 //! \SmartPtr{Dtk_ShellPtr}
977 {
978 protected:
979  struct Dtk_Handle; // Not defined here
980  Dtk_Handle *_Private; // Handle
982 
983  void _Init();
984  void _Reset();
985  void _Clone(Dtk_TopologicalEntityPtr &outTopo, Dtk_Body * _inParentBody);
986 
987  void _Copy(const Dtk_Shell &inTopo, Dtk_Body *inParentBody);
988 
990  Dtk_Shell(const Dtk_Shell &inTopo, Dtk_Body *inParentBody);
991  virtual ~Dtk_Shell();
992  friend class Dtk_SmartPtr<Dtk_Shell>;
993  friend class Dtk_TopologicalEntity;
995 
996  Dtk_ErrorStatus SetFace(const Dtk_Size_t &inIndex, const Dtk_FacePtr &inFace, const Dtk_bool &inFaceOrientation);
997 
998 public:
999  Dtk_ID GetTopoID() const;
1002 
1005 
1006  //! \brief Create a shell in a body
1007  //! \param [in] inParentBody : parent body
1008  //! \return Dtk_ShellPtr created
1009  static Dtk_ShellPtr Create(const Dtk_BodyPtr &inParentBody);
1010  //! \brief Create a shell in a body
1011  //! \param [in] inParentBody : parent body
1012  //! \param [in] inFacesReserve : Faces size to reserve
1013  //! \param [in] inWireReserve : Wire size to reserve
1014  //! \return Dtk_ShellPtr created
1015  static Dtk_ShellPtr Create(const Dtk_BodyPtr &inParentBody, Dtk_UInt32 inFacesReserve, Dtk_UInt32 inWireReserve = 0);
1016 
1017  //downcasting
1018  int DtkDynamicType(const int& inId);
1019  static Dtk_Shell * DtkDynamicCast(Dtk_Object * inObject);
1020 
1021  //! \brief Get Parent Body
1022  //! \param [out] outParentBody : parent body
1023  //! \return Dtk_ErrorStatus: dtkNoError if OK
1025  //! \brief Return parent volume of shell
1026  //! \param [out] outParentVolume : pointer of parent volume
1027  //! \return Dtk_ErrorStatus: dtkNoError if OK
1029  //! \brief Set parent volume of shell
1030  //! \param [in] inParentVolume : pointer of parent volume
1031  //! \return Dtk_ErrorStatus: dtkNoError if OK
1033  Dtk_ErrorStatus SetParentVolume(const Dtk_ID &inParentVolumeId);
1034 
1037 
1038  //! \brief Return DTK_TRUE if shell is closed
1040  //! \brief Set Closed Info DTK_TRUE if shell is closed
1041  //! \return Dtk_ErrorStatus: dtkNoError if OK
1043  //! \brief Return DTK_TRUE if shell is outer
1045  //! \brief Return DTK_TRUE if shell has Wire entities
1047  //! \brief Set Outer Info DTK_TRUE if shell is outer
1048  //! \return Dtk_ErrorStatus: dtkNoError if OK
1050  //! \brief Return Number of Faces following Face type
1051  //! \param [in] inFaceType : Type of face you want to count
1052  //! ( DtkFaceType_Bounded = topological face / DtkFaceType_All = All Faces / DtkFaceType_Wire = Face used to store wire entities)
1053  //! \return number of face following Face type
1055 
1056  //! \brief Return Number of Wire set of entities
1057  //! equivalent to GetNumFaces with type DtkFaceType_Wire
1058  //! \return number of Wire set of entities
1060 
1061  //! \brief Get Wire Set
1062  //! \param [in] inIndex : index of wire set
1063  //! \param [out] outWire : array of Dtk_Entity (must be Dtk_PointPtr or Dtk_CurvePtr )
1064  //! \return Dtk_ErrorStatus: dtkNoError if OK
1066 
1067 
1068  //! \brief Get Wire Set
1069  //! \param [in] inIndex : index of wire set
1070  //! \param [out] outWire : array of Dtk_Entity (must be Dtk_VertexPtr or Dtk_EdgePtr )
1071  //! \param [out] outOrientation : array of bool for edge orientation
1072  //! \return Dtk_ErrorStatus: dtkNoError if OK
1073  Dtk_ErrorStatus GetWireSetTopo(const Dtk_Size_t& inIndex, Dtk_tab<Dtk_EntityPtr>& outWire, Dtk_tab<Dtk_bool>& outOrientation, Dtk_bool &outLoopOrientation) const;
1075 
1076  //! \brief Get Face following Face type
1077  //! \param [in] inIndex : index of face
1078  //! \param [out] outFace : Face
1079  //! \param [out] outOrientation : Face orientation relative to shell
1080  //! \param [in] inFaceType : Type of face ( DtkFaceType_Bounded = topological face / DtkFaceType_All = All Faces / DtkFaceType_Wire = Face used to store wire entities)
1081  //! \return Dtk_ErrorStatus: dtkNoError if OK
1082  Dtk_ErrorStatus GetFace(const Dtk_Size_t & inIndex, Dtk_FacePtr &outFace, Dtk_bool &outOrientation, DtkFaceType inFaceType = DtkFaceType_Bounded) const;
1083  Dtk_ErrorStatus GetFace(const Dtk_Size_t & inIndex, Dtk_ID &outFaceId, Dtk_bool &outOrientation, DtkFaceType inFaceType = DtkFaceType_Bounded) const;
1084 
1085  //! \brief Add Face to shell
1086  //! \param [in] inFace : Face
1087  //! \param [in] inOrientation : Face orientation relative to shell (DTK_TRUE if face material and shell material are on same side)
1088  //! \param [in] inFaceType : Type of face ( DtkFaceType_Bounded = topological face or DtkFaceType_Wire = Face used to store wire entities)
1089  //! \return Dtk_ErrorStatus: dtkNoError if OK
1091 
1092  //! \brief Add Wire entities
1093  //! \param [in] inWireArray : Array of Dtk_Curves
1094  //! \return Dtk_ErrorStatus: dtkNoError if OK
1097 
1098  //! \brief Add Wire entities
1099  //! \param [in] inPointArray : Array of 3D Points
1100  //! \return Dtk_ErrorStatus: dtkNoError if OK
1103 
1104  //! \brief Check if Shell is Closed
1105  //! \return DTK_TRUE if closed
1106  Dtk_bool CheckIfClosed();
1107 
1108  enum type_detk get_type_detk() const;
1110  virtual Dtk_ErrorStatus _Store(void*);
1111  virtual Dtk_Size_t GetSize() const;
1112 };
1113 
1114 
1115 #endif
1116 
Dtk_Coedge::SetEdge
Dtk_ErrorStatus SetEdge(const Dtk_ID &inEdgeId)
Dtk_Face::SetTrimUVBox
Dtk_ErrorStatus SetTrimUVBox(Dtk_Double64 inTrimValues[])
Set Surface Trim Box : Umin = inTrimValues[0] Umax = inTrimValues[1] Vmin = inTrimValues[2] Vmax = in...
Dtk_Face::AddParentShell
Dtk_ErrorStatus AddParentShell(const Dtk_ID &inParentShellId)
Dtk_Coedge::GetGeom
Dtk_CurvePtr GetGeom() const
Get Geometry.
Dtk_Shell::DtkDynamicCast
static Dtk_Shell * DtkDynamicCast(Dtk_Object *inObject)
Dtk_Shell::SetParentVolume
Dtk_ErrorStatus SetParentVolume(const Dtk_ID &inParentVolumeId)
Dtk_Face::GetSize
virtual Dtk_Size_t GetSize() const
Dtk_Edge::AddCoedge
Dtk_ErrorStatus AddCoedge(const Dtk_CoedgePtr &inCoedge)
Add a Coedge to Edge.
Dtk_Shell::AddWire
Dtk_ErrorStatus AddWire(Dtk_tab< Dtk_VertexPtr > inPointArray)
Dtk_Volume::AddInnerShell
Dtk_ErrorStatus AddInnerShell(const Dtk_ShellPtr &inShell)
Add Inner Shell.
Dtk_Coedge::GetOrientation
Dtk_bool GetOrientation() const
Return orientation for coedge relative to Edge.
Dtk_Edge::Dtk_Edge
Dtk_Edge()
Dtk_Shell::DtkDynamicType
int DtkDynamicType(const int &inId)
Get smart pointer type.
Dtk_Face::Dtk_Face
Dtk_Face(const Dtk_Face &inTopo, Dtk_Body *inParentBody)
Dtk_ID
uint32_t Dtk_ID
Definition: define.h:681
Dtk_Body::_Reset
void _Reset()
Dtk_transfo
This is the Transformation dedicated class.
Definition: dtk_transfo.hpp:19
Dtk_Coedge::_Copy
void _Copy(const Dtk_Coedge &inTopo, Dtk_Body *inParentBody)
Dtk_Vertex::SetGeom
void SetGeom(const Dtk_PointPtr &inPoint)
Set Geometry.
Dtk_Volume::SetParentBody
Dtk_ErrorStatus SetParentBody(const Dtk_BodyPtr &inParentBody)
Dtk_Body::AddLump
Dtk_ErrorStatus AddLump(const Dtk_LumpPtr &inLump)
Dtk_Loop
Dtk_Loop is bound of a face it can be outer or inner.
Definition: util_topology_dtk.hpp:388
Dtk_Volume::SetTopologyStatus
void SetTopologyStatus(Dtk_ErrorStatus inStatus)
Dtk_Edge::GetTopoID
Dtk_ID GetTopoID() const
Dtk_Coedge::_Clone
void _Clone(Dtk_TopologicalEntityPtr &outTopo, Dtk_Body *_inParentBody)
Dtk_Edge::GetStartVertex
Dtk_ErrorStatus GetStartVertex(Dtk_ID &outVertexId) const
Dtk_Face::_Store
virtual Dtk_ErrorStatus _Store(void *)
Dtk_Volume::AddOuterShell
Dtk_ErrorStatus AddOuterShell(const Dtk_ShellPtr &inShell)
Add Outer Shell (only one supported)
Dtk_Face::DtkDynamicType
int DtkDynamicType(const int &inId)
Get smart pointer type.
Dtk_Volume::_Clone
void _Clone(Dtk_TopologicalEntityPtr &outTopo, Dtk_Body *_inParentBody)
Dtk_Coedge::HasDegeneratedFlag
Dtk_bool HasDegeneratedFlag()
Dtk_Loop::SetOuterInfo
Dtk_ErrorStatus SetOuterInfo(const Dtk_bool &inIsOuter)
Dtk_Shell::_Init
void _Init()
Dtk_Edge::GetParentCoedge
Dtk_ErrorStatus GetParentCoedge(const Dtk_Size_t &inIndex, Dtk_CoedgePtr &outCoedge) const
Get Corresponding coedges from index.
Dtk_Lump::_Reset
void _Reset()
Dtk_Lump::Dtk_Lump
Dtk_Lump()
Dtk_Loop::AddCoedge
Dtk_ErrorStatus AddCoedge(const Dtk_CoedgePtr &inCoedge, const Dtk_bool &inCoedgeOrientation)
Add coedge to the loop.
Dtk_Loop::_Init
void _Init()
DtkFaceType_Wire
@ DtkFaceType_Wire
Definition: util_topology_dtk.hpp:24
Dtk_Body::SetTopologyStatus
void SetTopologyStatus(Dtk_ErrorStatus inStatus)
Dtk_Face::~Dtk_Face
virtual ~Dtk_Face()
Dtk_Coedge::Dtk_Coedge
Dtk_Coedge()
Dtk_Coedge::DtkDynamicCast
static Dtk_Coedge * DtkDynamicCast(Dtk_Object *inObject)
Dtk_Lump::AddVolume
Dtk_ErrorStatus AddVolume(const Dtk_VolumePtr &inVolume)
Add Volume.
Dtk_Edge::GetEndVertex
Dtk_ErrorStatus GetEndVertex(Dtk_VertexPtr &outVertex) const
Get End Vertex for edge.
Dtk_Edge
Edge has two vertex for bounds. It has a 3D curve as geometry value.
Definition: util_topology_dtk.hpp:157
Dtk_Face::AddInnerLoop
Dtk_ErrorStatus AddInnerLoop(const Dtk_LoopPtr &inLoop)
Add inner loop on a face.
Dtk_Face
is a surface bounded by Dtk_Loop.
Definition: util_topology_dtk.hpp:531
Dtk_Shell::Create
static Dtk_ShellPtr Create(const Dtk_BodyPtr &inParentBody, Dtk_UInt32 inFacesReserve, Dtk_UInt32 inWireReserve=0)
Create a shell in a body.
Dtk_Shell::IsClosed
Dtk_bool IsClosed() const
Return DTK_TRUE if shell is closed.
Dtk_Shell::IsOuter
Dtk_bool IsOuter() const
Return DTK_TRUE if shell is outer.
Dtk_Loop::DtkDynamicType
int DtkDynamicType(const int &inId)
Get smart pointer type.
DTK_TYPE_VERTEX
@ DTK_TYPE_VERTEX
Definition: define.h:116
Dtk_Body::Clone
virtual Dtk_Object * Clone()
Definition: util_topology_dtk.hpp:825
Dtk_Loop::_Reset
void _Reset()
Dtk_Lump::GetTopoID
Dtk_ID GetTopoID() const
Dtk_Coedge::GetEdge
Dtk_ErrorStatus GetEdge(Dtk_EdgePtr &outEdge) const
Get Edge for coedge.
Dtk_Coedge::GetParentFace
Dtk_ErrorStatus GetParentFace(Dtk_FacePtr &outParentFace) const
Get parent face.
Dtk_Loop::Create
static Dtk_LoopPtr Create(const Dtk_BodyPtr &inParentBody)
Create a loop in a body.
catiav5w::inTransfo
const Dtk_string const Dtk_transfo & inTransfo
Definition: catiav5w.hpp:622
Dtk_Vertex::_Private
Dtk_Handle * _Private
Definition: util_topology_dtk.hpp:68
Dtk_TopologicalEntity::Dtk_TopologicalEntity
Dtk_TopologicalEntity()
Definition: util_topology_dtk.hpp:32
Dtk_Vertex::GetTopoID
Dtk_ID GetTopoID() const
Dtk_Loop::Dtk_Loop
Dtk_Loop(const Dtk_Loop &inTopo, Dtk_Body *inParentBody)
DTK_TRUE
#define DTK_TRUE
Definition: define.h:719
Dtk_Coedge::Dtk_Coedge
Dtk_Coedge(const Dtk_Coedge &inCoedgeToCopy, Dtk_Body *inParentBody)
Dtk_Shell::GetTopologyStatus
Dtk_ErrorStatus GetTopologyStatus() const
Dtk_Vertex::AddParentEdge
Dtk_ErrorStatus AddParentEdge(const Dtk_EdgePtr &inParentEdge)
Add parent Edge.
Dtk_Lump::DtkDynamicCast
static Dtk_Lump * DtkDynamicCast(Dtk_Object *inObject)
Dtk_Body::~Dtk_Body
virtual ~Dtk_Body()
Dtk_TopologicalEntity::_typeID
@ _typeID
Definition: util_topology_dtk.hpp:30
Dtk_TopologicalEntity
Definition: util_topology_dtk.hpp:28
Dtk_Face::_Init
void _Init()
Dtk_Edge::SetAsDeprecated
SetAsDeprecated("2022.1", "Use GetTolerance(Dtk_Double64 &outTolerance) method instead.") Dtk_Double64 GetTolerance()
Get Tolerance.
Dtk_Volume::_Copy
void _Copy(const Dtk_Volume &inToCopy, Dtk_Body *inParentBody)
Dtk_Body::DtkDynamicType
int DtkDynamicType(const int &inId)
Dtk_Lump::_Init
void _Init()
Dtk_UInt32
uint32_t Dtk_UInt32
Definition: define.h:680
Dtk_Edge::SetStartVertex
Dtk_ErrorStatus SetStartVertex(const Dtk_ID &inVertex)
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:53
Dtk_Face::_Copy
void _Copy(const Dtk_Face &inTopo, Dtk_Body *inParentBody)
Dtk_Lump::GetVolume
Dtk_ErrorStatus GetVolume(const Dtk_Size_t inIndex, Dtk_VolumePtr &outVolume) const
Get Volume.
Dtk_Shell::ComputeBoundingBox
Dtk_ErrorStatus ComputeBoundingBox(Dtk_pnt &outMin, Dtk_pnt &outMax)
DtkFaceType_Bounded
@ DtkFaceType_Bounded
Definition: util_topology_dtk.hpp:23
Dtk_Coedge::_Init
void _Init()
Dtk_Vertex::Dtk_Vertex
Dtk_Vertex()
Dtk_Size_t
size_t Dtk_Size_t
Definition: define.h:704
Dtk_Shell::GetParentBody
Dtk_ErrorStatus GetParentBody(Dtk_BodyPtr &outParentBody) const
Get Parent Body.
Dtk_Vertex::GetTolerance
Dtk_ErrorStatus GetTolerance(Dtk_Double64 &outTolerance)
Get Tolerance.
DtkFaceType_All
@ DtkFaceType_All
Definition: util_topology_dtk.hpp:22
Dtk_Loop::GetNumCoedges
Dtk_Size_t GetNumCoedges() const
Return number of coedge in the loop.
Dtk_Loop::Create
static Dtk_LoopPtr Create(const Dtk_BodyPtr &inParentBody, Dtk_UInt32 inCoedgeReserve)
Create a loop in a body.
Dtk_Loop::_Clone
void _Clone(Dtk_TopologicalEntityPtr &outTopo, Dtk_Body *_inParentBody)
Dtk_Face::SetLoop
Dtk_ErrorStatus SetLoop(const Dtk_Size_t &inIndex, const Dtk_LoopPtr &inLoop)
Dtk_Loop::GetCoedgeIndex
Dtk_ErrorStatus GetCoedgeIndex(Dtk_CoedgePtr &inCoedge, Dtk_Size_t &outIndex) const
Get an index of a coedge in the loop.
Dtk_Shell::GetParentBody
Dtk_BodyPtr GetParentBody() const
Dtk_Lump::GetNumVolumes
Dtk_Size_t GetNumVolumes() const
Get Number of Volumes in lump.
Dtk_Shell::AddWire
Dtk_ErrorStatus AddWire(Dtk_tab< Dtk_CurvePtr > inCurveArray)
Add Wire entities.
Dtk_Coedge::GetTopoID
Dtk_ID GetTopoID() const
Dtk_Vertex::_Store
virtual Dtk_ErrorStatus _Store(void *)
Internal Use.
Dtk_Face::Dtk_Face
Dtk_Face()
Dtk_Volume::_Reset
void _Reset()
Dtk_Coedge::SetParentLoop
Dtk_ErrorStatus SetParentLoop(const Dtk_LoopPtr &inParentLoop)
Set parent loop.
Dtk_Body::Create
static Dtk_BodyPtr Create()
Create a body.
Dtk_Loop::get_type_detk
type_detk get_type_detk() const
Return Type of entity.
DTK_FALSE
#define DTK_FALSE
Definition: define.h:720
Dtk_Face::AddOuterLoop
Dtk_ErrorStatus AddOuterLoop(const Dtk_LoopPtr &inLoop)
Add outer loop on a face.
Dtk_TopologicalEntity::DtkDynamicType
int DtkDynamicType(const int &inId)
Get smart pointer type.
Dtk_Body::GetLump
Dtk_ErrorStatus GetLump(const Dtk_Size_t &inIndex, Dtk_ID &outLumpId) const
Dtk_Shell::InverseFaceInShell
Dtk_ErrorStatus InverseFaceInShell(const Dtk_FacePtr &inFace)
util_geom_dtk.hpp
Dtk_Loop::GetParentFace
Dtk_ErrorStatus GetParentFace(Dtk_FacePtr &outParentFace) const
Return pointer on parent face.
Dtk_Body::SetBodyStatus
Dtk_ErrorStatus SetBodyStatus(Dtk_ErrorStatus inBodyStatus)
Dtk_bool
char Dtk_bool
Definition: define.h:717
Dtk_Loop::InverseCoedgeOrientation
Dtk_ErrorStatus InverseCoedgeOrientation() const
Inverse sens of all coedges in the loop.
Dtk_Face::AddDegeneratedEdges
Dtk_ErrorStatus AddDegeneratedEdges() const
Add Degenerated UV curves in loops.
Dtk_Volume::ComputeBoundingBox
Dtk_ErrorStatus ComputeBoundingBox(Dtk_pnt &outMin, Dtk_pnt &outMax)
Dtk_Vertex::get_type_detk
enum type_detk get_type_detk() const
Return Type of entity.
Dtk_Loop::GetTopologyStatus
Dtk_ErrorStatus GetTopologyStatus() const
Dtk_Loop::~Dtk_Loop
virtual ~Dtk_Loop()
Dtk_Double64
double Dtk_Double64
Definition: define.h:691
Dtk_Face::GetNumLoops
Dtk_Size_t GetNumLoops() const
Return number of bounding loop for face.
Dtk_Face::_Private
Dtk_Handle * _Private
Definition: util_topology_dtk.hpp:533
Dtk_Loop::SetCoedges
Dtk_ErrorStatus SetCoedges(const Dtk_tab< Dtk_CoedgePtr > &inCoedgeArray, const Dtk_tab< Dtk_bool > &inCoedgeOrientationArray)
Dtk_Vertex::_Init
void _Init()
Dtk_Volume::DtkDynamicType
int DtkDynamicType(const int &inId)
Get smart pointer type.
Dtk_TopologicalEntity::_Clone
virtual void _Clone(Dtk_TopologicalEntityPtr &outTopo, Dtk_Body *_inParentBody)=0
Dtk_Face::_Reset
void _Reset()
Dtk_Volume::GetShell
Dtk_ErrorStatus GetShell(const Dtk_Size_t &inIndex, Dtk_ID &outShellId) const
Dtk_Loop::GetSize
virtual Dtk_Size_t GetSize() const
Dtk_Loop::IsOuter
Dtk_bool IsOuter() const
Return true if Loop is outer.
Dtk_Vertex::AddParentEdge
Dtk_ErrorStatus AddParentEdge(const Dtk_ID &inParentEdgeId)
Add parent Edge.
DtkFaceType
DtkFaceType
Definition: util_topology_dtk.hpp:21
Dtk_Volume::GetSize
virtual Dtk_Size_t GetSize() const
Dtk_Coedge::_Reset
void _Reset()
DTK_TYPE_LUMP
@ DTK_TYPE_LUMP
Definition: define.h:482
Dtk_Vertex::GetParentEdge
Dtk_ErrorStatus GetParentEdge(const Dtk_Size_t &inIndex, Dtk_EdgePtr &outParentEdge) const
Return parent edge at inIndex.
Dtk_Face::GetLoop
Dtk_ErrorStatus GetLoop(const Dtk_Size_t &inIndex, Dtk_ID &outLoopId) const
Dtk_Coedge::SetEdge
Dtk_ErrorStatus SetEdge(const Dtk_EdgePtr &inEdge)
Set Edge for coedge.
Dtk_Volume::GetShell
Dtk_ErrorStatus GetShell(const Dtk_Size_t &inIndex, Dtk_ShellPtr &outShell) const
Get Shell.
Dtk_Edge::GetStartVertex
Dtk_ErrorStatus GetStartVertex(Dtk_VertexPtr &outVertex) const
Get Start Vertex for edge.
Dtk_Shell::Dtk_Shell
Dtk_Shell()
DTK_TYPE_COEDGE
@ DTK_TYPE_COEDGE
Definition: define.h:484
Dtk_Shell
Dtk_Shell is a set of faces bounding a volume. Dtk_Shell can be outer or inner. A Dtk_Body contain at...
Definition: util_topology_dtk.hpp:977
Dtk_Face::Create
static Dtk_FacePtr Create(const Dtk_BodyPtr &inParentBody)
Create a face in a body.
Dtk_Shell::AddWire
Dtk_ErrorStatus AddWire(Dtk_tab< Dtk_EdgePtr > inCurveArray)
Dtk_Loop::SetParentBody
Dtk_ErrorStatus SetParentBody(const Dtk_BodyPtr &inParentBody)
Dtk_TopologicalEntity::DtkDynamicCast
static Dtk_TopologicalEntity * DtkDynamicCast(Dtk_Object *inObject)
Cast object in vertex.
Dtk_Volume::_Init
void _Init()
Dtk_Shell::GetSize
virtual Dtk_Size_t GetSize() const
Dtk_Lump::_Private
Dtk_Handle * _Private
Definition: util_topology_dtk.hpp:748
util_topology_ptr_dtk.hpp
Dtk_Vertex::_Clone
void _Clone(Dtk_TopologicalEntityPtr &outTopo, Dtk_Body *_inParentBody)
Dtk_Shell::GetNumFaces
Dtk_Size_t GetNumFaces(DtkFaceType inFaceType=DtkFaceType_Bounded) const
Return Number of Faces following Face type.
Dtk_Body::ExtractEdgeBody
Dtk_ErrorStatus ExtractEdgeBody(Dtk_BodyPtr &outEdgeBody)
Dtk_Loop::SetParentFace
Dtk_ErrorStatus SetParentFace(const Dtk_ID &inParentFaceId)
Dtk_Volume::SetParentLump
Dtk_ErrorStatus SetParentLump(const Dtk_ID &inParentLumpId)
Dtk_Volume::GetTopologyStatus
Dtk_ErrorStatus GetTopologyStatus() const
Dtk_Lump::GetTopologyStatus
Dtk_ErrorStatus GetTopologyStatus() const
Dtk_Loop::DtkDynamicCast
static Dtk_Loop * DtkDynamicCast(Dtk_Object *s)
Dtk_Lump::SetTopologyStatus
void SetTopologyStatus(Dtk_ErrorStatus inStatus)
Dtk_Body::GetNumLumps
Dtk_Size_t GetNumLumps() const
Dtk_Coedge::SetGeom
void SetGeom(const Dtk_CurvePtr &inCurveUV)
Set Geometry.
Dtk_Edge::_Clone
void _Clone(Dtk_TopologicalEntityPtr &outTopo, Dtk_Body *_inParentBody)
Dtk_Shell::SetParentBody
Dtk_ErrorStatus SetParentBody(const Dtk_BodyPtr &inParentBody)
Dtk_Loop::ComputeBoundingBox
Dtk_ErrorStatus ComputeBoundingBox(Dtk_pnt &outMin, Dtk_pnt &outMax)
Compute bounding Box of 3d Boundaries if they exist.
Dtk_Loop::_Store
virtual Dtk_ErrorStatus _Store(void *)
Dtk_Face::ComputeBoundingBox
Dtk_ErrorStatus ComputeBoundingBox(Dtk_pnt &outMin, Dtk_pnt &outMax)
Dtk_Face::DtkDynamicCast
static Dtk_Face * DtkDynamicCast(Dtk_Object *inObject)
Dtk_Volume::GetParentBody
Dtk_BodyPtr GetParentBody() const
Dtk_Lump::_Clone
void _Clone(Dtk_TopologicalEntityPtr &outTopo, Dtk_Body *_inParentBody)
Dtk_Loop::RemoveCoedgeFromLoop
Dtk_ErrorStatus RemoveCoedgeFromLoop(const Dtk_CoedgePtr &inCoedge)
Dtk_Body::_Copy
void _Copy(const Dtk_Body &inBodyToCopy)
Dtk_Shell::Dtk_Shell
Dtk_Shell(const Dtk_Shell &inTopo, Dtk_Body *inParentBody)
Dtk_TopologicalEntity::get_type_detk
virtual enum type_detk get_type_detk() const
Return Type of entity.
Dtk_Shell::GetParentVolume
Dtk_ErrorStatus GetParentVolume(Dtk_VolumePtr &outParentVolume) const
Return parent volume of shell.
Dtk_Coedge::GetParentBody
Dtk_BodyPtr GetParentBody() const
Dtk_Vertex::DtkDynamicCast
static Dtk_Vertex * DtkDynamicCast(Dtk_Object *inObject)
Cast object in vertex.
Dtk_Coedge::SetOrientation
Dtk_ErrorStatus SetOrientation(const Dtk_bool &inOrientation)
Set orientation for coedge relative to Edge.
Dtk_Edge::RemoveCoedge
void RemoveCoedge(const Dtk_ID &inCoedgeId)
Remove a Coedge to Edge's list of coedges.
Dtk_Edge::SetCoedges
Dtk_ErrorStatus SetCoedges(const Dtk_CoedgePtr &inFirstCoedge, const Dtk_CoedgePtr &inSecondCoedge)
Set Corresponding coedges.
Dtk_Edge::SetGeom
void SetGeom(const Dtk_CurvePtr &inCurve3D)
Set Geometry.
Dtk_Lump::DtkDynamicType
int DtkDynamicType(const int &inId)
Get smart pointer type.
Dtk_Shell::~Dtk_Shell
virtual ~Dtk_Shell()
DTK_TYPE_BODY
@ DTK_TYPE_BODY
Definition: define.h:481
Dtk_Coedge::GetParentLoop
Dtk_ErrorStatus GetParentLoop(Dtk_LoopPtr &outParentLoop) const
Get parent loop.
Dtk_Edge::_Reset
void _Reset()
Dtk_Shell::SetTopologyStatus
void SetTopologyStatus(Dtk_ErrorStatus inStatus)
Dtk_Shell::GetTopoID
Dtk_ID GetTopoID() const
Dtk_Shell::_Reset
void _Reset()
DTK_TYPE_FACE
@ DTK_TYPE_FACE
Definition: define.h:132
Dtk_Volume::GetTopoID
Dtk_ID GetTopoID() const
Dtk_Shell::GetWireSet
Dtk_ErrorStatus GetWireSet(const Dtk_Size_t &inIndex, Dtk_tab< Dtk_EntityPtr > &outWire) const
Get Wire Set.
Dtk_Face::ReverseNormal
Dtk_FacePtr ReverseNormal() const
Create a new face with reversed surface.
Dtk_Lump::ComputeBoundingBox
Dtk_ErrorStatus ComputeBoundingBox(Dtk_pnt &outMin, Dtk_pnt &outMax)
Dtk_Vertex::SetAsDeprecated
SetAsDeprecated("2022.1", "Use GetTolerance(Dtk_Double64 &outTolerance) method instead.") Dtk_Double64 GetTolerance()
Get Tolerance.
Dtk_TopologicalEntity::Clone
virtual Dtk_Object * Clone()
Definition: util_topology_dtk.hpp:38
Dtk_Body::_Private
Dtk_Handle * _Private
Definition: util_topology_dtk.hpp:815
Dtk_Volume::GetParentBody
Dtk_ErrorStatus GetParentBody(Dtk_Body *&outParentBody) const
Dtk_Vertex::_Reset
void _Reset()
Dtk_Edge::DtkDynamicType
int DtkDynamicType(const int &inId)
Get smart pointer type.
Dtk_Lump::Create
static Dtk_LumpPtr Create(const Dtk_BodyPtr &inParentBody)
Create a lump in a body.
Dtk_Loop::GetCoedge
Dtk_ErrorStatus GetCoedge(const Dtk_Size_t &inIndex, Dtk_CoedgePtr &outCoedge, Dtk_bool &outCoedgeOrientation) const
Get a coedge in the loop.
Dtk_Body::GetLump
Dtk_ErrorStatus GetLump(const Dtk_Size_t &inIndex, Dtk_LumpPtr &outLump) const
Dtk_Edge::Dtk_Edge
Dtk_Edge(const Dtk_Edge &inEdgeTpCopy, Dtk_Body *inParentBody)
Dtk_Coedge::SetParentBody
Dtk_ErrorStatus SetParentBody(const Dtk_BodyPtr &inParentBody)
Dtk_Lump::SetParentBody
Dtk_ErrorStatus SetParentBody(const Dtk_BodyPtr &inParentBody)
Set Parent Body.
Dtk_Shell::_Private
Dtk_Handle * _Private
Definition: util_topology_dtk.hpp:979
Dtk_Shell::AddFace
Dtk_ErrorStatus AddFace(const Dtk_FacePtr &inFace, Dtk_bool inFaceOrientation, DtkFaceType inFaceType=DtkFaceType_Bounded)
Add Face to shell.
Dtk_Coedge
Dtk_Coedge is a part of a loop. It's geometry is a UV curve on a surface.
Definition: util_topology_dtk.hpp:278
Dtk_Coedge::GetBasisSurface
Dtk_ErrorStatus GetBasisSurface(Dtk_SurfacePtr &outBasisSurface) const
Get basis surface.
Dtk_Vertex::_Copy
void _Copy(const Dtk_Vertex &inTopo, Dtk_Body *inParentBody)
Dtk_Loop::_Private
Dtk_Handle * _Private
Definition: util_topology_dtk.hpp:390
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
Dtk_Shell::GetFace
Dtk_ErrorStatus GetFace(const Dtk_Size_t &inIndex, Dtk_ID &outFaceId, Dtk_bool &outOrientation, DtkFaceType inFaceType=DtkFaceType_Bounded) const
Dtk_Face::SetGeom
void SetGeom(const Dtk_SurfacePtr &inSurface)
Set Geometry.
Dtk_Vertex::GetGeom
Dtk_PointPtr GetGeom() const
Return associated geometry.
Dtk_Body::Dtk_Body
Dtk_Body()
Dtk_Face::GetTopologyStatus
Dtk_ErrorStatus GetTopologyStatus() const
Dtk_Face::RemoveLoopFromFace
Dtk_ErrorStatus RemoveLoopFromFace(const Dtk_LoopPtr &inLoop)
Dtk_TopologicalEntity::~Dtk_TopologicalEntity
virtual ~Dtk_TopologicalEntity()
Dtk_Coedge::SetDegeneratedFlag
Dtk_ErrorStatus SetDegeneratedFlag()
Active Degenerated flag for coedge.
Dtk_Face::AddVertexLoop
Dtk_ErrorStatus AddVertexLoop(const Dtk_VertexPtr &inVertexLoop)
Add vertex loop on a face.
Dtk_Face::GetTrimUVBox
Dtk_ErrorStatus GetTrimUVBox(Dtk_Double64 outTrimValues[]) const
Get Surface Trim Box : Umin = outTrimValues[0] Umax = outTrimValues[1] Vmin = outTrimValues[2] Vmax =...
Dtk_Loop::GetVertexLoop
Dtk_ErrorStatus GetVertexLoop(Dtk_VertexPtr &outVertexLoop) const
Return vertex loop.
Dtk_Vertex::GetNumParentEdges
Dtk_Size_t GetNumParentEdges() const
Return Number of Parent Edge.
Dtk_Face::GetParentShell
Dtk_ErrorStatus GetParentShell(const Dtk_Size_t &inIndex, Dtk_ShellPtr &outParentShell) const
Get parent shell of face.
DTK_TYPE_LOOP
@ DTK_TYPE_LOOP
Definition: define.h:125
DTK_TYPE_TOPOLOGICAL_REPRESENTATION_ITEM
@ DTK_TYPE_TOPOLOGICAL_REPRESENTATION_ITEM
Definition: define.h:158
Dtk_Shell::_Store
virtual Dtk_ErrorStatus _Store(void *)
Dtk_Volume::DtkDynamicCast
static Dtk_Volume * DtkDynamicCast(Dtk_Object *inObject)
Dtk_Vertex
Vertex indicates bound of an edge. Vertex has Dtk_Point as geometry value.
Definition: util_topology_dtk.hpp:66
Dtk_Lump::~Dtk_Lump
virtual ~Dtk_Lump()
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
Dtk_Shell::SetClosedInfo
Dtk_ErrorStatus SetClosedInfo(const Dtk_bool &inClosedInfo)
Set Closed Info DTK_TRUE if shell is closed.
Dtk_Coedge::GetNumAdjacentCoedges
Dtk_Size_t GetNumAdjacentCoedges() const
Get Number of adjacent coedges.
Dtk_Vertex::SetParentBody
Dtk_ErrorStatus SetParentBody(const Dtk_BodyPtr &inParentBody)
Dtk_Loop::SetTopologyStatus
void SetTopologyStatus(Dtk_ErrorStatus inStatus)
Dtk_Loop::Dtk_Loop
Dtk_Loop()
Dtk_Edge::Create
static Dtk_EdgePtr Create(const Dtk_BodyPtr &inParentBody)
Create an edge in a body.
Dtk_Edge::GetNumCoedges
Dtk_Size_t GetNumCoedges() const
Get Number of coedges.
Dtk_Shell::GetWireSetTopo
Dtk_ErrorStatus GetWireSetTopo(const Dtk_Size_t &inIndex, Dtk_tab< Dtk_EntityPtr > &outWire, Dtk_tab< Dtk_bool > &outOrientation, Dtk_bool &outLoopOrientation) const
Get Wire Set.
Dtk_Edge::_Private
Dtk_Handle * _Private
Definition: util_topology_dtk.hpp:159
Dtk_Lump::GetParentBody
Dtk_BodyPtr GetParentBody() const
Dtk_Edge::SetStartVertex
Dtk_ErrorStatus SetStartVertex(const Dtk_VertexPtr &inVertex)
Set Start Vertex for edge.
Dtk_Shell::SetFace
Dtk_ErrorStatus SetFace(const Dtk_Size_t &inIndex, const Dtk_FacePtr &inFace, const Dtk_bool &inFaceOrientation)
Dtk_Loop::ComputeUVBoundingBox
Dtk_ErrorStatus ComputeUVBoundingBox(Dtk_pnt &outMin, Dtk_pnt &outMax, Dtk_bool inComputeFlag=DTK_FALSE)
Compute bounding Box of UV Boundaries if they exist.
Dtk_Coedge::GetAdjacentCoedge
Dtk_ErrorStatus GetAdjacentCoedge(const Dtk_Size_t &inIndex, Dtk_CoedgePtr &outAdjacentCoedge) const
Get adjacent coedges from index.
Dtk_Vertex::Dtk_Vertex
Dtk_Vertex(const Dtk_Vertex &inTopo, Dtk_Body *inParentBody)
Dtk_TopologicalEntity::GetTopoID
virtual Dtk_ID GetTopoID() const
DTK_TYPE_VOLUME
@ DTK_TYPE_VOLUME
Definition: define.h:483
Dtk_Volume::AddOpenShell
Dtk_ErrorStatus AddOpenShell(const Dtk_ShellPtr &inShell)
Add Open Shell (only one supported)
Dtk_Vertex::GetParentBody
Dtk_BodyPtr GetParentBody() const
Dtk_pnt
This is a mathematical point class.
Definition: dtk_pnt.hpp:20
Dtk_Edge::GetParentCoedge
Dtk_ErrorStatus GetParentCoedge(const Dtk_Size_t &inIndex, Dtk_ID &outCoedgeId) const
Dtk_Body::AddPtr
Dtk_ID AddPtr(const Dtk_TopologicalEntityPtr &outEntityPtr)
Dtk_Face::SetParentBody
Dtk_ErrorStatus SetParentBody(const Dtk_BodyPtr &inParentBody)
type_detk
type_detk
Definition: define.h:21
Dtk_Edge::DtkDynamicCast
static Dtk_Edge * DtkDynamicCast(Dtk_Object *inObject)
Dtk_Volume::~Dtk_Volume
virtual ~Dtk_Volume()
Dtk_Body::GetBodyStatus
Dtk_ErrorStatus GetBodyStatus() const
Dtk_Shell::AddWire
Dtk_ErrorStatus AddWire(Dtk_tab< Dtk_PointPtr > inPointArray)
Add Wire entities.
Dtk_Volume::Dtk_Volume
Dtk_Volume()
Dtk_Volume::Dtk_Volume
Dtk_Volume(const Dtk_Volume &inEdgeTpCopy, Dtk_Body *inParentBody)
Dtk_Face::GetLoop
Dtk_ErrorStatus GetLoop(const Dtk_Size_t &inIndex, Dtk_LoopPtr &outLoop) const
Get loop of face.
Dtk_Loop::ComputeUVBoundaries
Dtk_ErrorStatus ComputeUVBoundaries(Dtk_tab< Dtk_CurvePtr > &outUVBound, Dtk_bool inComputeFlag=0) const
Return an array of consecutive UV curves representing the loop.
Dtk_Body::GetTopologyStatus
Dtk_ErrorStatus GetTopologyStatus() const
Dtk_Edge::SetEndVertex
Dtk_ErrorStatus SetEndVertex(const Dtk_ID &inVertex)
define.h
Dtk_Lump::_Copy
void _Copy(const Dtk_Lump &inLumpToCopy, Dtk_Body *inParentBody)
Dtk_Shell::SetParentVolume
Dtk_ErrorStatus SetParentVolume(const Dtk_VolumePtr &inParentVolume)
Set parent volume of shell.
Dtk_Face::GetParentBody
Dtk_BodyPtr GetParentBody() const
DTK_TYPE_EDGE
@ DTK_TYPE_EDGE
Definition: define.h:119
Dtk_Shell::_Copy
void _Copy(const Dtk_Shell &inTopo, Dtk_Body *inParentBody)
Dtk_Lump::GetParentBody
Dtk_ErrorStatus GetParentBody(Dtk_BodyPtr &outParentBody) const
Get Parent Body.
Dtk_tab
This is a high level array class.
Definition: util_stl_dtk.hpp:84
Dtk_Vertex::Create
static Dtk_VertexPtr Create(const Dtk_BodyPtr &inParentBody)
Create a vertex in a body.
Dtk_Coedge::Create
static Dtk_CoedgePtr Create(const Dtk_BodyPtr &inParentBody)
Create a coedge in a body.
Dtk_Body::DtkDynamicCast
static Dtk_Body * DtkDynamicCast(Dtk_Object *inObject)
Dtk_Loop::IsVertexLoop
Dtk_bool IsVertexLoop() const
Return true if Loop is a vertex loop.
Dtk_Face::AddParentShell
Dtk_ErrorStatus AddParentShell(const Dtk_ShellPtr &inParentShell)
Add parent shell on a face.
Dtk_Edge::SetParentBody
Dtk_ErrorStatus SetParentBody(const Dtk_BodyPtr &inParentBody)
Dtk_Face::GetTopoID
Dtk_ID GetTopoID() const
Dtk_Volume::GetNumShells
Dtk_Size_t GetNumShells() const
Get Number of Shell in Volume.
Dtk_Volume::GetParentLump
Dtk_ErrorStatus GetParentLump(Dtk_LumpPtr &outParentLump) const
Get Parent Lump.
inFace
const Dtk_mesh_face * inFace
Definition: tess.h:288
Dtk_Body::_Init
void _Init()
Dtk_Edge::GetParentBody
Dtk_BodyPtr GetParentBody() const
Dtk_Vertex::_typeID
@ _typeID
Definition: util_topology_dtk.hpp:70
Dtk_Lump
A Dtk_Lump is a manifold part of a non manifold object If two volumes have a common edge you have to ...
Definition: util_topology_dtk.hpp:746
Dtk_Coedge::GetSize
virtual Dtk_Size_t GetSize() const
Dtk_Lump::GetVolume
Dtk_ErrorStatus GetVolume(const Dtk_Size_t inIndex, Dtk_ID &outVolumeId) const
Dtk_Coedge::IsDegenerated
Dtk_bool IsDegenerated() const
Indicates if Coedge is degenerated or not.
Dtk_Loop::SetCoedge
Dtk_ErrorStatus SetCoedge(const Dtk_Size_t &inIndex, const Dtk_CoedgePtr &inCoedge, const Dtk_bool &inOrientation)
Dtk_Vertex::DtkDynamicType
int DtkDynamicType(const int &inId)
Get smart pointer type.
Dtk_Loop::GetTopoID
Dtk_ID GetTopoID() const
Dtk_Vertex::~Dtk_Vertex
virtual ~Dtk_Vertex()
Dtk_Shell::HasWire
Dtk_bool HasWire() const
Return DTK_TRUE if shell has Wire entities.
Dtk_Loop::SetOrientation
Dtk_ErrorStatus SetOrientation(const Dtk_bool &inOrientation)
Set orientation for Loop relative to face.
Dtk_Body::SetAsDeprecated
SetAsDeprecated("2025.1", "Use Dtk_Body::AddOpenShell, Dtk_Volume::AddOuterShell or Dtk_Volume::AddInnerShell to get valid topology") Dtk_ErrorStatus AddShell(const Dtk_ShellPtr &inShell
Add Shell in Body in first volume of first lump (created if none)
Dtk_Shell::GetNumWireSet
Dtk_Size_t GetNumWireSet() const
Return Number of Wire set of entities equivalent to GetNumFaces with type DtkFaceType_Wire.
Dtk_Coedge::DtkDynamicType
int DtkDynamicType(const int &inId)
Get smart pointer type.
Dtk_Coedge::_Store
virtual Dtk_ErrorStatus _Store(void *)
Dtk_Edge::SetEndVertex
Dtk_ErrorStatus SetEndVertex(const Dtk_VertexPtr &inVertex)
Set End Vertex for edge.
Dtk_Object
Definition: dtk_object.hpp:8
Dtk_Edge::AddCoedge
Dtk_ErrorStatus AddCoedge(const Dtk_ID &inCoedgeId)
Dtk_Loop::GetParentBody
Dtk_ErrorStatus GetParentBody(Dtk_Body *&outParentBody) const
Dtk_TopologicalEntity::Transform
virtual Dtk_ErrorStatus Transform(const Dtk_transfo &inTransfo)
Transform object.
Dtk_TopologicalEntity::Dtk_TopologicalEntity
Dtk_TopologicalEntity(const Dtk_TopologicalEntity &inToBeCopied)
Definition: util_topology_dtk.hpp:33
Dtk_Vertex::SetTolerance
void SetTolerance(Dtk_Double64 inTol)
Set Tolerance.
Dtk_Loop::GetOrientation
Dtk_bool GetOrientation() const
Return orientation for Loop relative to face.
Dtk_Edge::GetGeom
Dtk_CurvePtr GetGeom(Dtk_bool inWithVerticesTrim=DTK_TRUE) const
Get edge geometry.
Dtk_Vertex::GetSize
virtual Dtk_Size_t GetSize() const
Internal Use.
Dtk_Face::SetTopologyStatus
void SetTopologyStatus(Dtk_ErrorStatus inStatus)
Dtk_Face::GetGeom
Dtk_SurfacePtr GetGeom(Dtk_bool inWithSetTrim=DTK_TRUE) const
Return associated geometry.
Dtk_Shell::Create
static Dtk_ShellPtr Create(const Dtk_BodyPtr &inParentBody)
Create a shell in a body.
Dtk_Volume
A Dtk_Volume is a space limited by edges. It contain one or several Dtk_Shell. If two objects have a ...
Definition: util_topology_dtk.hpp:661
Dtk_Edge::~Dtk_Edge
virtual ~Dtk_Edge()
Dtk_Coedge::~Dtk_Coedge
virtual ~Dtk_Coedge()
Dtk_TopologicalEntity::SetParentBody
virtual Dtk_ErrorStatus SetParentBody(const Dtk_BodyPtr &inParentBody)
Dtk_Edge::GetEndVertex
Dtk_ErrorStatus GetEndVertex(Dtk_ID &outVertexId) const
Dtk_Body::Dtk_Body
Dtk_Body(const Dtk_Body &inBodyToCopy)
Dtk_Volume::SetParentLump
Dtk_ErrorStatus SetParentLump(const Dtk_LumpPtr &inParentLump)
Set Parent Lump.
Dtk_Body::GetPtr
Dtk_TopologicalEntityPtr GetPtr(const Dtk_ID &inId) const
DTK_TYPE_SHELL
@ DTK_TYPE_SHELL
Definition: define.h:144
Dtk_Shell::_Clone
void _Clone(Dtk_TopologicalEntityPtr &outTopo, Dtk_Body *_inParentBody)
Dtk_Lump::GetSize
virtual Dtk_Size_t GetSize() const
Dtk_TopologicalEntity::GetParentBody
virtual Dtk_BodyPtr GetParentBody() const =0
Dtk_Loop::GetCoedge
Dtk_ErrorStatus GetCoedge(const Dtk_Size_t &inIndex, Dtk_ID &outCoedgeId, Dtk_bool &outCoedgeOrientation) const
Dtk_TopologicalEntity::Dtk_Body
friend class Dtk_Body
Definition: util_topology_dtk.hpp:36
Dtk_Loop::SetVertexLoop
Dtk_ErrorStatus SetVertexLoop(const Dtk_VertexPtr inVertexLoop)
Set vertex loop.
Dtk_Coedge::_Private
Dtk_Handle * _Private
Definition: util_topology_dtk.hpp:280
Dtk_Body
A Dtk_Body Dtk_Body is the highest level topological entity. It allow you to handle manifold and non-...
Definition: util_topology_dtk.hpp:813
Dtk_Shell::GetFace
Dtk_ErrorStatus GetFace(const Dtk_Size_t &inIndex, Dtk_FacePtr &outFace, Dtk_bool &outOrientation, DtkFaceType inFaceType=DtkFaceType_Bounded) const
Get Face following Face type.
Dtk_Face::GetNumParentShells
Dtk_Size_t GetNumParentShells() const
Return number of parent shell (1 if manifold body)
Dtk_Edge::_Init
void _Init()
Dtk_Loop::_Copy
void _Copy(const Dtk_Loop &inTopo, Dtk_Body *inParentBody)
Dtk_Edge::_Copy
void _Copy(const Dtk_Edge &inTopo, Dtk_Body *inParentBody)
Dtk_Volume::_Private
Dtk_Handle * _Private
Definition: util_topology_dtk.hpp:663
Dtk_Shell::RemoveFaceFromShell
Dtk_ErrorStatus RemoveFaceFromShell(const Dtk_FacePtr &inFace)
Dtk_Loop::Compute3DBoundaries
Dtk_ErrorStatus Compute3DBoundaries(Dtk_tab< Dtk_CurvePtr > &out3DBound, Dtk_bool inComputeFlag=0) const
Return an array of consecutive 3D curves representing the loop.
Dtk_Face::RemoveParentShell
void RemoveParentShell(const Dtk_ID &inShellId)
Remove a Shell to Shell's list of face.
Dtk_Shell::GetWireSetTopo
Dtk_ErrorStatus GetWireSetTopo(const Dtk_Size_t &inIndex, Dtk_tab< Dtk_EntityPtr > &outWire) const
Dtk_Loop::SetParentFace
Dtk_ErrorStatus SetParentFace(const Dtk_FacePtr &inParentFace)
Set pointer on parent face.
Dtk_Shell::SetOuterInfo
Dtk_ErrorStatus SetOuterInfo(const Dtk_bool &inOuterInfo)
Set Outer Info DTK_TRUE if shell is outer.
Dtk_Volume::_Store
virtual Dtk_ErrorStatus _Store(void *)
Dtk_Coedge::SetParentLoop
Dtk_ErrorStatus SetParentLoop(const Dtk_ID &inParentLoopId)
Dtk_Lump::Dtk_Lump
Dtk_Lump(const Dtk_Lump &inLumpToCopy, Dtk_Body *inParentBody)
Dtk_Volume::Create
static Dtk_VolumePtr Create(const Dtk_BodyPtr &inParentBody)
Create a volume in a body.
Dtk_Loop::GetParentBody
Dtk_BodyPtr GetParentBody() const
Dtk_Lump::_Store
virtual Dtk_ErrorStatus _Store(void *)
Dtk_Face::GetParentShell
Dtk_ErrorStatus GetParentShell(const Dtk_Size_t &inIndex, Dtk_ShellPtr &outParentShell, Dtk_bool &outOrient) const
Get parent shell of face.
Dtk_Entity
Definition: util_ent_dtk.hpp:371