  | 
  
    DATAKIT API
    V2025.4
    
   
   | 
           
 | 
 
 
 
 
◆ ParasolidWriteSample()
      
        
          | int ParasolidWriteSample  | 
          ( | 
          const Dtk_string &  | 
          inResultDirectory | ) | 
           | 
        
      
 
   18      cout << endl << 
"----------------------------------------------" << endl;
 
   19      cout << 
"Parasolid Write start" << endl;
 
   21      Dtk_string outputDirectory = inResultDirectory + L
"Parasolid/";
 
   23      outputDirectory.
mkdir();
 
   24      Dtk_string outputFileName0 = outputDirectory + L
"sample_listofbody.x_t";
 
   51      for( i = 0; i < l; ++i )
 
   63           cout << 
"=> " << outputFileName0.
c_str() << endl;
 
   67      Dtk_string outputFileName1 = outputDirectory + L
"sample_assemblyofbody.x_t";
 
   72      for( i = 0; i < l; ++i )
 
   76           if( returnID.
size() > 1 )
 
   87                partID[ i ] = outIdass;
 
   91                partID[ i ] = returnID[ 0 ];
 
  116      for( i = 0; i < l; ++i )
 
  119           Matrix1->setOrigin( 
Dtk_pnt( 100.0, 0.0, 0.0 ) );
 
  131           Matrix2->setOrigin( 
Dtk_pnt( 100.0, 100.0, 100.0 ) );
 
  135           instName2.
add_int( ( 
int )(i + l));
 
  152           cout << 
"=> " << outputFileName1.
c_str() << endl;
 
  154      cout << 
"Parasolid Write end" << endl;
 
 
 
 
 
 
uint32_t Dtk_ID
Definition: define.h:691
 
DtkErrorStatus psw_CreateInstance(Dtk_ID inIdAss, Dtk_ID inIdPart, Dtk_transfoPtr &Matrix, Dtk_ID &outIdInst)
Create an Instance item of a part referenced by inIdPart.
 
Dtk_ErrorStatus SetName(Dtk_string inName)
 
DtkErrorStatus psw_InitFile(const Dtk_string &inFileOut, Dtk_bool muteMode, Dtk_Int32 inVersion=180)
Initialise a file to be written.
 
Dtk_ErrorStatus AddCustomerDefinedAttribute(Dtk_string name, Dtk_Val val)
 
static Dtk_SmartPtr< Dtk_transfo > create()
 
#define DTK_TRUE
Definition: define.h:729
 
This is a high level string class.
Definition: dtk_string.hpp:58
 
size_t Dtk_Size_t
Definition: define.h:714
 
char Dtk_bool
Definition: define.h:727
 
void add_int(const int integer, int force_unsigned_int=0)
concat an int to the Dtk_string (convert the int to Dtk_string)
 
DtkErrorStatus psw_CreateAttribut(Dtk_ID inIdCompo, Dtk_InfoPtr &info)
Create all attribut attached to a component (body, assembly, instance)
 
Definition: dtk_val.hpp:67
 
int32_t Dtk_Int32
Definition: define.h:689
 
DtkErrorStatus psw_CreateEmptyAssembly(Dtk_ID &outIdass)
Create the entry item of an assembly.
 
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
 
Dtk_ErrorStatus SetId(const Dtk_Int32 &inId)
 
Definition: util_ptr_dtk.hpp:37
 
Dtk_string dtkTypeError(Dtk_Int32 errNumero)
 
const char * c_str() const
Retrieve the ASCII conversion string.
 
int mkdir() const
File Utility : Create a Directory.
 
This is a mathematical point class.
Definition: dtk_pnt.hpp:22
 
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,...
 
void FixPathSeparator()
File Utility : Fixes path separator consistency. It lets you replace the '\' or '/' by the OS needed ...
 
This is a high level array class.
Definition: util_stl_dtk.hpp:85
 
Dtk_BodyPtr CreateCube()
Definition: testcreatecube.cpp:1320
 
Dtk_Size_t size() const
Returns the size of the array.
Definition: util_stl_dtk.hpp:504
 
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.
 
Dtk_BodyPtr CreateCurves()
Definition: testcreatecube.cpp:1361
 
@ dtkNoError
Definition: error_dtk.hpp:144
 
void push_back(const T &x)
Inserts an element at the end of the array.
Definition: util_stl_dtk.hpp:417
 
DtkErrorStatus psw_LinkAttribut(Dtk_ID inIdAss)
link all attributes attached to an assembly
 
void clear(int no_delete=0)
Resets the Dtk_tab content.
Definition: util_stl_dtk.hpp:353
 
static Dtk_SmartPtr< Dtk_Info > create()
Calls default constructor to allocate a new object.
 
Dtk_BodyPtr CreateOpenShell()
Definition: testcreatecube.cpp:1347