 |
DATAKIT API
V2025.1
|
|
◆ _3mfWriteSample()
int _3mfWriteSample |
( |
const Dtk_string & |
inResultDirectory | ) |
|
23 cout << endl <<
"----------------------------------------------" << endl;
24 cout <<
"3mf Write start" << endl;
27 outputDirectory = inResultDirectory + L
"dtk/3mf/";
29 outputDirectory.
mkdir();
30 outputFileName = outputDirectory + L
"sample.3mf";
52 cubeMesh->info()->SetName(
"Cube" );
59 cylinderMesh->info()->SetName(
"Cylinder" );
67 cout <<
"=> " << outputFileName.
c_str() << endl <<
"3mf Write end" << endl;
Dtk_MeshPtr CreateMeshCube()
Mesh Cube sample.
Definition: testcreatemesh.cpp:207
This is a high level string class.
Definition: dtk_string.hpp:58
void FillFacesColors(Dtk_MeshPtr &inoutCubeMesh)
Filling mesh faces with colors.
Definition: testcreatemesh.cpp:244
DtkErrorStatus InitWrite(const Dtk_string &inOutputFile, const Dtk_string &inLogFile, const WriteOptions &inOptions)
Initialize the 3mf Writer
This class provides several options to tune 3mf Writer. It must be provided to _3mfw::InitWrite metho...
Definition: 3mfw.hpp:23
static Dtk_SmartPtr< Dtk_Entity > DtkDynamicCast(const Dtk_SmartPtr< T2 > &p)
Definition: util_ptr_dtk.hpp:101
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
Dtk_ErrorStatus WriteEntity(const Dtk_EntityPtr &inEntity)
Write the entity provided in parameter in a node.
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:337
int mkdir() const
File Utility : Create a Directory.
void FixPathSeparator()
File Utility : Fixes path separator consistency. It lets you replace the '\' or '/' by the OS needed ...
3MF Writer main class.
Definition: 3mfw.hpp:10
DtkErrorStatus EndWrite()
Creation of the output file and free the Obj Writer
@ dtkNoError
Definition: error_dtk.hpp:140
static Dtk_SmartPtr< Dtk_Info > create()