  | 
  
    DATAKIT API
    V2025.4
    
   
   | 
           
 | 
 
 
 
 
◆ CgrWriteSample()
      
        
          | int CgrWriteSample  | 
          ( | 
          const Dtk_string &  | 
          inResultDirectory | ) | 
           | 
        
      
 
   31      cout << endl << 
"----------------------------------------------" << endl;
 
   32      cout << 
"Cgr Write start" << endl;
 
   35      outputDirectory = inResultDirectory + L
"Cgr/";
 
   37      outputDirectory.
mkdir();
 
   38      outputFileName = outputDirectory + L
"sample.cgr";
 
   99      mesh_asm_4->
add_mesh( CylinderMesh );                                   
 
  109      status = 
cgrw_InitWrite( outputFileName, outputDirectory + L
"testcgrw.log", NULL, L
"", options );
 
  123      cout << 
"=> " << outputFileName.
c_str() << endl << 
"Cgr Write end" << endl;
 
 
 
 
 
 
This class gathers asm node related datas.
Definition: cgrw.hpp:16
 
This is the Transformation dedicated class.
Definition: dtk_transfo.hpp:19
 
Dtk_MeshPtr CreateMeshCube()
Mesh Cube sample.
Definition: testcreatemesh.cpp:209
 
void setOrigin(const Dtk_pnt &O)
Set a new O center point.
 
void set_id(int inId)
Set an Id.
 
void setZdir(const Dtk_dir &Z)
Set a new Z vector.
 
int add_axis_system(Dtk_AxisSystemPtr inAxisSystem)
Add an Dtk_AxisSystemPtr in Dtk_mesh_asm_node in the current asm node.
 
This is a high level string class.
Definition: dtk_string.hpp:58
 
Dtk_AxisSystemPtr CreateAxisSystem()
Definition: testcreatecube.cpp:1529
 
void set_color(Dtk_RGB &inColor)
set color on Dtk_mesh_asm_node
 
void setXdir(const Dtk_dir &X)
Set a new X vector.
 
int cgrw_EndWrite()
Free the Cgr Writer
 
Dtk_MeshPtr CreateMeshWire()
Wire mesh sample.
Definition: testcreatemesh.cpp:390
 
Dtk_status cgrw_WriteMeshAsm(Dtk_mesh_asm_node *inRoot)
Write a mesh assembly.
 
int cgrw_InitWrite(Dtk_string inFileWritten, Dtk_string inLogFile, Licence_dtk inLicFct, Dtk_string inLicenceFile, const WriteOptions &inOptions=WriteOptions())
Initialize the Cgr Writer
 
void setScale(Dtk_Double64 scale)
Set a new scale.
 
Definition: util_ptr_dtk.hpp:37
 
Dtk_string dtkTypeError(Dtk_Int32 errNumero)
 
const char * c_str() const
Retrieve the ASCII conversion string.
 
Dtk_MeshPtr CreateMeshCylinder(int nbpoints)
Mesh Cylinder sample.
Definition: testcreatemesh.cpp:339
 
int add_mesh(Dtk_MeshPtr mesh)
Add an Dtk_mesh in Dtk_mesh_asm_node in the current asm node.
 
void setYdir(const Dtk_dir &Y)
Set a new Y vector.
 
int mkdir() const
File Utility : Create a Directory.
 
This is a mathematical point class.
Definition: dtk_pnt.hpp:22
 
void FixPathSeparator()
File Utility : Fixes path separator consistency. It lets you replace the '\' or '/' by the OS needed ...
 
This class provides several options to tunes cgr Writter. It must be provided to cgr::cgrw_InitWrite ...
Definition: cgrw.hpp:77
 
Definition: dtk_rgb.hpp:7
 
void SetFileRelease(const Dtk_UInt32 inRelease)
Sets the release for the written files.
Definition: cgrw.hpp:90
 
This is a mathematical direction class.
Definition: dtk_dir.hpp:15
 
int add_asm_instance(Dtk_mesh_asm_node *inMeshAsm, Dtk_transfo *inTransfo)
Add an asm instance to the current asm node.