 |
DATAKIT SDK
V2026.4
|
|
- Note
- Datakit packages do not include a Parasolid distribution. It is therefore the integrator's responsibility to set up their Parasolid environment.
Compile and link the Datakit integration sources against the headers/libraries of your Parasolid version.
Using Datakit SDK for Parasolid needs to :
- go through assembly and construction tree like standard integration
- then for
Dtk_Node with type Dtk_Node::BodyType you can access to the Dtk_Body and convert it into Parasolid stream (in memory or through file)
- load it into your existing parasolid session.
The following sample show you how to convert a Dtk_Body to a Parasolid :
- Note
- The source code lines checking import parasolid are commented to avoid dependencies
#include <map>
using namespace std;
{
{
}
for(
size_t i = 0; i < inBody->GetNumTopologicalEntities(
DTK_TYPE_UNKNOWN ); i++ )
{
{
}
{
edge->get_info()->AddCustomerDefinedAttribute( L"my_edge_id", edge->get_info()->GetId() );
}
{
vertex->get_info()->AddCustomerDefinedAttribute( L"my_vertex_id", vertex->get_info()->GetId() );
}
}
{
}
else
{
}
}
static Dtk_SmartPtr< Dtk_Info > Create()
Calls default constructor to allocate a new object.
Dtk_InfoPtr get_info() const
@ DTK_TYPE_UNKNOWN
Definition: define.h:26
DtkErrorStatus psw_InitFile(const Dtk_string &inFileOut, Dtk_bool muteMode, Dtk_Int32 inVersion=180)
Initialise a file to be written.
Dtk_bool IsNotNULL() const
Definition: util_ptr_dtk.hpp:119
Dtk_ErrorStatus AddCustomerDefinedAttribute(Dtk_string name, Dtk_Val val)
This is a high level string class.
Definition: dtk_string.hpp:53
size_t Dtk_Size_t
Definition: define.h:711
void WriteBodyForParasolid(Dtk_BodyPtr inBody, Dtk_tab< Dtk_ID > &outIds)
Definition: WriteBodyForParasolid.cpp:12
static Dtk_SmartPtr< Dtk_Face > DtkDynamicCast(const Dtk_SmartPtr< T2 > &p)
Definition: util_ptr_dtk.hpp:101
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
Dtk_bool IsNULL() const
Definition: util_ptr_dtk.hpp:118
Definition: util_ptr_dtk.hpp:37
Dtk_string dtkTypeError(Dtk_Int32 errNumero)
const char * c_str() const
Retrieve the ASCII conversion string.
Dtk_ErrorStatus psw_WriteBody(Dtk_BodyPtr &inBody)
Writes a Body of a 3D part (3D content of a product), of any kind (solid, shell / faces,...
This is a high level array class.
Definition: util_stl_dtk.hpp:84
Dtk_Size_t size() const
Returns the size of the array.
Definition: util_stl_dtk.hpp:503
DtkErrorStatus psw_EndFile(Dtk_tab< Dtk_ID > &inTabIds, Dtk_bool binForceListOfBody=DTK_FALSE)
Ends the writing of the Parasolid (x_t or x_b) file.
@ dtkNoError
Definition: error_dtk.hpp:151
void push_back(const T &x)
Inserts an element at the end of the array.
Definition: util_stl_dtk.hpp:416