DATAKIT SDK  V2026.4
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 
34  friend class Dtk_SmartPtr<Dtk_TopologicalEntity>;
35  friend class Dtk_Body;
36  virtual void _Clone( Dtk_TopologicalEntityPtr &outTopo,Dtk_Body * _inParentBody) = 0;
37  virtual Dtk_Object* Clone() {return NULL;}
38 
39 public:
40  virtual Dtk_ID GetTopoID() const;
41  virtual Dtk_ErrorStatus SetParentBody(const Dtk_BodyPtr &inParentBody);
42  virtual Dtk_BodyPtr GetParentBody() const = 0;
43  //! \brief Get smart pointer type
44  //! \param [in] inId :
45  //! \return int
46  int DtkDynamicType(const int& inId);
47  //! \brief Cast object in vertex
48  //! \param [in] inObject : object to cast
49  //! \return static Dtk_Vertex or NULL
51  //! \brief Return Type of entity
52  //! \return enum type_detk
53  virtual enum type_detk get_type_detk() const;
54  //! \brief Transform object
55  //! \param [in] inTransfo : matrix to apply
56  //! \return Dtk_ErrorStatus
57  virtual Dtk_ErrorStatus Transform(const Dtk_transfo& inTransfo);
58 };
59 
60 //! \ingroup TOPO
61 //! \class Dtk_Vertex
62 //! \brief Vertex indicates bound of an edge. Vertex has Dtk_Point as geometry value
63 //! \SmartPtr{Dtk_VertexPtr}
65 {
66 protected:
67  struct Dtk_Handle; // Not defined here
68  std::unique_ptr<Dtk_Handle> _Private; // Handle
69  enum { _typeID = DTK_TYPE_VERTEX };
70 
72  Dtk_Vertex(const Dtk_Vertex &inTopo, Dtk_Body *inParentBody);
73 
74  virtual ~Dtk_Vertex();
75  void _Clone( Dtk_TopologicalEntityPtr &outTopo,Dtk_Body * _inParentBody);
76  friend class Dtk_SmartPtr<Dtk_Vertex>;
77  friend class Dtk_TopologicalEntity;
78 
79 public:
80 
81  Dtk_ID GetTopoID() const;
82 
85 //! \brief Create a vertex in a body
86 //! \param [in] inParentBody : parent body
87 //! \return Dtk_VertexPtr created
88  static Dtk_VertexPtr Create(const Dtk_BodyPtr &inParentBody);
89 //! \brief Get smart pointer type
90 //! \param [in] inId :
91 //! \return int
92  int DtkDynamicType(const int& inId);
93 //! \brief Cast object in vertex
94 //! \param [in] inObject : object to cast
95 //! \return Casted Dtk_Vertex pointer or NULL
96  static Dtk_Vertex * DtkDynamicCast(Dtk_Object * inObject);
97 //! \brief Return Type of entity
98 //! \return enum type_detk
99  enum type_detk get_type_detk() const;
100 //! \brief Return Number of Parent Edge
101 //! \return Dtk_Size_t
103 //! \brief Return parent edge at inIndex
104 //! \param [in] inIndex : index of parent edge
105 //! \param [out] outParentEdge : pointer of parent edge
106 //! \return Dtk_ErrorStatus: dtkNoError if OK
107  Dtk_ErrorStatus GetParentEdge(const Dtk_Size_t& inIndex,Dtk_EdgePtr &outParentEdge) const;
108 //! \brief Add parent Edge
109 //! \param [in] inParentEdge : pointer of parent edge
110 //! \return Dtk_ErrorStatus: dtkNoError if OK
112 //! \brief Add parent Edge
113 //! \param [in] inParentEdgeId : UUID of parent edge
114 //! \return Dtk_ErrorStatus: dtkNoError if OK
115  Dtk_ErrorStatus AddParentEdge(const Dtk_ID &inParentEdgeId);
116 //! \brief Return associated geometry
117 //! \return Dtk_PointPtr
119 //! \brief Set Geometry
120 //! \param [in] inPoint : Point
121 //! \return void
122  void SetGeom(const Dtk_PointPtr& inPoint);
123  //! \brief Get Tolerance
124  //! \deprecated
125  //! \return double Tolerance
126  //! \deprecated Use GetTolerance(Dtk_Double64 &outTolerance) method instead.
127  SetAsDeprecated("2022.1", "Use GetTolerance(Dtk_Double64 &outTolerance) method instead.")
129 
130  //! \brief Get Tolerance
131  //! \param [out] outTolerance : vertex tolerance
132  //! \return dtkNoError if value set or dtkWarningDefaultValue if default
134 
135  //! \brief Set Tolerance
136  //! \param [in] inTol : Tolerance
138 
139  //! \brief Internal Use
140  virtual Dtk_ErrorStatus _Store(void*);
141  //! \brief Internal Use
142  virtual Dtk_Size_t GetSize() const;
143 };
144 
145 
146 //! \ingroup TOPO
147 //! \class Dtk_Edge
148 //! \brief Edge has two vertex for bounds. It has a 3D curve as geometry value
149 //! \brief Geometrical orientation relative to 3D Curve is always True
150 //! \SmartPtr{Dtk_EdgePtr}
152 {
153 protected:
154  struct Dtk_Handle; // Not defined here
155  std::unique_ptr<Dtk_Handle> _Private; // Handle
156  enum { _typeID = DTK_TYPE_EDGE };
157 
158  void _Clone( Dtk_TopologicalEntityPtr &outTopo,Dtk_Body * _inParentBody);
159 
161  Dtk_Edge(const Dtk_Edge& inEdgeTpCopy, Dtk_Body *inParentBody);
162  virtual ~Dtk_Edge();
163  friend class Dtk_SmartPtr<Dtk_Edge>;
164  friend class Dtk_TopologicalEntity;
165 
166 public:
167  Dtk_ID GetTopoID() const;
168 
171 
172  //! \brief Create an edge in a body
173  //! \param [in] inParentBody : parent body
174  //! \return Dtk_EdgePtr created
175  static Dtk_EdgePtr Create(const Dtk_BodyPtr &inParentBody);
176 
177  int DtkDynamicType(const int& inId);
178  static Dtk_Edge * DtkDynamicCast(Dtk_Object * inObject);
179 
180  //! \brief Get Start Vertex for edge
181  //! \param [out] :outVertex start vertex of edge
182  //! \return Dtk_ErrorStatus: dtkNoError if OK
184  Dtk_ErrorStatus GetStartVertex(Dtk_ID &outVertexId) const;
185  //! \brief Set Start Vertex for edge
186  //! \param [in] :inVertex start vertex to set
187  //! \return Dtk_ErrorStatus: dtkNoError if OK
190 
191  //! \brief Get End Vertex for edge
192  //! \param [out] :outVertex end vertex of edge
193  //! \return Dtk_ErrorStatus: dtkNoError if OK
195  Dtk_ErrorStatus GetEndVertex(Dtk_ID &outVertexId) const;
196 
197  //! \brief Set End Vertex for edge
198  //! \param [in] :inVertex end vertex to set
199  //! \return Dtk_ErrorStatus: dtkNoError if OK
202 
203  //! \brief Get Number of coedges
204  //! \return Number of coedges
206 
207  //! \brief Get Corresponding coedges from index
208  //! \param [in] :inIndex coedge index
209  //! \param [out] :outSecondCoedge coedge pointer
210  //! \return Dtk_ErrorStatus: dtkNoError if OK
211  Dtk_ErrorStatus GetParentCoedge(const Dtk_Size_t &inIndex,Dtk_CoedgePtr &outCoedge) const;
212  Dtk_ErrorStatus GetParentCoedge(const Dtk_Size_t &inIndex,Dtk_ID &outCoedgeId) const;
213 
214  //! \brief Set Corresponding coedges
215  //! \param [in] :inFirstCoedge
216  //! \param [in] :inSecondCoedge
217  //! \return Dtk_ErrorStatus: dtkNoError if OK
218  Dtk_ErrorStatus SetCoedges(const Dtk_CoedgePtr& inFirstCoedge,const Dtk_CoedgePtr& inSecondCoedge);
219 
220  //! \brief Add a Coedge to Edge
221  //! \param [in] :inCoedge
222  //! \return Dtk_ErrorStatus: dtkNoError if OK
224  Dtk_ErrorStatus AddCoedge(const Dtk_ID& inCoedgeId);
225 
226  //! \brief Remove a Coedge to Edge's list of coedges
227  //! \param [in] :inCoedge
228  void RemoveCoedge(const Dtk_ID &inCoedgeId);
229 
230 
231  enum type_detk get_type_detk() const;
232 
233  //! \brief Get edge geometry
234  //! \param [in] :inWithVerticesTrim if DTK_TRUE Curve is trimmed with vertices of edge
235  //! \return Dtk_CurvePtr
236  Dtk_CurvePtr GetGeom(Dtk_bool inWithVerticesTrim = DTK_TRUE) const;
237  //! \brief Set Geometry
238  //! \param [in] inCurve3D : 3D curve supporting the edge
239  //! \return void
240  void SetGeom(const Dtk_CurvePtr& inCurve3D);
241  //! \brief Get Tolerance
242  //! \deprecated Use GetTolerance(Dtk_Double64 &outTolerance) method instead.
243  //! \return double Tolerance
244  SetAsDeprecated("2022.1", "Use GetTolerance(Dtk_Double64 &outTolerance) method instead.")
246 
247  //! \brief Get Tolerance
248  //! \param [out] outTolerance : edge tolerance
249  //! \return dtkNoError if value set or dtkWarningDefaultValue if default
251 
252  //! \brief Set Tolerance
253  //! \param [in] inTol : Tolerance
255 
256  //! \brief Internal Use
257  virtual Dtk_ErrorStatus _Store(void*);
258 
259  //! \brief Internal Use
260  virtual Dtk_Size_t GetSize() const;
261 };
262 
263 //! \ingroup TOPO
264 //! \class Dtk_Coedge
265 //! \brief Dtk_Coedge is a part of a loop. It's geometry is a UV curve on a surface
266 //! \brief Orientation is topological orientation relative to Edge
267 //! \brief Geometrical orientation relative to UV Curve is always True
268 //! \SmartPtr{Dtk_CoedgePtr}
270 {
271 protected:
272  struct Dtk_Handle; // Not defined here
273  std::unique_ptr<Dtk_Handle> _Private; // Handle
275 
276  void _Clone( Dtk_TopologicalEntityPtr &outTopo,Dtk_Body * _inParentBody);
277 
279  Dtk_Coedge(const Dtk_Coedge& inCoedgeToCopy,Dtk_Body *inParentBody);
280  virtual ~Dtk_Coedge();
281  friend class Dtk_SmartPtr<Dtk_Coedge>;
282  friend class Dtk_TopologicalEntity;
283 
284 public:
285  Dtk_ID GetTopoID() const;
286 
289 
290  //! \brief Create a coedge in a body
291  //! \param [in] inParentBody : parent body
292  //! \return Dtk_CoedgePtr created
293  static Dtk_CoedgePtr Create(const Dtk_BodyPtr &inParentBody);
294 
295  //downcasting
296  int DtkDynamicType(const int& inId);
297  static Dtk_Coedge * DtkDynamicCast(Dtk_Object * inObject);
298 
299  //! \brief Return orientation for coedge relative to Edge
300  //! \return True if coedge and associated Edge has same sens
302  //! \brief Set orientation for coedge relative to Edge
303  //! \param [in] :inOrientation true if coedge and associated Edge has same sens
304  //! \return Dtk_ErrorStatus: dtkNoError if OK
305  Dtk_ErrorStatus SetOrientation(const Dtk_bool& inOrientation);
306 
307  //! \brief Indicates if Coedge is degenerated or not
308  //! \return DTK_TRUE, DTK_FALSE, or DTK_BOOL_UNKNOWN
310  //! \brief Active Degenerated flag for coedge
311  //! \return Dtk_ErrorStatus: dtkNoError if OK
313 
314 
315  //! \brief Get Edge for coedge
316  //! \param [out] :outEdge Corresponding Edge
317  //! \return Dtk_ErrorStatus: dtkNoError if OK
319 
320  //! \brief Set Edge for coedge
321  //! \param [in] :inEdge Corresponding Edge
322  //! \return Dtk_ErrorStatus: dtkNoError if OK
324  Dtk_ErrorStatus SetEdge(const Dtk_ID &inEdgeId);
325 
326  //! \brief Get Number of adjacent coedges
327  //! \return Number of adjacent coedges
329 
330  //! \brief Get adjacent coedges from index
331  //! \param [in] :inIndex coedge index
332  //! \param [out] :outAdjacentCoedge coedge pointer
333  //! \return Dtk_ErrorStatus: dtkNoError if OK
334  Dtk_ErrorStatus GetAdjacentCoedge(const Dtk_Size_t &inIndex, Dtk_CoedgePtr &outAdjacentCoedge) const;
335 
336  //! \brief Get parent loop
337  //! \param [out] :outParentLoop
338  //! \return Dtk_ErrorStatus: dtkNoError if OK
340 
341  //! \brief Get parent face
342  //! \param [out] :outParentFace
343  //! \return Dtk_ErrorStatus: dtkNoError if OK
345 
346  //! \brief Get basis surface
347  //! \param [out] :outBasisSurface
348  //! \return Dtk_ErrorStatus: dtkNoError if OK
350 
351  //! \brief Set parent loop
352  //! \param [in] :inParentLoop
353  //! \return Dtk_ErrorStatus: dtkNoError if OK
355  Dtk_ErrorStatus SetParentLoop(const Dtk_ID &inParentLoopId);
356 
357  enum type_detk get_type_detk() const;
358 
359  //! \brief Get Geometry
360  //! \return Dtk_CurvePtr
362  //! \brief Set Geometry
363  //! \param [in] inCurveUV : Curve UV
364  void SetGeom(const Dtk_CurvePtr& inCurveUV);
365  virtual Dtk_ErrorStatus _Store(void*);
366  virtual Dtk_Size_t GetSize() const;
368 };
369 
370 //! \ingroup TOPO
371 //! \class Dtk_Loop
372 //! \brief Dtk_Loop is bound of a face it can be outer or inner
373 //! \SmartPtr{Dtk_LoopPtr}
374 //!
376 {
377 protected:
378  struct Dtk_Handle; // Not defined here
379  std::unique_ptr<Dtk_Handle> _Private; // Handle
380  enum { _typeID = DTK_TYPE_LOOP };
381 
382  Dtk_ErrorStatus SetCoedge(const Dtk_Size_t &inIndex, const Dtk_CoedgePtr &inCoedge,const Dtk_bool &inOrientation);
383 
384  void _Clone( Dtk_TopologicalEntityPtr &outTopo,Dtk_Body * _inParentBody);
385 
387  Dtk_Loop(const Dtk_Loop &inTopo,Dtk_Body *inParentBody);
388  virtual ~Dtk_Loop();
389  Dtk_ErrorStatus GetParentBody(Dtk_Body* &outParentBody) const;
390  friend class Dtk_SmartPtr<Dtk_Loop>;
391  friend class Dtk_TopologicalEntity;
392 
393 public:
394  Dtk_ID GetTopoID() const;
398 
399  //downcasting
400  int DtkDynamicType(const int& inId);
402 
407 
408 
409  //! \brief Create a loop in a body
410  //! \param [in] inParentBody : parent body
411  //! \return Dtk_LoopPtr created
412  static Dtk_LoopPtr Create(const Dtk_BodyPtr &inParentBody);
413 
414  //! \brief Create a loop in a body
415  //! \param [in] inParentBody : parent body
416  //! \param [in] inCoedgeReserve : Coedge size to reserve
417  //! \return Dtk_LoopPtr created
418  static Dtk_LoopPtr Create(const Dtk_BodyPtr &inParentBody,Dtk_UInt32 inCoedgeReserve);
419 
420  //! \brief Return true if Loop is outer
421  Dtk_bool IsOuter() const;
422  //! \brief Return true if Loop is a vertex loop
424 
425  //! \brief Return orientation for Loop relative to face
426  //! \return True if material is on the left
428  //! \brief Set orientation for Loop relative to face
429  //! \param [in] :inOrientation True if material is on the left
430  //! \return Dtk_ErrorStatus: dtkNoError if OK
431  Dtk_ErrorStatus SetOrientation(const Dtk_bool& inOrientation);
432 
433  //! \brief Return number of coedge in the loop
435  //! \brief Get a coedge in the loop
436  //! \param [in] : inIndex index of coedge to get
437  //! \param [out] : outCoedge : pointer on coedge you ask
438  //! \param [out] : outCoedgeOrientationIsSameAsLoop : true if coedge and loop have the same orientation
439  //! \return Dtk_ErrorStatus: dtkNoError if OK
440  Dtk_ErrorStatus GetCoedge(const Dtk_Size_t& inIndex,Dtk_CoedgePtr &outCoedge,Dtk_bool &outCoedgeOrientationIsSameAsLoop) const;
441  Dtk_ErrorStatus GetCoedge(const Dtk_Size_t& inIndex,Dtk_ID &outCoedgeId,Dtk_bool &outCoedgeOrientationIsSameAsLoop ) const;
442 
443 
444  //! \brief Get an index of a coedge in the loop
445  //! \param [in] : inCoedge : pointer on coedge you want the index
446  //! \param [out] : outIndex index of the coedge
447  //! \return Dtk_ErrorStatus: dtkNoError if found
449 
450 
451  //! \brief Add coedge to the loop
452  //! \param [in] : inCoedge : pointer on coedge you add
453  //! \param [in] : inCoedgeOrientation : orientation of coedge in the loop (true is loop and coedge have the same orientation)
454  //! \return Dtk_ErrorStatus: dtkNoError if OK
455  Dtk_ErrorStatus AddCoedge(const Dtk_CoedgePtr &inCoedge,const Dtk_bool &inCoedgeOrientation);
456  Dtk_ErrorStatus SetCoedges(const Dtk_tab<Dtk_CoedgePtr>& inCoedgeArray,const Dtk_tab<Dtk_bool > &inCoedgeOrientationArray);
457 
458  //! \brief Return vertex loop
459  //! \param [out] : outVertexLoop : pointer on vertex loop
460  //! \return Dtk_ErrorStatus: dtkNoError if OK
462  //! \brief Set vertex loop
463  //! \param [in] : inVertexLoop : pointer on vertex loop
464  //! \return Dtk_ErrorStatus: dtkNoError if OK
466 
467  //! \brief Return an array of consecutive UV curves representing the loop
468  //! \param [out]: outUVBound : array of consecutive UV curves
469  //! \param [in]: inComputeFlag : Force computation if not filled
470  //! \return Dtk_ErrorStatus: dtkNoError if OK
472  //! \brief Return an array of consecutive 3D curves representing the loop
473  //! \param [out]: out3DBound : array of consecutive 3D curves
474  //! \param [in]: inComputeFlag : Force computation if not filled
475  //! \return Dtk_ErrorStatus: dtkNoError if OK
477 
478  //! \brief Return pointer on parent face
479  //! \param [out]: outParentFace : parent face
480  //! \return Dtk_ErrorStatus: dtkNoError if OK
482 
483  //! \brief Set pointer on parent face
484  //! \param [in]: inParentFace : parent face
485  //! \return Dtk_ErrorStatus: dtkNoError if OK
487  Dtk_ErrorStatus SetParentFace(const Dtk_ID &inParentFaceId);
488 
489  //! \brief Inverse sens of all coedges in the loop
490  //! \return Dtk_ErrorStatus: dtkNoError if OK
492 
493  //! \brief Compute bounding Box of UV Boundaries if they exist
494  //! \param [out]: outMin : Umin and Vmin coordinates
495  //! \param [out]: outMax : Umax and Vmax coordinates
496  //! \param [in]: inComputeFlag : TRUECompute Uv boundaries if doesn't exist
497  //! \return Dtk_ErrorStatus: dtkNoError if OK
499 
500  //! \brief Compute bounding Box of 3d Boundaries if they exist
501  //! \param [out]: outMin : Umin and Vmin coordinates
502  //! \param [out]: outMax : Umax and Vmax coordinates
503  //! \return Dtk_ErrorStatus: dtkNoError if OK
505 
506  virtual Dtk_ErrorStatus _Store(void*);
507  virtual Dtk_Size_t GetSize() const;
508 };
509 
510 //! \ingroup TOPO
511 //! \class Dtk_Face
512 //! \brief is a surface bounded by Dtk_Loop.
513 //! \brief Geometrical orientation relative to basis surface is always True
514 //! \SmartPtr{Dtk_FacePtr}
516 {
517 protected:
518  struct Dtk_Handle; // Not defined here
519  std::unique_ptr<Dtk_Handle> _Private; // Handle
520  enum { _typeID = DTK_TYPE_FACE };
521 
522  Dtk_ErrorStatus SetLoop(const Dtk_Size_t &inIndex, const Dtk_LoopPtr &inLoop);
523  void _Clone( Dtk_TopologicalEntityPtr &outTopo,Dtk_Body * _inParentBody);
524 
525  friend class Dtk_SmartPtr<Dtk_Face>;
526  friend class Dtk_TopologicalEntity;
527 
528  //constructors
530  Dtk_Face(const Dtk_Face &inTopo,Dtk_Body *inParentBody);
531 
532  virtual ~Dtk_Face();
533 public:
534  Dtk_ID GetTopoID() const;
535 
538 
540 
541  //! \brief Create a face in a body
542  //! \param [in] inParentBody : parent body
543  //! \return Dtk_FacePtr created
544  static Dtk_FacePtr Create(const Dtk_BodyPtr &inParentBody);
545 
546  //downcasting
547  int DtkDynamicType(const int& inId);
548  static Dtk_Face * DtkDynamicCast(Dtk_Object * inObject);
549 
552 
553  //! \brief Return number of parent shell (1 if manifold body)
555 
556  //! \brief Get parent shell of face
557  //! \param [in] : inIndex : index of parent shell
558  //! \param [out] : outParentShell : parent shell
559  //! \return Dtk_ErrorStatus: dtkNoError if OK
560  Dtk_ErrorStatus GetParentShell(const Dtk_Size_t & inIndex,Dtk_ShellPtr &outParentShell) const;
561 
562  //! \brief Get parent shell of face
563  //! \param [in] : inIndex : index of parent shell
564  //! \param [out] : outParentShell : parent shell
565  //! \param [out] : outOrient : face orientation in parent shell
566  //! \return Dtk_ErrorStatus: dtkNoError if OK
567  Dtk_ErrorStatus GetParentShell(const Dtk_Size_t & inIndex,Dtk_ShellPtr &outParentShell, Dtk_bool& outOrient) const;
568 
569  //! \brief Add parent shell on a face
570  //! \param [in] : inParentShell shell to add
571  //! \return Dtk_ErrorStatus: dtkNoError if OK
573  Dtk_ErrorStatus AddParentShell(const Dtk_ID &inParentShellId);
574 
575  //! \brief Return number of bounding loop for face
577 
578  //! \brief Get loop of face
579  //! \param [in] : inIndex : index of loop
580  //! \param [out] : outLoop : loop
581  //! \return Dtk_ErrorStatus: dtkNoError if OK
582  Dtk_ErrorStatus GetLoop(const Dtk_Size_t& inIndex,Dtk_LoopPtr &outLoop) const;
583  Dtk_ErrorStatus GetLoop(const Dtk_Size_t & inIndex,Dtk_ID &outLoopId) const;
584  //! \brief Add Degenerated UV curves in loops
585  //! \return Dtk_ErrorStatus: dtkNoError if OK
587 
588  //! \brief Add inner loop on a face
589  //! \param [in] : inLoop : inner loop to add
590  //! \return Dtk_ErrorStatus: dtkNoError if OK
592  //! \brief Add outer loop on a face
593  //! \param [in] : inLoop : outer loop to add
594  //! \return Dtk_ErrorStatus: dtkNoError if OK
596  //! \brief Add vertex loop on a face
597  //! \param [in] : inLoop : vertex loop to add
598  //! \return Dtk_ErrorStatus: dtkNoError if OK
600  //! \brief Add loop on a face
601  //! \param [in] : inLoop : loop to add
602  //! \param [in] : inOuterInfo : outer info for inLoop (True if outer)
603  //! \return Dtk_ErrorStatus: dtkNoError if OK
604  Dtk_ErrorStatus AddLoop(const Dtk_LoopPtr & inLoop,const Dtk_bool& inOuterInfo);
605 
606  enum type_detk get_type_detk() const;
607 
608  //! \brief Return associated geometry
609  //! \param [in] : inWithSetTrim if DTK_TRUE surface set trimuvbox like the face
610  //! \return Dtk_SurfacePtr
611  Dtk_SurfacePtr GetGeom( Dtk_bool inWithSetTrim = DTK_TRUE ) const;
612  //! \brief Set Geometry
613  //! \param [in] inSurface : Basis Surface
614  //! \return void
615  void SetGeom(const Dtk_SurfacePtr& inSurface);
616 
617  //! \brief Get Surface Trim Box : Umin = outTrimValues[0] Umax = outTrimValues[1] Vmin = outTrimValues[2] Vmax = outTrimValues[3]
618  Dtk_ErrorStatus GetTrimUVBox(Dtk_Double64 outTrimValues[]) const;
619  //! \brief Set Surface Trim Box : Umin = inTrimValues[0] Umax = inTrimValues[1] Vmin = inTrimValues[2] Vmax = inTrimValues[3]
621 
622  //! \brief Create a new face with reversed surface
623  //! \return a new single face with reversed normal
625 
627  virtual Dtk_ErrorStatus _Store(void*);
628  virtual Dtk_Size_t GetSize() const;
629 
630  //! \brief Remove a Shell to Shell's list of face
631  //! \param [in] :inShellId
632  void RemoveParentShell( const Dtk_ID &inShellId );
633 };
634 
635 
636 
637 //! \ingroup TOPO
638 //! \class Dtk_Volume
639 //! \brief A Dtk_Volume is a space limited by edges. It contain one or several Dtk_Shell.
640 //! If two objects have a common face without common edge you have to create 2 volumes.
641 //! \SmartPtr{Dtk_VolumePtr}
643 {
644 protected:
645  struct Dtk_Handle; // Not defined here
646  std::unique_ptr<Dtk_Handle> _Private; // Handle
648 
649  Dtk_Volume(const Dtk_Volume& inEdgeTpCopy, Dtk_Body *inParentBody);
651  virtual ~Dtk_Volume();
652  Dtk_ErrorStatus GetParentBody(Dtk_Body* &outParentBody) const;
653  friend class Dtk_SmartPtr<Dtk_Volume>;
654  friend class Dtk_TopologicalEntity;
655  void _Clone( Dtk_TopologicalEntityPtr &outTopo,Dtk_Body * _inParentBody);
656 
657 public:
658  Dtk_ID GetTopoID() const;
659 
662 
663  //! \brief Create a volume in a body
664  //! \param [in] inParentBody : parent body
665  //! \return Dtk_VolumePtr created
666  static Dtk_VolumePtr Create(const Dtk_BodyPtr &inParentBody);
667 
668  //downcasting
669  int DtkDynamicType(const int& inId);
670  static Dtk_Volume * DtkDynamicCast(Dtk_Object * inObject);
671 
674 
675  //! \brief Get Parent Lump
676  //! \param [out] outParentLump : parent lump
677  //! \return Dtk_ErrorStatus: dtkNoError if OK
679  //! \brief Set Parent Lump
680  //! \param [in] inParentLump : parent lump
681  //! \return Dtk_ErrorStatus: dtkNoError if OK
683  Dtk_ErrorStatus SetParentLump(const Dtk_ID& inParentLumpId);
684 
685  //! \brief Get Number of Shell in Volume
686  //! \return Number of Shell in Volume
688 
689  //! \brief Get Shell
690  //! \param [in] inIndex : index of shell
691  //! \param [out] outShell : pointer on shell
692  //! \return Dtk_ErrorStatus: dtkNoError if OK
693  Dtk_ErrorStatus GetShell(const Dtk_Size_t& inIndex,Dtk_ShellPtr &outShell) const;
694  Dtk_ErrorStatus GetShell(const Dtk_Size_t& inIndex,Dtk_ID &outShellId) const;
695 
696  //! \brief Add Open Shell (only one supported)
697  //! \param [in] inShell : pointer on outer shell
698  //! \return Dtk_ErrorStatus: dtkNoError if OK error if body has already a closed (inner or outer )shell
700  //! \brief Add Outer Shell (only one supported)
701  //! \param [in] inShell : pointer on outer shell
702  //! \return Dtk_ErrorStatus: dtkNoError if OK error if body has already an open shell or an outer shell
704  //! \brief Add Inner Shell
705  //! \param [in] inShell : pointer on inner shell
706  //! \return Dtk_ErrorStatus: dtkNoError if OK
708  //! \brief Add Wire Shell
709  //! \param [in] inShell : pointer on inner shell
710  //! \return Dtk_ErrorStatus: dtkNoError if OK
711  Dtk_ErrorStatus AddWireShell(const Dtk_ShellPtr &inShell);
712 
713  enum type_detk get_type_detk() const;
715  virtual Dtk_ErrorStatus _Store(void*);
716  virtual Dtk_Size_t GetSize() const;
717 };
718 
719 //! \ingroup TOPO
720 //! \class Dtk_Lump
721 //! \brief A Dtk_Lump is a manifold part of a non manifold object
722 //! If two volumes have a common edge you have to create two lumps with a volume in each
723 //! \SmartPtr{Dtk_LumpPtr}
725 {
726 protected:
727  struct Dtk_Handle; // Not defined here
728  std::unique_ptr<Dtk_Handle> _Private; // Handle
729  enum { _typeID = DTK_TYPE_LUMP };
730 
732  Dtk_Lump(const Dtk_Lump& inLumpToCopy,Dtk_Body *inParentBody);
733  virtual ~Dtk_Lump();
734  friend class Dtk_SmartPtr<Dtk_Lump>;
735  friend class Dtk_TopologicalEntity;
736  void _Clone( Dtk_TopologicalEntityPtr &outTopo,Dtk_Body * _inParentBody);
737 
738 public:
739  Dtk_ID GetTopoID() const;
740 
741  //! \brief Create a lump in a body
742  //! \param [in] inParentBody : parent body
743  //! \return Dtk_LumpPtr created
744  static Dtk_LumpPtr Create(const Dtk_BodyPtr &inParentBody);
745 
746  //downcasting
747  int DtkDynamicType(const int& inId);
748  static Dtk_Lump * DtkDynamicCast(Dtk_Object * inObject);
749 
752 
753  //! \brief Get Number of Volumes in lump
754  //! \return Number of Volumes in lump
756  //! \brief Get Volume
757  //! \param [in] inIndex : index of volume
758  //! \param [out] outVolume : pointer on volume
759  //! \return Dtk_ErrorStatus: dtkNoError if OK
760  Dtk_ErrorStatus GetVolume(const Dtk_Size_t inIndex,Dtk_VolumePtr &outVolume) const;
761  Dtk_ErrorStatus GetVolume(const Dtk_Size_t inIndex,Dtk_ID &outVolumeId) const;
762  //! \brief Add Volume
763  //! \param [in] inVolume : pointer on volume
764  //! \return Dtk_ErrorStatus: dtkNoError if OK
766  //! \brief Get Parent Body
767  //! \param [out] outParentBody : parent body
768  //! \return Dtk_ErrorStatus: dtkNoError if OK
770  //! \brief Set Parent Body
771  //! \param [in] inParentBody : parent body
772  //! \return Dtk_ErrorStatus: dtkNoError if OK
775 
776  enum type_detk get_type_detk() const;
778  virtual Dtk_ErrorStatus _Store(void*);
779  virtual Dtk_Size_t GetSize() const;
780 };
781 
782 //! \ingroup TOPO
783 //! \class Dtk_Body
784 //! \brief A Dtk_Body Dtk_Body is the highest level topological entity.
785 //! It allow you to handle manifold and non-manifold object , open skin or surfacic model and wire entities.
786 //! \SmartPtr{Dtk_BodyPtr}
787 class Dtk_Body:public Dtk_Entity
788 {
789 protected:
790  struct Dtk_Handle; // Not defined here
791  std::unique_ptr<Dtk_Handle> _Private; // Handle
792  enum { _typeID = DTK_TYPE_BODY };
793 
794  //! \sa Create( const Dtk_Body& )
795  Dtk_Body(const Dtk_Body& );
797  virtual ~Dtk_Body();
798  friend class Dtk_SmartPtr<Dtk_Body>;
799  inline virtual Dtk_Object* Clone() { return new Dtk_Body(*this); }
800 public:
802 
803  //! \brief Create a body
804  //! \return Dtk_BodyPtr created
805  static Dtk_BodyPtr Create();
806  //! \CreateCopy{ in }
807  static Dtk_BodyPtr Create( const Dtk_Body& in );
808 
809  //downcasting
810  int DtkDynamicType(const int& inId);
811  static Dtk_Body* DtkDynamicCast(Dtk_Object * inObject);
812 
813 
819  Dtk_ErrorStatus GetLump(const Dtk_Size_t& inIndex,Dtk_LumpPtr &outLump) const;
820  Dtk_ErrorStatus GetLump(const Dtk_Size_t& inIndex,Dtk_ID &outLumpId) const;
823  Dtk_ID AddPtr(const Dtk_TopologicalEntityPtr &outEntityPtr);
824 
825  //! \brief Add Shell in Body in first volume of first lump (created if none)
826  //! \param [in] inShell : pointer on inner shell
827  //! \param [in] inOuterInfo : DTK_TRUE if outer - DTK_FALSE if inner not yet supported -
828  //! \param [in] inClosedInfo : DTK_TRUE if closed DTK_FALSE if open
829  //! \return Dtk_ErrorStatus: dtkNoError if OK error if body has 2 open shell or 2 outer shell or dtkWarningTopologyIncomplete if inOuterInfo == DTK_FALSE
830  //! \deprecated Use Dtk_Body::AddOpenShell, Dtk_Volume::AddOuterShell or Dtk_Volume::AddInnerShell to get valid topology
831  SetAsDeprecated("2025.1", "Use Dtk_Body::AddOpenShell, Dtk_Volume::AddOuterShell or Dtk_Volume::AddInnerShell to get valid topology")
832  Dtk_ErrorStatus AddShell(const Dtk_ShellPtr &inShell, const Dtk_bool &inOuterInfo,const Dtk_bool &inClosedInfo);
833  //
834  //! \brief Add Open Shell in first volume of first lump (created if none)
835  //! \param [in] inShell : pointer on outer open shell
836  //! \return Dtk_ErrorStatus: dtkNoError if OK error if body has already a closed (inner or outer )shell
837  Dtk_ErrorStatus AddOpenShell(const Dtk_ShellPtr &inShell);
838  Dtk_ErrorStatus AddOpenShell2(const Dtk_ShellPtr &inShell, Dtk_VolumePtr &volume);
839 
840  //! \brief Return Number of Open Shell
841  //! \return Dtk_Size_t
842  Dtk_Size_t GetNumOpenShells()const;
843  //! \brief Return Open Shell
844  //! \param [in] inIndex : index of Open Shell
845  //! \param [out] outShell : pointer on open shell
846  //! \return Dtk_ErrorStatus: dtkNoError if OK
847  Dtk_ErrorStatus GetOpenShell(Dtk_Size_t inIndex,Dtk_ShellPtr &outShell)const;
848 
849  //! \brief Add Open Shell with a one Unbounded Surface
850  //! \param [in] inSurface : pointer on surface
851  //! \param [in] InOrient : Face orientation relative to shell (DTK_TRUE if face material and shell material are on same side)
852  //! \return Dtk_ErrorStatus: dtkNoError if OK error if body has already a shell
853  Dtk_ErrorStatus AddUnboundedFace(Dtk_SurfacePtr inSurface, Dtk_bool InOrient = DTK_TRUE);
854 
855  //! \brief Add Wire Shell
856  //! \param [in] inShell : pointer on wire shell
857  //! \return Dtk_ErrorStatus: dtkNoError if OK
858  Dtk_ErrorStatus AddWireShell(const Dtk_ShellPtr &inShell);
859 
861  enum type_detk get_type_detk() const;
862 
863  int GetWireCurves (Dtk_tab<Dtk_CurvePtr> &curves);
864  int GetWireEntities (Dtk_tab<Dtk_CurvePtr> &curves,Dtk_tab<Dtk_PointPtr>& points);
865 
866  Dtk_ErrorStatus ComputeBoundingBox(Dtk_pnt& outMin, Dtk_pnt& outMax);
867  Dtk_ErrorStatus Store(FILE* inFile,Dtk_Size_t inIo=1);
868  Dtk_ErrorStatus Store(const Dtk_string& inFile,Dtk_Size_t inIo=1);
870  virtual Dtk_Size_t GetSize() const;
871 
872  //! \brief Removes all references to inVertexToRemove and replace it by inVertexToKeep
873  //! \param [in] inVertexToKeep : Vertex to use
874  //! \param [in] inVertexToRemove : Vertex to remove
875  //! \return Dtk_ErrorStatus: dtkNoError if OK
876  Dtk_ErrorStatus MergeVertices(Dtk_VertexPtr inVertexToKeep,Dtk_VertexPtr inVertexToRemove);
877 
878  //! \brief Returns DTK_TRUE if Body contains faces with surfaces
879  Dtk_bool HasFaces();
880 
881  //! \brief Returns DTK_TRUE if Body contains wireframe
882  Dtk_bool HasWire();
883 
884  //! \brief Returns DTK_TRUE if Body contains periodic surfaces
885  Dtk_bool HasPeriodicSurface();
886 
887  //! \brief Returns DTK_TRUE if Body contains mesh surfaces
888  Dtk_bool HasMeshSurface();
889 
890  //! \brief Transforms all curves and surfaces in the body into NURBS
891  //! \param [in] inRemoveTrimmedCurve : Convert Trimmed Nurbs into Nurbs
892  //! \return Dtk_ErrorStatus: dtkNoError if OK
893  Dtk_ErrorStatus ToNurbs(Dtk_bool inRemoveTrimmedCurve = 0);
894 
895  //! \brief Get Tolerance
896  //! \param [out] outTolerance : body tolerance
897  //! \return dtkNoError if value set or dtkWarningDefaultValue if default
899 
900  //! \brief Set Tolerance
901  //! \param [in] inTol : Tolerance
903 
904  //! \brief Get Num entities
905  //! \param [in] inType : Type of entities to count
906  Dtk_Size_t GetNumTopologicalEntities(type_detk inType);
907 
908  //! \brief Get entity with Info->GetId() == inInfoId
909  //! \param [in] inInfoId : Info->GetId() of entity to be found
910  //! \deprecated
911  //! \sa Dtk_Body::GetEntities(const Dtk_ID& inInfoId, Dtk_tab<Dtk_EntityPtr> &outTab)
912  //SetAsDeprecated( L"2016.1", L"Use Dtk_Body::GetEntities instead.")
913  Dtk_EntityPtr GetEntity(const Dtk_ID& inInfoId ) const;
914 
915  //! \brief Get entities with Info->GetId() == inInfoId
916  //! \param [in] inInfoId : Info->GetId() of entities to be found
917  //! \param [in] inLookAlsoForCurve : if set to DTK_TRUE, Dtk_Entity retrieved can also include Dtk_CurvePtr. Otherwise, only Dtk_TopologicalEntity can be retrieved.
918  //! \remark : several entities can have same identifiers (e.g. splitted entities....)
919  Dtk_ErrorStatus GetEntities(const Dtk_ID& inInfoId, Dtk_tab<Dtk_EntityPtr> &outTab, Dtk_bool inLookAlsoForCurve = DTK_TRUE ) const;
920 
921  //! \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.
922  //! This allows efficient retrieval of all entities associated with a given identifier (including cases where entities have been split).
923  //! 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.
924  //! \param [out] outMap : mapping table Dtk_ID -> list of entity indices in the body.
925  //! \return Dtk_ErrorStatus : dtkNoError if the mapping was successfully filled
926  Dtk_ErrorStatus FillTopologicalEntitiesIdMapping( std::unordered_map<Dtk_ID, std::vector<Dtk_Size_t>>& outMap );
927 
928  Dtk_ErrorStatus Normalize(Dtk_bool updateEdgeGeometry = DTK_TRUE);
929  Dtk_ErrorStatus RevolToStandardRevol();
930  Dtk_ErrorStatus TorusWithNegativeMaxRadiusToRevol();
931  Dtk_ErrorStatus TrimUnlimitedFaces ();
932  Dtk_ErrorStatus GetVertexBound (Dtk_pnt& pmin, Dtk_pnt& pmax);
933  Dtk_ErrorStatus GetVertexGravity(Dtk_pnt& pcenter);
934  Dtk_bool LimitInfinitEntities( Dtk_Double64 lenFoundMin, Dtk_Double64 lenNew = 1.0);
935  Dtk_ErrorStatus ExtractEdgeBody(Dtk_BodyPtr &outEdgeBody);
936  void AddStream(Dtk_StreamPtr inStream);
937  Dtk_StreamPtr GetStream(Dtk_Size_t inStreamIndex) const;
938  Dtk_Size_t GetNumStream()const;
939 
940 };
941 
942 //! \ingroup TOPO
943 //! \class Dtk_Shell
944 //! \brief Dtk_Shell is a set of faces bounding a volume. Dtk_Shell can be outer or inner.
945 //! A Dtk_Body contain at least one open_shell or one outer closed shell and 0 or several inner closed shell.
946 //! \SmartPtr{Dtk_ShellPtr}
948 {
949 protected:
950  struct Dtk_Handle; // Not defined here
951  std::unique_ptr<Dtk_Handle> _Private; // Handle
953  void _Clone(Dtk_TopologicalEntityPtr &outTopo, Dtk_Body * _inParentBody);
954 
956  Dtk_Shell(const Dtk_Shell &inTopo, Dtk_Body *inParentBody);
957  virtual ~Dtk_Shell();
958  friend class Dtk_SmartPtr<Dtk_Shell>;
959  friend class Dtk_TopologicalEntity;
961 
962  Dtk_ErrorStatus SetFace(const Dtk_Size_t &inIndex, const Dtk_FacePtr &inFace, const Dtk_bool &inFaceOrientation);
963 
964 public:
965  Dtk_ID GetTopoID() const;
968 
971 
972  //! \brief Create a shell in a body
973  //! \param [in] inParentBody : parent body
974  //! \return Dtk_ShellPtr created
975  static Dtk_ShellPtr Create(const Dtk_BodyPtr &inParentBody);
976  //! \brief Create a shell in a body
977  //! \param [in] inParentBody : parent body
978  //! \param [in] inFacesReserve : Faces size to reserve
979  //! \param [in] inWireReserve : Wire size to reserve
980  //! \return Dtk_ShellPtr created
981  static Dtk_ShellPtr Create(const Dtk_BodyPtr &inParentBody, Dtk_UInt32 inFacesReserve, Dtk_UInt32 inWireReserve = 0);
982 
983  //downcasting
984  int DtkDynamicType(const int& inId);
985  static Dtk_Shell * DtkDynamicCast(Dtk_Object * inObject);
986 
987  //! \brief Get Parent Body
988  //! \param [out] outParentBody : parent body
989  //! \return Dtk_ErrorStatus: dtkNoError if OK
991  //! \brief Return parent volume of shell
992  //! \param [out] outParentVolume : pointer of parent volume
993  //! \return Dtk_ErrorStatus: dtkNoError if OK
995  //! \brief Set parent volume of shell
996  //! \param [in] inParentVolume : pointer of parent volume
997  //! \return Dtk_ErrorStatus: dtkNoError if OK
999  Dtk_ErrorStatus SetParentVolume(const Dtk_ID &inParentVolumeId);
1000 
1003 
1004  //! \brief Return DTK_TRUE if shell is closed
1006  //! \brief Set Closed Info DTK_TRUE if shell is closed
1007  //! \return Dtk_ErrorStatus: dtkNoError if OK
1009  //! \brief Return DTK_TRUE if shell is outer
1011  //! \brief Return DTK_TRUE if shell has Wire entities
1013  //! \brief Set Outer Info DTK_TRUE if shell is outer
1014  //! \return Dtk_ErrorStatus: dtkNoError if OK
1016  //! \brief Return Number of Faces following Face type
1017  //! \param [in] inFaceType : Type of face you want to count
1018  //! ( DtkFaceType_Bounded = topological face / DtkFaceType_All = All Faces / DtkFaceType_Wire = Face used to store wire entities)
1019  //! \return number of face following Face type
1021 
1022  //! \brief Return Number of Wire set of entities
1023  //! equivalent to GetNumFaces with type DtkFaceType_Wire
1024  //! \return number of Wire set of entities
1026 
1027  //! \brief Get Wire Set
1028  //! \param [in] inIndex : index of wire set
1029  //! \param [out] outWire : array of Dtk_Entity (must be Dtk_PointPtr or Dtk_CurvePtr )
1030  //! \return Dtk_ErrorStatus: dtkNoError if OK
1032 
1033 
1034  //! \brief Get Wire Set
1035  //! \param [in] inIndex : index of wire set
1036  //! \param [out] outWire : array of Dtk_Entity (must be Dtk_VertexPtr or Dtk_EdgePtr )
1037  //! \param [out] outOrientation : array of bool for edge orientation
1038  //! \return Dtk_ErrorStatus: dtkNoError if OK
1039  Dtk_ErrorStatus GetWireSetTopo(const Dtk_Size_t& inIndex, Dtk_tab<Dtk_EntityPtr>& outWire, Dtk_tab<Dtk_bool>& outOrientation, Dtk_bool &outLoopOrientation) const;
1041 
1042  //! \brief Get Face following Face type
1043  //! \param [in] inIndex : index of face
1044  //! \param [out] outFace : Face
1045  //! \param [out] outOrientation : Face orientation relative to shell
1046  //! \param [in] inFaceType : Type of face ( DtkFaceType_Bounded = topological face / DtkFaceType_All = All Faces / DtkFaceType_Wire = Face used to store wire entities)
1047  //! \return Dtk_ErrorStatus: dtkNoError if OK
1048  Dtk_ErrorStatus GetFace(const Dtk_Size_t & inIndex, Dtk_FacePtr &outFace, Dtk_bool &outOrientation, DtkFaceType inFaceType = DtkFaceType_Bounded) const;
1049  Dtk_ErrorStatus GetFace(const Dtk_Size_t & inIndex, Dtk_ID &outFaceId, Dtk_bool &outOrientation, DtkFaceType inFaceType = DtkFaceType_Bounded) const;
1050 
1051  //! \brief Add Face to shell
1052  //! \param [in] inFace : Face
1053  //! \param [in] inOrientation : Face orientation relative to shell (DTK_TRUE if face material and shell material are on same side)
1054  //! \param [in] inFaceType : Type of face ( DtkFaceType_Bounded = topological face or DtkFaceType_Wire = Face used to store wire entities)
1055  //! \return Dtk_ErrorStatus: dtkNoError if OK
1057 
1058  //! \brief Add Wire entities
1059  //! \param [in] inWireArray : Array of Dtk_Curves
1060  //! \return Dtk_ErrorStatus: dtkNoError if OK
1063 
1064  //! \brief Add Wire entities
1065  //! \param [in] inPointArray : Array of 3D Points
1066  //! \return Dtk_ErrorStatus: dtkNoError if OK
1069 
1070  //! \brief Check if Shell is Closed
1071  //! \return DTK_TRUE if closed
1072  Dtk_bool CheckIfClosed();
1073 
1074  enum type_detk get_type_detk() const;
1076  virtual Dtk_ErrorStatus _Store(void*);
1077  virtual Dtk_Size_t GetSize() const;
1078 };
1079 
1080 
1081 #endif
1082 
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_Body::_Private
std::unique_ptr< Dtk_Handle > _Private
Definition: util_topology_dtk.hpp:790
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:688
Dtk_transfo
This is the Transformation dedicated class.
Definition: dtk_transfo.hpp:19
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:376
Dtk_Volume::SetTopologyStatus
void SetTopologyStatus(Dtk_ErrorStatus inStatus)
Dtk_Edge::GetTopoID
Dtk_ID GetTopoID() const
Dtk_Body::Dtk_Body
Dtk_Body(const Dtk_Body &)
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_Edge::GetParentCoedge
Dtk_ErrorStatus GetParentCoedge(const Dtk_Size_t &inIndex, Dtk_CoedgePtr &outCoedge) const
Get Corresponding coedges from index.
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.
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:152
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:516
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:799
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.
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:726
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_Edge::SetAsDeprecated
SetAsDeprecated("2022.1", "Use GetTolerance(Dtk_Double64 &outTolerance) method instead.") Dtk_Double64 GetTolerance()
Get Tolerance.
Dtk_Body::DtkDynamicType
int DtkDynamicType(const int &inId)
Dtk_UInt32
uint32_t Dtk_UInt32
Definition: define.h:687
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_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_Vertex::Dtk_Vertex
Dtk_Vertex()
Dtk_Size_t
size_t Dtk_Size_t
Definition: define.h:711
Dtk_Loop::_Private
std::unique_ptr< Dtk_Handle > _Private
Definition: util_topology_dtk.hpp:378
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_Body::Create
static Dtk_BodyPtr Create(const Dtk_Body &in)
Calls copy constructor to allocate a new object.
Dtk_Vertex::_Store
virtual Dtk_ErrorStatus _Store(void *)
Internal Use.
Dtk_Face::Dtk_Face
Dtk_Face()
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:727
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:724
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:698
Dtk_Face::GetNumLoops
Dtk_Size_t GetNumLoops() const
Return number of bounding loop for face.
Dtk_Loop::SetCoedges
Dtk_ErrorStatus SetCoedges(const Dtk_tab< Dtk_CoedgePtr > &inCoedgeArray, const Dtk_tab< Dtk_bool > &inCoedgeOrientationArray)
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_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_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:948
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_Shell::GetSize
virtual Dtk_Size_t GetSize() const
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_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_Shell::SetTopologyStatus
void SetTopologyStatus(Dtk_ErrorStatus inStatus)
Dtk_Shell::GetTopoID
Dtk_ID GetTopoID() const
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_Face::_Private
std::unique_ptr< Dtk_Handle > _Private
Definition: util_topology_dtk.hpp:518
Dtk_Loop::GetCoedge
Dtk_ErrorStatus GetCoedge(const Dtk_Size_t &inIndex, Dtk_CoedgePtr &outCoedge, Dtk_bool &outCoedgeOrientationIsSameAsLoop) const
Get a coedge in the loop.
Dtk_TopologicalEntity::Clone
virtual Dtk_Object * Clone()
Definition: util_topology_dtk.hpp:37
Dtk_Volume::GetParentBody
Dtk_ErrorStatus GetParentBody(Dtk_Body *&outParentBody) const
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_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::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:270
Dtk_Coedge::GetBasisSurface
Dtk_ErrorStatus GetBasisSurface(Dtk_SurfacePtr &outBasisSurface) const
Get basis surface.
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_Edge::_Private
std::unique_ptr< Dtk_Handle > _Private
Definition: util_topology_dtk.hpp:154
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:65
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_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_Lump::_Private
std::unique_ptr< Dtk_Handle > _Private
Definition: util_topology_dtk.hpp:727
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_Body::Dtk_Body
Dtk_Body(Dtk_Body &&in) DTK_NOEXCEPT
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_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_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_Edge::GetParentBody
Dtk_BodyPtr GetParentBody() const
Dtk_Vertex::_typeID
@ _typeID
Definition: util_topology_dtk.hpp:69
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:725
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_Loop::GetCoedge
Dtk_ErrorStatus GetCoedge(const Dtk_Size_t &inIndex, Dtk_ID &outCoedgeId, Dtk_bool &outCoedgeOrientationIsSameAsLoop) const
Dtk_Edge::SetEndVertex
Dtk_ErrorStatus SetEndVertex(const Dtk_VertexPtr &inVertex)
Set End Vertex for edge.
Dtk_Object
Definition: dtk_object.hpp:8
Dtk_Coedge::_Private
std::unique_ptr< Dtk_Handle > _Private
Definition: util_topology_dtk.hpp:272
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_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_Shell::_Private
std::unique_ptr< Dtk_Handle > _Private
Definition: util_topology_dtk.hpp:950
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:643
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_Volume::_Private
std::unique_ptr< Dtk_Handle > _Private
Definition: util_topology_dtk.hpp:645
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_TopologicalEntity::Dtk_Body
friend class Dtk_Body
Definition: util_topology_dtk.hpp:35
Dtk_Loop::SetVertexLoop
Dtk_ErrorStatus SetVertexLoop(const Dtk_VertexPtr inVertexLoop)
Set vertex loop.
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:788
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_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_Vertex::_Private
std::unique_ptr< Dtk_Handle > _Private
Definition: util_topology_dtk.hpp:67
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_NOEXCEPT
#define DTK_NOEXCEPT
Definition: config.hpp:20
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:367