 |
DATAKIT SDK
V2026.1
|
|
Datakit API allows you to read data coming from many software in the same way:
- You have to Enable the readers you want to use and then Start the Api.
- When API is started you can Use OpenDocument() method to read a file.
This method recognizes file format and calls the corresponding reader to give you an assembly tree.
- From assembly tree, you choose the component you want to read and call ReadComponent method to get Construction tree.
- From this second tree, you call Get.. method on node following his type to make the reader access to full data information.
- You have to close opened component with EndComponent() and opened document with EndDocument() method to free data used by the reader.
- In the end, you need to stop the API.
All classes except Dtk_API and Dtk_readers are handled via Smart Pointers.
You have to use the Create method to handle them. They are deleted automatically when they are not used any more.
@ ReadPathSearch
Definition: dtk_api.hpp:54
Dtk_ErrorStatus EndDocument(Dtk_MainDocPtr &inoutDocument)
Close a Document.
Dtk_ErrorStatus FindAttribute(const Dtk_string &name, Dtk_Val &val) const
Dtk_InfoPtr get_info() const
uint32_t Dtk_ID
Definition: define.h:692
int write_mesh_solid(Dtk_mesh *tm)
Dtk_ErrorStatus tess_ShellToMesh(const Dtk_ShellPtr &inShell, Dtk_MeshPtr &outMesh, Dtk_Int32 *outIsSolid)
Tesselate a shell.
This is a high level face class.
Definition: util_mesh_dtk.hpp:865
Dtk_string GetName() const
Retrieves the entity name.
This is the Revolution Surface Class. U parametrisation : revolved curve parametrisation V parametris...
Definition: util_geom_dtk.hpp:1101
void tess_set_MaxSize(double tol)
Set the maximum size of a triangle edge. Default value: inf (mm)
Dtk_EntityPtr GetGeomElement(const Dtk_Size_t &inPos) const
Retrieves the ith geometrical element.
int GetBlankedStatus() const
Retrieves the entity Blanked Status.
DTK_Text_subtype & TextSubType()
Retrieves the text subtype - get/set -.
void tess_disableTolAngular(Dtk_bool bval)
Set activation of angular tolerance.
Dtk_Size_t GetNumTexts() const
Retrieves the texts number.
Dtk_ErrorStatus AddSearchPath(const Dtk_SearchFileEnum::RecursivityEnum &inRecursivityEnum, const Dtk_string &inPath)
Add search path to find missing files.
@ RootFolderFirstRecursivity
Definition: dtk_api.hpp:48
Dtk_bool IsNotNULL() const
Definition: util_ptr_dtk.hpp:119
int tess_InitTesselation(Dtk_string inWorkingDirectory, double inTolerance)
Init the tesselation library.
#define DTK_TRUE
Definition: define.h:730
This is the general symbol class. It's basically composed of Dtk_CompositeText and geometrical elemen...
Definition: util_draw_dtk.hpp:6357
static Dtk_API * StartAPI(const Dtk_string &inTemporyDirectory, Dtk_ErrorStatus &outErrorCode, const Dtk_string &inCustomerID=Dtk_string())
Start DATAKIT API.
static Dtk_HyperbolaPtr Create(const Dtk_Hyperbola &in)
Calls copy constructor to allocate a new object.
Dtk_bool IsTolBloc() const
Tell if the associated Dtk_text is part of Tolerance Block group - into Dtk_Dimension -.
DTK_FDT_MODIFIER
This is the several tolerances modifiers list.
Definition: util_draw_dtk.hpp:54
uint32_t Dtk_UInt32
Definition: define.h:691
This is a high level string class.
Definition: dtk_string.hpp:53
This is the Feature Indicator. It is part of the Dtk_FCFFeatureIndicator. .
Definition: util_draw_dtk.hpp:5754
size_t Dtk_Size_t
Definition: define.h:715
Dtk_RGB GetColor() const
Retrieves the entity color as Dtk_RGBA values.
int GetActivationFlag() const
const Dtk_InfoPtr & GetInfo() const
Retrieves the text infos - read only -.
void tess_ComputeNormalesFromSurface(int value)
Set normales computation from surface option. Enabled by default. If enabled, the normals of each ver...
This is the base text class. It's part of Dtk_CompositeText. It's used into a lot of 2D Entities It c...
Definition: util_draw_dtk.hpp:1110
Definition: dtk_status.hpp:16
static Dtk_BodyPtr Create()
Create a body.
Dtk_ErrorStatus EndComponent(Dtk_ComponentPtr &inComponent)
EndComponent.
Dtk_ErrorStatus OpenDocument(const Dtk_string &inInputFile, Dtk_MainDocPtr &outDocument)
Open a Document (call EndDocument to close it)
#define DTK_FALSE
Definition: define.h:731
@ DTK_TYPE_SYMBOL
Definition: define.h:411
char Dtk_bool
Definition: define.h:728
FILE * OpenFile(const Dtk_string &inRights) const
File Utility : Open a file with the given rights.
void tess_ComputeBoundariesFromMesh(int value)
Set boundaries computation from mesh option. Default value is enabled (1). See tess_getBoundariesFrom...
static Dtk_SymbolPtr Create()
Calls default constructor to allocate a new object.
void ActivateSearchFileEngine()
double Dtk_Double64
Definition: define.h:702
Dtk_LayerInfosSetPtr GetDtk_LayerInfosSetPtr()
Retrieves the Dtk_Node as a Dtk_LayerInfosSetPtr - if exists -.
void get_tesselation_activateSplitMode(int &outmode, double &outratio)
@ DTK_ISERROR
Definition: dtk_status.hpp:9
@ DTK_TYPE_NURBS_SURFACE
Definition: define.h:497
void CheckUseEdgeTolerance(Dtk_bool inBval)
Set usage of edge tolerance to guide the tesselation. Default value is disabled (0).
Definition: dtk_val.hpp:67
Dtk_ErrorStatus TesselationIsStarted()
Return current status of tesselation started.
int GetInt(Dtk_status &st=Dtk_status::GetDefaultStatus()) const
void ManageSearchFile(Dtk_SearchFileEnum::Status inStatus)
Dtk_bool get_tesselationSuppressDuplicateFace()
Get face duplication option. Returns 1 if enabled, 0 if disabled.
static Dtk_API * GetAPI()
Get DATAKIT API.
const Dtk_mesh_face Dtk_tab< Dtk_tab< Dtk_MeshPolylinePtr > > & outBoundaries
Definition: tess.h:288
void tess_set_linear(double tol)
Set linear tolerance (mm). Maximum chordal error accepted between the CAD surface and the tesselated ...
This is the Node Class.
Definition: dtk_maindoc.hpp:231
int32_t Dtk_Int32
Definition: define.h:690
@ DTK_TYPE_FACE
Definition: define.h:143
int get_id()
Return the face Id.
Dtk_bool IsTolUpperTol() const
Tell if the associated Dtk_text is part of Tolerance Upper Value group - into Dtk_Dimension -.
This is the Dtk_Preview class.
Definition: util_ent_dtk.hpp:719
Dtk_InfoPtr GetInfos() const
Retrieves the Dtk_DocElement Dtk_InfoPtr - read only -.
static Dtk_LumpPtr Create(const Dtk_BodyPtr &inParentBody)
Create a lump in a body.
@ AdditionalPathSearch
Definition: dtk_api.hpp:55
static Dtk_SmartPtr< T > DtkDynamicCast(const Dtk_SmartPtr< T2 > &p)
Definition: util_ptr_dtk.hpp:101
int GetLayer() const
Retrieves the entity layer.
int end_stl_fic(int *ient)
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
const Dtk_CompositeText & Texts() const
Retrieves the Dtk_CompositeText included into the Dtk_Symbol - read only -.
Dtk_RenderInfosPtr GetRenderInfos() const
Retrieves the entity RenderInfos of the entity.
Dtk_ErrorStatus SetSearchPositionMode(Dtk_Int32 inPosition, Dtk_SearchFileEnum::PriorityModeEnum inSearchEnum)
Set Search Position.
Definition: util_ptr_dtk.hpp:37
@ LocalSearch
Definition: dtk_api.hpp:53
void tess_set_Ratio(double tol)
Set a maximum ratio between longest and shortest edge of each triangle. With 1.0 only equilateral tri...
const char * c_str() const
Retrieve the ASCII conversion string.
Dtk_LeaderPtr GetLeader(const Dtk_Size_t &inPos) const
Gets the i'th leader.
void SetInternalReadPathSearchFlag(Dtk_bool inActivationFlag)
Allow Internal Read Path Search for files of assembly.
This is the Dtk_GraphicalData Class. The Dtk_GraphicalDataPtr object is used to store preview data It...
Definition: dtk_graphical.hpp:27
static Dtk_ParabolaPtr Create(const Dtk_Parabola &in)
Calls copy constructor to allocate a new object.
Dtk_string GetString(Dtk_status &st=Dtk_status::GetDefaultStatus()) const
Dtk_FCFFeatureIndicatorTypeEnum
Definition: util_draw_dtk.hpp:5757
This is a mathematical point class.
Definition: dtk_pnt.hpp:20
type_detk
Definition: define.h:32
This is the DTK_Text_subtype class. It's used to provide semantic data about Dtk_Text type....
Definition: util_draw_dtk.hpp:996
This is the composite text class. It's basically a Dtk_Text Container. This class represents a group ...
Definition: util_draw_dtk.hpp:1525
void tess_getBoundariesFromMeshFace(const Dtk_MeshPtr &mesh, const Dtk_mesh_face *inFace, Dtk_tab< Dtk_tab< Dtk_PolylinePtr >> &outBoundaries)
Get the boundaries (outer and inner) of a mesh face as polylines. Each shell yields a Dtk_mesh,...
Dtk_ErrorStatus Dtk_DumpXml_Dtk_RenderInfos(FILE *F, const Dtk_RenderInfosPtr &inRender)
Definition: util_xml_dtk.cpp:3611
void tess_set_optimize_mesh(int ival)
Set a vertex map optimisation that reduces the mesh memory footprint (the geometry stay the same)....
@ DTK_TYPE_EDGE
Definition: define.h:130
double GetDouble(Dtk_status &st=Dtk_status::GetDefaultStatus()) const
void ActivateKeepKernelData()
Keep Kernel Data option (see "How to use KeepKernelData option")
@ Enable
Definition: dtk_api.hpp:63
Dtk_ErrorStatus ClearSearchPriority()
Clear Search Priority.
void SetAdditionnalPathSearchFlag(Dtk_bool inActivationFlag)
Allow Additionnal Path Search for files of assembly.
Dtk_Size_t size() const
Returns the size of the array.
Definition: util_stl_dtk.hpp:503
const Dtk_mesh_face * inFace
Definition: tess.h:288
@ DTK_NOERROR
Definition: dtk_status.hpp:10
static void StopAPI(Dtk_API *&inAPI, Dtk_bool inWriteTimeInLog=1)
Stop DATAKIT API.
const Dtk_InfoPtr & GetInfo() const
Retrieves the infos.
void tess_set_angular(double angle)
Set angular tolerance (radian). Default value: 10°. Maximum angle between a triangle and the CAD surf...
void set_tesselationSuppressDuplicateFace(Dtk_bool inBval)
Set face duplication option. Default value is enabled (1).
void tess_disableTolLinear(Dtk_bool bval)
Set activation of linear tolerance.
Dtk_ErrorStatus ReadComponentGraphic(const Dtk_ComponentPtr &inComponent, Dtk_GraphicalDataPtr &outGraphicalData)
Read graphical data from Component (Call EndComponent to free data allocated)
int init_stl_write(Dtk_string sfic)
TypeEnum
Definition: util_draw_dtk.hpp:6055
Dtk_tab< Dtk_Int32 > GetlayerList() const
Retrieves the layers in which the entity is assigned.
void tess_EndTesselation()
Free the data used by tesselation library.
const Dtk_FCFFeatureIndicatorTypeEnum & GetIndicatorType() const
Retrieves the IndicatorType semantic Type - Read Only -.
Definition: util_draw_dtk.hpp:5832
static Dtk_LayerInfosSetPtr Create(const Dtk_Size_t inNumLayers)
Calls a constructor to allocate a new object.
T & at(Dtk_Size_t k)
Definition: util_stl_dtk.hpp:397
@ dtkNoError
Definition: error_dtk.hpp:147
Dtk_ErrorStatus ReadComponent(const Dtk_ComponentPtr &inComponent, Dtk_NodePtr &outRootNode)
Read Component from Assembly Tree (Call EndComponent to free data allocated)
Definition: dtk_rgb.hpp:7
void set_tesselation_activateSplitMode(const int inmode, const double inratio)
Dtk_ErrorStatus CreateGeometries(Dtk_tab< Dtk_CurvePtr > &outGeoms) const
Process IndicatorType Related geometries.
This is a mathematical direction class.
Definition: dtk_dir.hpp:14
Definition: dtk_api.hpp:75
static Dtk_VolumePtr Create(const Dtk_BodyPtr &inParentBody)
Create a volume in a body.
void SetLocalPathSearchFlag(Dtk_bool inActivationFlag)
Allow Local Path Search for files of assembly.