A Dtk_Body Dtk_Body is the highest level topological entity. It allow you to handle manifold and non-manifold object , open skin or surfacic model and wire entities. More...
Inheritance diagram for Dtk_Body:Public Member Functions | |
| Dtk_ErrorStatus | _Store (void *) |
| Dtk_ErrorStatus | AddLump (const Dtk_LumpPtr &inLump) |
| Dtk_ErrorStatus | AddOpenShell (const Dtk_ShellPtr &inShell) |
| Add Open Shell in first volume of first lump (created if none) More... | |
| Dtk_ErrorStatus | AddOpenShell2 (const Dtk_ShellPtr &inShell, Dtk_VolumePtr &volume) |
| Dtk_ID | AddPtr (const Dtk_TopologicalEntityPtr &outEntityPtr) |
| void | AddStream (Dtk_StreamPtr inStream) |
| Dtk_ErrorStatus | AddUnboundedFace (Dtk_SurfacePtr inSurface, Dtk_bool InOrient=DTK_TRUE) |
| Add Open Shell with a one Unbounded Surface. More... | |
| Dtk_ErrorStatus | AddWireShell (const Dtk_ShellPtr &inShell) |
| Add Wire Shell. More... | |
| Dtk_ErrorStatus | ComputeBoundingBox (Dtk_pnt &outMin, Dtk_pnt &outMax) |
| Dtk_Body () | |
| int | DtkDynamicType (const int &inId) |
| virtual void | dump (FILE *file=stdout) |
| Dtk_ErrorStatus | ExtractEdgeBody (Dtk_BodyPtr &outEdgeBody) |
| Dtk_ErrorStatus | FillTopologicalEntitiesIdMapping (std::unordered_map< Dtk_ID, std::vector< Dtk_Size_t >> &outMap) |
| Fills a mapping table between Topological Entity identifiers (Dtk_ID from Dtk_Info::GetId) and the indices of corresponding entities within the Dtk_Body. This allows efficient retrieval of all entities associated with a given identifier (including cases where entities have been split). 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. More... | |
| Dtk_InfoPtr | get_info () const |
| enum type_detk | get_type_detk () const |
| Dtk_ErrorStatus | GetBodyStatus () const |
| Dtk_ErrorStatus | GetEntities (const Dtk_ID &inInfoId, Dtk_tab< Dtk_EntityPtr > &outTab, Dtk_bool inLookAlsoForCurve=DTK_TRUE) const |
| Get entities with Info->GetId() == inInfoId. More... | |
| Dtk_EntityPtr | GetEntity (const Dtk_ID &inInfoId) const |
| Get entity with Info->GetId() == inInfoId. More... | |
| const Dtk_ID & | GetID () const |
| Get Internal UniqueID. More... | |
| Dtk_ErrorStatus | GetLump (const Dtk_Size_t &inIndex, Dtk_ID &outLumpId) const |
| Dtk_ErrorStatus | GetLump (const Dtk_Size_t &inIndex, Dtk_LumpPtr &outLump) const |
| Dtk_Size_t | GetNumLumps () const |
| Dtk_Size_t | GetNumOpenShells () const |
| Return Number of Open Shell. More... | |
| Dtk_Size_t | GetNumStream () const |
| Dtk_Size_t | GetNumTopologicalEntities (type_detk inType) |
| Get Num entities. More... | |
| Dtk_ErrorStatus | GetOpenShell (Dtk_Size_t inIndex, Dtk_ShellPtr &outShell) const |
| Return Open Shell More... | |
| Dtk_TopologicalEntityPtr | GetPtr (const Dtk_ID &inId) const |
| virtual Dtk_Size_t | GetSize () const |
| Dtk_StreamPtr | GetStream (Dtk_Size_t inStreamIndex) const |
| Dtk_ErrorStatus | GetTolerance (Dtk_Double64 &outTolerance) |
| Get Tolerance. More... | |
| Dtk_ErrorStatus | GetTopologyStatus () const |
| Dtk_ErrorStatus | GetVertexBound (Dtk_pnt &pmin, Dtk_pnt &pmax) |
| Dtk_ErrorStatus | GetVertexGravity (Dtk_pnt &pcenter) |
| int | GetWireCurves (Dtk_tab< Dtk_CurvePtr > &curves) |
| int | GetWireEntities (Dtk_tab< Dtk_CurvePtr > &curves, Dtk_tab< Dtk_PointPtr > &points) |
| Dtk_bool | HasFaces () |
| Returns DTK_TRUE if Body contains faces with surfaces. More... | |
| Dtk_bool | HasMeshSurface () |
| Returns DTK_TRUE if Body contains mesh surfaces. More... | |
| Dtk_bool | HasPeriodicSurface () |
| Returns DTK_TRUE if Body contains periodic surfaces. More... | |
| Dtk_bool | HasWire () |
| Returns DTK_TRUE if Body contains wireframe. More... | |
| Dtk_InfoPtr & | info () |
| Dtk_bool | LimitInfinitEntities (Dtk_Double64 lenFoundMin, Dtk_Double64 lenNew=1.0) |
| Dtk_ErrorStatus | MergeVertices (Dtk_VertexPtr inVertexToKeep, Dtk_VertexPtr inVertexToRemove) |
| Removes all references to inVertexToRemove and replace it by inVertexToKeep. More... | |
| Dtk_ErrorStatus | Normalize (Dtk_bool updateEdgeGeometry=DTK_TRUE) |
| virtual void | PrepareTransfo () |
| Dtk_ErrorStatus | RevolToStandardRevol () |
| SetAsDeprecated ("2022.1", "Use GetTolerance(Dtk_Double64 &outTolerance) method instead.") Dtk_Double64 GetTolerance() | |
| Get Tolerance. More... | |
| 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) More... | |
| Dtk_ErrorStatus | SetBodyStatus (Dtk_ErrorStatus inBodyStatus) |
| void | SetTolerance (Dtk_Double64 inTol) |
| Set Tolerance. More... | |
| void | SetTopologyStatus (Dtk_ErrorStatus inStatus) |
| Dtk_ErrorStatus | Store (const Dtk_string &inFile, Dtk_Size_t inIo=1) |
| Dtk_ErrorStatus | Store (FILE *inFile, Dtk_Size_t inIo=1) |
| Dtk_ErrorStatus | ToNurbs (Dtk_bool inRemoveTrimmedCurve=0) |
| Transforms all curves and surfaces in the body into NURBS. More... | |
| Dtk_ErrorStatus | TorusWithNegativeMaxRadiusToRevol () |
| Dtk_ErrorStatus | Transform (const Dtk_transfo &inTransfo) |
| Dtk_ErrorStatus | TrimUnlimitedFaces () |
Static Public Member Functions | |
| static Dtk_BodyPtr | Create () |
| Create a body. More... | |
| static Dtk_Body * | DtkDynamicCast (Dtk_Object *inObject) |
Data Fields | |
| const Dtk_bool const Dtk_bool & | inClosedInfo |
| const Dtk_bool & | inOuterInfo |
Protected Types | |
| enum | { _typeID = DTK_TYPE_OBJECT } |
| enum | { _typeID = DTK_TYPE_ENTITY } |
| enum | { _typeID = DTK_TYPE_BODY } |
Protected Member Functions | |
| void | _Copy (const Dtk_Body &inBodyToCopy) |
| void | _copy (const Dtk_Entity &s) |
| void | _init () |
| void | _Init () |
| void | _reset () |
| void | _Reset () |
| virtual Dtk_Object * | Clone () |
| Dtk_Body (const Dtk_Body &inBodyToCopy) | |
| virtual | ~Dtk_Body () |
Protected Attributes | |
| Dtk_Handle * | _Private |
| unsigned long | count_ |
A Dtk_Body Dtk_Body is the highest level topological entity. It allow you to handle manifold and non-manifold object , open skin or surfacic model and wire entities.
|
protected |
|
protectedvirtual |
| Dtk_Body::Dtk_Body | ( | ) |
|
protected |
|
protectedinherited |
|
protectedinherited |
|
protected |
|
protectedinherited |
|
protected |
|
virtual |
Reimplemented from Dtk_Entity.
| Dtk_ErrorStatus Dtk_Body::AddLump | ( | const Dtk_LumpPtr & | inLump | ) |
| Dtk_ErrorStatus Dtk_Body::AddOpenShell | ( | const Dtk_ShellPtr & | inShell | ) |
Add Open Shell in first volume of first lump (created if none)
| [in] | inShell | : pointer on outer open shell |
| Dtk_ErrorStatus Dtk_Body::AddOpenShell2 | ( | const Dtk_ShellPtr & | inShell, |
| Dtk_VolumePtr & | volume | ||
| ) |
| Dtk_ID Dtk_Body::AddPtr | ( | const Dtk_TopologicalEntityPtr & | outEntityPtr | ) |
| void Dtk_Body::AddStream | ( | Dtk_StreamPtr | inStream | ) |
| Dtk_ErrorStatus Dtk_Body::AddUnboundedFace | ( | Dtk_SurfacePtr | inSurface, |
| Dtk_bool | InOrient = DTK_TRUE |
||
| ) |
Add Open Shell with a one Unbounded Surface.
| [in] | inSurface | : pointer on surface |
| [in] | InOrient | : Face orientation relative to shell (DTK_TRUE if face material and shell material are on same side) |
| Dtk_ErrorStatus Dtk_Body::AddWireShell | ( | const Dtk_ShellPtr & | inShell | ) |
Add Wire Shell.
| [in] | inShell | : pointer on wire shell |
|
protectedvirtual |
Implements Dtk_Entity.
| Dtk_ErrorStatus Dtk_Body::ComputeBoundingBox | ( | Dtk_pnt & | outMin, |
| Dtk_pnt & | outMax | ||
| ) |
|
static |
Create a body.
|
static |
|
virtual |
Reimplemented from Dtk_Entity.
|
virtualinherited |
| Dtk_ErrorStatus Dtk_Body::ExtractEdgeBody | ( | Dtk_BodyPtr & | outEdgeBody | ) |
| Dtk_ErrorStatus Dtk_Body::FillTopologicalEntitiesIdMapping | ( | std::unordered_map< Dtk_ID, std::vector< Dtk_Size_t >> & | outMap | ) |
Fills a mapping table between Topological Entity identifiers (Dtk_ID from Dtk_Info::GetId) and the indices of corresponding entities within the Dtk_Body. This allows efficient retrieval of all entities associated with a given identifier (including cases where entities have been split). 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.
| [out] | outMap | : mapping table Dtk_ID -> list of entity indices in the body. |
|
inherited |
|
virtual |
Implements Dtk_Entity.
| Dtk_ErrorStatus Dtk_Body::GetBodyStatus | ( | ) | const |
| Dtk_ErrorStatus Dtk_Body::GetEntities | ( | const Dtk_ID & | inInfoId, |
| Dtk_tab< Dtk_EntityPtr > & | outTab, | ||
| Dtk_bool | inLookAlsoForCurve = DTK_TRUE |
||
| ) | const |
Get entities with Info->GetId() == inInfoId.
| [in] | inInfoId | : Info->GetId() of entities to be found |
| [in] | inLookAlsoForCurve | : if set to DTK_TRUE, Dtk_Entity retrieved can also include Dtk_CurvePtr. Otherwise, only Dtk_TopologicalEntity can be retrieved. |
| Dtk_EntityPtr Dtk_Body::GetEntity | ( | const Dtk_ID & | inInfoId | ) | const |
Get entity with Info->GetId() == inInfoId.
| [in] | inInfoId | : Info->GetId() of entity to be found |
|
inherited |
Get Internal UniqueID.
| Dtk_ErrorStatus Dtk_Body::GetLump | ( | const Dtk_Size_t & | inIndex, |
| Dtk_ID & | outLumpId | ||
| ) | const |
| Dtk_ErrorStatus Dtk_Body::GetLump | ( | const Dtk_Size_t & | inIndex, |
| Dtk_LumpPtr & | outLump | ||
| ) | const |
| Dtk_Size_t Dtk_Body::GetNumLumps | ( | ) | const |
| Dtk_Size_t Dtk_Body::GetNumOpenShells | ( | ) | const |
Return Number of Open Shell.
| Dtk_Size_t Dtk_Body::GetNumStream | ( | ) | const |
| Dtk_Size_t Dtk_Body::GetNumTopologicalEntities | ( | type_detk | inType | ) |
Get Num entities.
| [in] | inType | : Type of entities to count |
| Dtk_ErrorStatus Dtk_Body::GetOpenShell | ( | Dtk_Size_t | inIndex, |
| Dtk_ShellPtr & | outShell | ||
| ) | const |
Return Open Shell
| [in] | inIndex | : index of Open Shell |
| [out] | outShell | : pointer on open shell |
| Dtk_TopologicalEntityPtr Dtk_Body::GetPtr | ( | const Dtk_ID & | inId | ) | const |
|
virtual |
Reimplemented from Dtk_Entity.
| Dtk_StreamPtr Dtk_Body::GetStream | ( | Dtk_Size_t | inStreamIndex | ) | const |
| Dtk_ErrorStatus Dtk_Body::GetTolerance | ( | Dtk_Double64 & | outTolerance | ) |
Get Tolerance.
| [out] | outTolerance | : body tolerance |
| Dtk_ErrorStatus Dtk_Body::GetTopologyStatus | ( | ) | const |
| Dtk_ErrorStatus Dtk_Body::GetVertexBound | ( | Dtk_pnt & | pmin, |
| Dtk_pnt & | pmax | ||
| ) |
| Dtk_ErrorStatus Dtk_Body::GetVertexGravity | ( | Dtk_pnt & | pcenter | ) |
| int Dtk_Body::GetWireCurves | ( | Dtk_tab< Dtk_CurvePtr > & | curves | ) |
| int Dtk_Body::GetWireEntities | ( | Dtk_tab< Dtk_CurvePtr > & | curves, |
| Dtk_tab< Dtk_PointPtr > & | points | ||
| ) |
| Dtk_bool Dtk_Body::HasFaces | ( | ) |
Returns DTK_TRUE if Body contains faces with surfaces.
| Dtk_bool Dtk_Body::HasMeshSurface | ( | ) |
Returns DTK_TRUE if Body contains mesh surfaces.
| Dtk_bool Dtk_Body::HasPeriodicSurface | ( | ) |
Returns DTK_TRUE if Body contains periodic surfaces.
| Dtk_bool Dtk_Body::HasWire | ( | ) |
Returns DTK_TRUE if Body contains wireframe.
|
inherited |
| Dtk_bool Dtk_Body::LimitInfinitEntities | ( | Dtk_Double64 | lenFoundMin, |
| Dtk_Double64 | lenNew = 1.0 |
||
| ) |
| Dtk_ErrorStatus Dtk_Body::MergeVertices | ( | Dtk_VertexPtr | inVertexToKeep, |
| Dtk_VertexPtr | inVertexToRemove | ||
| ) |
Removes all references to inVertexToRemove and replace it by inVertexToKeep.
| [in] | inVertexToKeep | : Vertex to use |
| [in] | inVertexToRemove | : Vertex to remove |
| Dtk_ErrorStatus Dtk_Body::Normalize | ( | Dtk_bool | updateEdgeGeometry = DTK_TRUE | ) |
|
virtualinherited |
Reimplemented in Dtk_OffsetSurface.
| Dtk_ErrorStatus Dtk_Body::RevolToStandardRevol | ( | ) |
| Dtk_Body::SetAsDeprecated | ( | "2022.1" | , |
| "Use GetTolerance(Dtk_Double64 &outTolerance) method instead." | |||
| ) |
Get Tolerance.
| Dtk_Body::SetAsDeprecated | ( | "2025.1" | , |
| "Use Dtk_Body::AddOpenShell | , | ||
| Dtk_Volume::AddOuterShell or Dtk_Volume::AddInnerShell to get valid topology" | |||
| ) | const & |
Add Shell in Body in first volume of first lump (created if none)
| [in] | inShell | : pointer on inner shell |
| [in] | inOuterInfo | : DTK_TRUE if outer - DTK_FALSE if inner not yet supported - |
| [in] | inClosedInfo | : DTK_TRUE if closed DTK_FALSE if open |
| Dtk_ErrorStatus Dtk_Body::SetBodyStatus | ( | Dtk_ErrorStatus | inBodyStatus | ) |
| void Dtk_Body::SetTolerance | ( | Dtk_Double64 | inTol | ) |
Set Tolerance.
| [in] | inTol | : Tolerance |
| void Dtk_Body::SetTopologyStatus | ( | Dtk_ErrorStatus | inStatus | ) |
| Dtk_ErrorStatus Dtk_Body::Store | ( | const Dtk_string & | inFile, |
| Dtk_Size_t | inIo = 1 |
||
| ) |
| Dtk_ErrorStatus Dtk_Body::Store | ( | FILE * | inFile, |
| Dtk_Size_t | inIo = 1 |
||
| ) |
| Dtk_ErrorStatus Dtk_Body::ToNurbs | ( | Dtk_bool | inRemoveTrimmedCurve = 0 | ) |
Transforms all curves and surfaces in the body into NURBS.
| [in] | inRemoveTrimmedCurve | : Convert Trimmed Nurbs into Nurbs |
| Dtk_ErrorStatus Dtk_Body::TorusWithNegativeMaxRadiusToRevol | ( | ) |
|
virtual |
Implements Dtk_Entity.
| Dtk_ErrorStatus Dtk_Body::TrimUnlimitedFaces | ( | ) |
|
protected |
|
protectedinherited |
| const Dtk_bool& Dtk_Body::inOuterInfo |