DATAKIT API  V2025.1
How to use Dtk_Body Class

Topological Class Inheritance



Topological Class Relationship



Dtk_Body Detail

Dtk_Body is the highest level of topological entities.
It represents a space composed of connected entities. It allows you to handle manifold and non-manifold objects. Objects such as and not only solid, skin, surface model wire entities. Each topological entity belongs to a Dtk_Body so you have to indicate the top-level/owning parent Dtk_Body when you create a topological entity by using the Create method with the top-level/owning Dtk_Body as the argument.


Dtk_Body contains Dtk_Lump (if closed) OR opened Dtk_Shell (in this case number of the lump is 0).
Note about how to use colors in Dtk_Body : Low-level colors should prevail: a single Dtk_Body can be blue and have singular Dtk_Face colored in red. In this case, Dtk_Body has a Dtk_Info with blue color, some Dtk_Face have no color then appear blue, some can have a color and appears red.


Dtk_Lump Detail

A Dtk_Lump is a manifold part of a manifold or non-manifold Dtk_Body. Dtk_Lump contains one or several Dtk_Volume. Example of a non-manifold Dtk_Body : If two Dtk_Volume have a common edge they must belong to two separate Dtk_Lump:

Here are corresponding classes:


Dtk_Volume Detail

A Dtk_Volume is a space limited by connected edges. It contains one or several Dtk_Shell. If two Dtk_Shell have a common face 2 volumes are needed:

Here are corresponding classes:



Dtk_Shell Detail

Dtk_Shell is a set of Dtk_Face bounding a volume. Dtk_Shell can be outer or inner. Typically an outer Dtk_shell refers to “material” and inner defines as “holes” or “hollow”.
A Dtk_shell can be open or closed. A Dtk_Body contains at least: One outer open-shell (no inner shell) or One outer closed shell with 0 or several inner closed shells. In addition to this, a Dtk_Body can also contain wire shells. See the following image representing a volume with two shells:

and corresponding classes:




Dtk_Face Detail

Dtk_Face is a surface bounded by one or several Dtk_Loop.

Each Dtk_Face has an orientation relative to the shell (DTK_TRUE if Face normal gives material) that you can add or get from Dtk_Shell methods AddFace and GetFace.


Dtk_Loop Detail

Dtk_Loop is a set of connected Dtk_Coedge bounding a Dtk_Face. Dtk_Loop can be outer or inner. Material is defined on the left of the Dtk_loop orientation. Dtk_loop has an orientation flag (GetOrientation and SetOrientation methods): DTK_TRUE means the material on left. Dtk_Loop can be a vertex loop in a degenerated case such as the top of the conical surface.



Dtk_Coedge Detail

Dtk_Coedge represents a UV Dtk_Curve lying on a Dtk_Face.

Each Dtk_Coedge has an orientation relative to the loop (DTK_TRUE if loop and coedges go in same sens) that you can add or get from Dtk_Loop methods AddCoedge and GetCoedge. It has an orientation relative to the Edge. Geometrical orientation relative to UV Curve you get with GetGeom() is always True.


Dtk_Edge Detail

Dtk_Edge represents a 3D Dtk_Curve lying on a Dtk_Face. It is bounded by two Dtk_Vertex. In a manifold model with all orientation set to DTK_TRUE, Dtk_Edge has two Dtk_Coedge with opposite orientations.

Dtk_Edge sens and geometrical definition of the 3D curve are the same:
The first point of curve 3D and the point given by StartVertex are same.


Dtk_Vertex Detail

Dtk_Vertex bounds an edge and represents a 3D point.

Dtk_Body::Create
static Dtk_BodyPtr Create()
Create a body.
Dtk_Lump::Create
static Dtk_LumpPtr Create(const Dtk_BodyPtr &inParentBody)
Create a lump in a body.
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
Dtk_Volume::Create
static Dtk_VolumePtr Create(const Dtk_BodyPtr &inParentBody)
Create a volume in a body.