DATAKIT API  V2025.3
How to compute graphical data

To make it easier to obtain graphical information from Dtk_2DEntity stored on Fdt, there's a method for converting entities to Dtk_Symbol.
Dtk_Symbol is basically composed of Dtk_CompositeText , Dtk_Leader and geometrical elements.
Leaders of 2D entities can be kept as such or be converted into geometry using parameter inKeepLeaderAsLeader.

// Constructor from Dtk_2dEntityPtr
// inToBeConverted Entity to be converted.
// inTextAutoFlip
// inKeepLeaderAsLeader to keep the leader definition put the value DTK_TRUE - only for Dtk_Dimension -.
// the created Dtk_SymbolPtr
static Dtk_SymbolPtr Create(
const Dtk_2dEntityPtr &inToBeConverted,
const Dtk_bool &inTextAutoFlip = DTK_FALSE,
const Dtk_bool & using = DTK_FALSE );


Then you can use following methods to retrieve main information you need :

Dtk_Symbol::GetGeomElement
Dtk_EntityPtr GetGeomElement(const Dtk_Size_t &inPos) const
Retrieves the ith geometrical element.
Dtk_Size_t
size_t Dtk_Size_t
Definition: define.h:712
DTK_FALSE
#define DTK_FALSE
Definition: define.h:728
Dtk_bool
char Dtk_bool
Definition: define.h:725
Dtk_Symbol::Texts
const Dtk_CompositeText & Texts() const
Retrieves the Dtk_CompositeText included into the Dtk_Symbol - read only -.
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
Dtk_Annotation::GetLeader
Dtk_LeaderPtr GetLeader(const Dtk_Size_t &inPos) const
Gets the i'th leader.
Dtk_CompositeText
This is the composite text class. It's basically a Dtk_Text Container. This class represents a group ...
Definition: util_draw_dtk.hpp:1557