DATAKIT SDK  V2026.2
testlibcatiav5write.cpp File Reference

Functions

int CatiaV5WriteSample (const Dtk_string &inResultDirectory, const Dtk_string &inInputFilesDirectory)
 
Dtk_ErrorStatus ProcessAsm (const Dtk_string &inResultDirectory, const Dtk_string &inInputFilesDirectory)
 
Dtk_ErrorStatus ProcessPart (const Dtk_string &inOutputFile, const Dtk_string &inReferenceName)
 
Dtk_ErrorStatus WriteLayerData ()
 

Function Documentation

◆ CatiaV5WriteSample()

int CatiaV5WriteSample ( const Dtk_string inResultDirectory,
const Dtk_string inInputFilesDirectory 
)
440 {
441  // First we initialize writing with name of files and protection fonction
442  //First you have to initialize the CATIA V5 writer
443  Dtk_string outputDirectory;
444 
445  cout << endl << "----------------------------------------------" << endl;
446  cout << "CatiaV5 Write start" << endl;
447 
448  // Choosing output directory and file name
449  outputDirectory = inResultDirectory + L"CatiaV5/";
450  outputDirectory.FixPathSeparator();
451  outputDirectory.mkdir();
452 
453  catiav5w::WriteOptions options;
454  Dtk_ErrorStatus st = options.SetFileRelease( 19 );
455  if( st != dtkNoError )
456  {
457  cout << "error : " << dtkTypeError( st ).c_str() << endl;
458  return st;
459  }
460 
461  st = catiav5w::InitWrite( outputDirectory + L"V5W_LogFile.log", NULL, options );
462  if( st != dtkNoError )
463  {
464  cout << "error : " << dtkTypeError( st ).c_str() << endl;
465  return st;
466  }
467 
468  ProcessAsm( inResultDirectory, inInputFilesDirectory );
469 
470  //...and the Main writter
472 
473  return dtkNoError;
474 }

◆ ProcessAsm()

Dtk_ErrorStatus ProcessAsm ( const Dtk_string inResultDirectory,
const Dtk_string inInputFilesDirectory 
)
305 {
306  Dtk_string outputDirectory;
307  outputDirectory = inResultDirectory + "CatiaV5/";
308  outputDirectory.FixPathSeparator();
309 
310  Dtk_string CATPartFileName = outputDirectory + L"V5_sample.CATPart";
311  Dtk_string SubProductFileName = outputDirectory + L"SubProduct.CATProduct";
312  Dtk_string RootProductFileName = outputDirectory + L"RootProduct.CATProduct";
313 
314  Dtk_string V5FileName = inInputFilesDirectory + L"CatiaV5/9.CATPart";
315  Dtk_string CGRFileName = inInputFilesDirectory + L"CGR/Engine.cgr";
316  Dtk_string V4ModelFileName = inInputFilesDirectory + L"CatiaV4/EngineComponent.model";
317 
318  CATPartFileName.FixPathSeparator();
319  V5FileName.FixPathSeparator();
320  CGRFileName.FixPathSeparator();
321  V4ModelFileName.FixPathSeparator();
322  SubProductFileName.FixPathSeparator();
323  RootProductFileName.FixPathSeparator();
324 
325  Dtk_transfo TransformationMatrix;
326 
327  Dtk_ErrorStatus err;
328 
329  //The ProcessPart is an user implemented function to create a part
330  err = ProcessPart( CATPartFileName, L"testPart" );
331 
332  //Reference creation to external files - V4 / CGR / existing v5 file -
333  Dtk_ID PartID, V5ID, V4ID, CgrID;
334  {
335  //We create Document References to the CATPart file we create
336  err = catiav5w::CreatePartDocId( CATPartFileName, L"PartFile", PartID );
337 
338  // to an existing CATPart file
339  err = catiav5w::CreatePartDocId( V5FileName, L"V5File", V5ID );
340 
341  //...and to a CGR file
342  err = catiav5w::CreateCGRDocId( CGRFileName, "CGRFile", CgrID );
343 
344  //...and finally to a CATIA V4 '.model' file
345  err = catiav5w::CreateV4ModelDocId( V4ModelFileName, "V4File", V4ID );
346  }
347 
348  //We create the SubProduct
349  Dtk_ID SubProductID, VirtualSubComponent1ID, VirtualSubComponent2ID, PartInstanceID, VirtualSubComponent1_Instance1ID;
350  Dtk_ID PartInstanceID2, CGRInstanceID, V4InstanceID, V5InstanceID, VirtualComponent1_Instance1ID;
351  {
352  //we init a CATProduct context...
353  err = catiav5w::InitProduct( SubProductFileName, "SubProduct" );
354 
355  //we start a virtual component prototype
356  err = catiav5w::InitVirtualComponent( "VirtualSubComponent1" );
357  TransformationMatrix.setOrigin( 0, 0, 150 );
358  err = catiav5w::AddInstance( PartID, L"PartInstance", TransformationMatrix, PartInstanceID );
359  //we end the virtual component prototype
360  err = catiav5w::EndVirtualComponent( VirtualSubComponent1ID );
361 
362  //we start another virtual component prototype
363  err = catiav5w::InitVirtualComponent( "VirtualComponent1" );
364  //we add the sub component instance...
365  TransformationMatrix.setOrigin( 0.0, 0.0, 0.0 );
366  err = catiav5w::AddVirtualComponentInstance( VirtualSubComponent1ID, L"VirtualSubComponent1_Instance1", TransformationMatrix, VirtualSubComponent1_Instance1ID );
367  //we close the virtual component prototype
368  err = catiav5w::EndVirtualComponent( VirtualSubComponent2ID );
369 
370  //we insert the created Part instance...
371  TransformationMatrix.setOrigin( 0.0, 0.0, 0.0 );
372  err = catiav5w::AddInstance( PartID, L"PartInstance", TransformationMatrix, PartInstanceID2 );
373  //...a CGR instance
374  TransformationMatrix.setOrigin( 0.0, 500.0, 0.0 );
375  err = catiav5w::AddInstance( CgrID, L"CGRInstance", TransformationMatrix, CGRInstanceID );
376  //...and a V4 instance
377  TransformationMatrix.setOrigin( 0.0, -500.0, 0.0 );
378  err = catiav5w::AddInstance( V4ID, L"V4Instance", TransformationMatrix, V4InstanceID );
379  //...and an existing V5 instance
380  TransformationMatrix.setOrigin( 0.0, -1000.0, 0.0 );
381  err = catiav5w::AddInstance( V5ID, L"V5Instance", TransformationMatrix, V5InstanceID );
382  //...and the main component instance
383  TransformationMatrix.setOrigin( 0.0, 1000.0, 0.0 );
384  err = catiav5w::AddVirtualComponentInstance( VirtualSubComponent2ID, L"VirtualComponent1_Instance1", TransformationMatrix, VirtualComponent1_Instance1ID );
385 
386  //we close the CATProduct context and retrieve the resulting DocID
387  err = catiav5w::EndProduct( SubProductID );
388  }
389 
390  //Now we create the RootProduct
391  Dtk_ID RootProductID, PartInstance2ID, SubProductInstance1ID, SubProductInstance2ID;
392  {
393  //we create another CATProduct context
394  err = catiav5w::InitProduct( RootProductFileName, "RootProduct" );
395  //and we insert another time the a part instance - multinstancing management -
396  TransformationMatrix.setOrigin( 0.0, 0.0, 50.0 );
397  err = catiav5w::AddInstance( PartID, L"PartInstance2", TransformationMatrix, PartInstance2ID );
398 
399  //and two instances to the first CATProduct file
400  TransformationMatrix.setOrigin( 1000.0, 0.0, 0.0 );
401  err = catiav5w::AddInstance( SubProductID, L"SubProductInstance1", TransformationMatrix, SubProductInstance1ID );
402  TransformationMatrix.setOrigin( -1000.0, 0.0, 0.0 );
403 
404  err = catiav5w::AddInstance( SubProductID, L"SubProductInstance2", TransformationMatrix, SubProductInstance2ID );
405 
406  //Now we create an instance PathID to handle override
407  //We want to override SubProductInstance2/VirtualComponent1_Instance1/VirtualSubComponent1_Instance1/PartInstance
408  {
409  catiav5w::PathID Path1;
410  Path1.push_back( SubProductInstance2ID );
411  Path1.push_back( VirtualComponent1_Instance1ID );
412  Path1.push_back( VirtualSubComponent1_Instance1ID );
413  Path1.push_back( PartInstanceID );
414 
415  //We override Blanked status and color
417  catiav5w::OverrideInstanceColorWithPathID( Path1, Dtk_RGB( 0, 0, 255 ) );
418  }
419 
420  ////No we want to override SubProductInstance1/CGRInstance
421  {
422  catiav5w::PathID Path2;
423  Path2.push_back( SubProductInstance1ID );
424  Path2.push_back( CGRInstanceID );
425 
426  //We override Color and Alpha
427  catiav5w::OverrideInstanceColorWithPathID( Path2, Dtk_RGB( 0, 255, 255 ) );
429  }
430  //finally we close the second CATProduct...
431  err = catiav5w::EndProduct( RootProductID );
432  }
433 
434  cout << "=> " << RootProductFileName.c_str() << endl << "CatiaV5 Write end" << endl;
435  return err;
436 }

◆ ProcessPart()

Dtk_ErrorStatus ProcessPart ( const Dtk_string inOutputFile,
const Dtk_string inReferenceName 
)
25 {
26  Dtk_ErrorStatus err;
27  // We construct a body with a solid
29 
30  // We construct a body with an Open Shell
31  Dtk_BodyPtr body_openshell = sampleWriter::CreateOpenShell();
32 
33  // We construct a body with Wireframe
34  Dtk_BodyPtr body_wireframe = sampleWriter::CreateCurves();
35 
36  // We construct a body with a Point
38 
39  // We construct a body with an Infinite Plane
41 
42  // We construct a body with an Infinite Line / Axis
44 
45  // We construct a mesh
47 
48  Dtk_UUID PartUUID;
49  //You init the Part writer
50  err = catiav5w::InitPart( inOutputFile, inReferenceName, PartUUID );
51  if( err != dtkNoError )
52  {
53  std::cout << "error : " << dtkTypeError( err ) << std::endl;
54  return err;
55  }
56 
57 
58  // We create a new group of entities with a name (you must create at least one group)
59  // This sample make a surfacic group use to construct a solid
60  Dtk_InfoPtr MyCurveSetInfo = Dtk_Info::create();
61  MyCurveSetInfo->SetName( L"MyCurveSet" );
63  if( err != dtkNoError )
64  {
65  std::cout << "error : " << dtkTypeError( err ) << std::endl;
66  return err;
67  }
68 
69  ////Writing Wire entities
70  err = catiav5w::WriteEntity( Dtk_EntityPtr::DtkDynamicCast( body_wireframe ) );
71  if( err != dtkNoError )
72  {
73  std::cout << "error : " << dtkTypeError( err ) << std::endl;
74  return err;
75  }
76 
78  if( err != dtkNoError )
79  {
80  std::cout << "error : " << dtkTypeError( err ) << std::endl;
81  return err;
82  }
83 
84  // Close the group of entities
86  if( err != dtkNoError )
87  {
88  std::cout << "error : " << dtkTypeError( err ) << std::endl;
89  return err;
90  }
91 
92 
93  Dtk_InfoPtr MyOpenShellInfo = Dtk_Info::create();
94  MyOpenShellInfo->SetName( L"MyOpenShell" );
95  MyOpenShellInfo->SetLayer( 123 );
96  MyOpenShellInfo->SetColor( Dtk_RGB( 255, 255, 0 ) );
97  MyOpenShellInfo->SetBlankedStatus( DTK_TRUE );
98  err = catiav5w::CreateNode( catiav5w::NodeTypeGeometricSet, MyOpenShellInfo );
99  if( err != dtkNoError )
100  {
101  std::cout << "error : " << dtkTypeError( err ) << std::endl;
102  return err;
103  }
104 
105  ////Writing OpenShell entity
106  Dtk_InfoPtr& body_openshellInfo = body_openshell->info();
107  if( body_openshellInfo.IsNULL() )
108  {
109  body_openshellInfo = Dtk_Info::create();
110  }
111  body_openshellInfo->SetColor( Dtk_RGB( 0, 255, 0 ) );
112  err = catiav5w::WriteEntity( Dtk_EntityPtr::DtkDynamicCast( body_openshell ) );
113  if( err != dtkNoError )
114  {
115  std::cout << "error : " << dtkTypeError( err ) << std::endl;
116  return err;
117  }
118 
119  // Close the group of entities
121  if( err != dtkNoError )
122  {
123  std::cout << "error : " << dtkTypeError( err ) << std::endl;
124  return err;
125  }
126 
127 
128  // We create a solid group with a name
129  Dtk_InfoPtr MySolidInfo = Dtk_Info::create();
130  MySolidInfo->SetName( L"My Solid" );
131  MySolidInfo->SetLayer( 12 );
132  MySolidInfo->SetColor( Dtk_RGB( 255, 0, 255 ) );
133  err = catiav5w::CreateNode( catiav5w::NodeTypePartBody, MySolidInfo );
134  if( err != dtkNoError )
135  {
136  std::cout << "error : " << dtkTypeError( err ) << std::endl;
137  return err;
138  }
139 
140  // And we write body in the catiav5 file
141  Dtk_InfoPtr& body_solidInfo = body_solid->info();
142  if( body_solidInfo.IsNULL() )
143  {
144  body_solidInfo = Dtk_Info::create();
145  }
146  body_solidInfo->SetColor( Dtk_RGB( 255, 0, 0 ) );
148  if( err != dtkNoError )
149  {
150  std::cout << "error : " << dtkTypeError( err ) << std::endl;
151  return err;
152  }
153 
154  // Close the group of entities
156  if( err != dtkNoError )
157  {
158  std::cout << "error : " << dtkTypeError( err ) << std::endl;
159  return err;
160  }
161 
162  Dtk_InfoPtr MyOpenShellForMeshInfo = Dtk_Info::create();
163  MyOpenShellForMeshInfo->SetName( L"MyOpenShellForMesh" );
164  err = catiav5w::CreateNode( catiav5w::NodeTypeGeometricSet, MyOpenShellForMeshInfo );
165  if( err != dtkNoError )
166  {
167  std::cout << "error : " << dtkTypeError( err ) << std::endl;
168  return err;
169  }
170 
171  ////Writing Mesh entity
173  if( err != dtkNoError )
174  {
175  std::cout << "error : " << dtkTypeError( err ) << std::endl;
176  return err;
177  }
178 
179  // Close the group of entities
181  if( err != dtkNoError )
182  {
183  std::cout << "error : " << dtkTypeError( err ) << std::endl;
184  return err;
185  }
186 
187  Dtk_InfoPtr MyOpenShellForPlaneInfo = Dtk_Info::create();
188  MyOpenShellForPlaneInfo->SetName( L"MyOpenShellForPlane" );
189  err = catiav5w::CreateNode( catiav5w::NodeTypeGeometricSet, MyOpenShellForPlaneInfo );
190  if( err != dtkNoError )
191  {
192  std::cout << "error : " << dtkTypeError( err ) << std::endl;
193  return err;
194  }
195 
196  ////Writing Plane entity
198  if( err != dtkNoError )
199  {
200  std::cout << "error : " << dtkTypeError( err ) << std::endl;
201  return err;
202  }
203 
204  // Close the group of entities
206  if( err != dtkNoError )
207  {
208  std::cout << "error : " << dtkTypeError( err ) << std::endl;
209  return err;
210  }
211 
212  Dtk_InfoPtr MyOpenShellForInifiniteLineInfo = Dtk_Info::create();
213  MyOpenShellForInifiniteLineInfo->SetName( L"MyOpenShellForInifiniteLine" );
214  err = catiav5w::CreateNode( catiav5w::NodeTypeGeometricSet, MyOpenShellForInifiniteLineInfo );
215  if( err != dtkNoError )
216  {
217  std::cout << "error : " << dtkTypeError( err ) << std::endl;
218  return err;
219  }
220 
221  ////Writing Plane entity
223  if( err != dtkNoError )
224  {
225  std::cout << "error : " << dtkTypeError( err ) << std::endl;
226  return err;
227  }
228 
229  // Close the group of entities
231  if( err != dtkNoError )
232  {
233  std::cout << "error : " << dtkTypeError( err ) << std::endl;
234  return err;
235  }
236 
237  //Now we will create an AxisSystem
239  if( err != dtkNoError )
240  {
241  std::cout << "error : " << dtkTypeError( err ) << std::endl;
242  return err;
243  }
244 
245  //we write it now
247  if( err != dtkNoError )
248  {
249  std::cout << "error : " << dtkTypeError( err ) << std::endl;
250  return err;
251  }
252 
253  //We create a default Named View - Camera -
254  //For that we firstly create a camera
256  Dtk_pnt( 200, 100, 100 ), //Origin Point
257  Dtk_pnt( 0, 100, 100 ), //Target Point
258  100., 100., //SemiWidth / SemiHeight
259  Dtk_dir( 0, 1, 0 ) ); //Up Vector - can be reprocessed by CatiaV5 if needed -
260 
261  //We create the model display from the camera
262  //We don't put any clipping entity - not used by V5 write -
263  //The 3rd parameter set the Named View as the default one - used at the V5 file opening -
264  Dtk_ModelDisplayPtr NamedView = Dtk_ModelDisplay::Create( Cam, NULL, DTK_TRUE );
265  //We don't need any name because the default Named View name is hardcoded
266  //Finally we write the NamedView
267  err = catiav5w::WriteNamedView( NamedView );
268  if( err != dtkNoError )
269  {
270  std::cout << "error : " << dtkTypeError( err ) << std::endl;
271  return err;
272  }
273 
274 
275  //Now we create another named view
276  Cam = Dtk_Camera::Create( Dtk_pnt( 100, 100, 100 ), Dtk_pnt( 0, 0, 0 ), 100., 100., Dtk_dir( 0, 1, 0 ) );
277  //Not set as default => will appear in the 'Named Views' Dialog Box into Catia V5
278  NamedView = Dtk_ModelDisplay::Create( Cam, NULL, DTK_FALSE );
279  NamedView->info() = Dtk_Info::create();
280  //We put the Named view name
281  NamedView->info()->SetName( L"MyNamedView" );
282  //Finally we write the NamedView
283  err = catiav5w::WriteNamedView( NamedView );
284  if( err != dtkNoError )
285  {
286  std::cout << "error : " << dtkTypeError( err ) << std::endl;
287  return err;
288  }
289 
290  //Now we write layer data - Layers Names and Layer Filters -
291  err = WriteLayerData();
292  if( err != dtkNoError )
293  {
294  std::cout << "error : " << dtkTypeError( err ) << std::endl;
295  return err;
296  }
297 
298  // Close the current part
299  err = catiav5w::EndPart();
300 
301  return err;
302 }

◆ WriteLayerData()

Dtk_ErrorStatus WriteLayerData ( )
16 {
17  //Keep in mind that layer data can only be set into CATPart context.
18  auto layerInfoSet = sampleWriter::layer::CreateSetWithFilters();
19 
20  //We send layer data to the writer
21  return catiav5w::SetLayerData( layerInfoSet );
22 }
sampleWriter::CreateAxis
Dtk_BodyPtr CreateAxis()
Definition: testcreatecube.cpp:1551
Dtk_ModelDisplay::Create
static Dtk_ModelDisplayPtr Create(const Dtk_CameraPtr &inCamera, const Dtk_EntityPtr &inClippingEntity, const Dtk_bool inIsActivated)
Calls full featured constructor to allocate a new object.
Dtk_ID
uint32_t Dtk_ID
Definition: define.h:681
Dtk_transfo
This is the Transformation dedicated class.
Definition: dtk_transfo.hpp:19
catiav5w::InitVirtualComponent
Dtk_ErrorStatus InitVirtualComponent(const Dtk_string &inReferenceName, const catiav5w::FileDescription &inFileDescription=catiav5w::FileDescription())
Initialize a virtual component during CATProduct process.
catiav5w::OverrideInstanceAlphaWithPathID
Dtk_ErrorStatus OverrideInstanceAlphaWithPathID(const PathID &inInstancePathId, const Dtk_UChar8 inInstanceAlpha)
Override the Alpha of an instance in a Sub Product.
catiav5w::AddVirtualComponentInstance
Dtk_ErrorStatus AddVirtualComponentInstance(const Dtk_ID &inDocId, const Dtk_string &inInstanceName, const Dtk_transfo &inTransfo, Dtk_ID &outInstanceId)
Add an instance to a DocID into the Current (Sub/Root) CATProduct.
Dtk_Info::SetName
Dtk_ErrorStatus SetName(Dtk_string inName)
ProcessAsm
Dtk_ErrorStatus ProcessAsm(const Dtk_string &inResultDirectory, const Dtk_string &inInputFilesDirectory)
Definition: testlibcatiav5write.cpp:304
catiav5w::WriteOptions
This class provides several options to tunes CatiaV5 Writter. It must be provided to catiav5w::InitWr...
Definition: catiav5w.hpp:41
Dtk_transfo::setOrigin
void setOrigin(const Dtk_pnt &O)
Set a new O center point.
catiav5w::NodeTypeGeometricSet
@ NodeTypeGeometricSet
Definition: catiav5w.hpp:430
DTK_TRUE
#define DTK_TRUE
Definition: define.h:719
ProcessPart
Dtk_ErrorStatus ProcessPart(const Dtk_string &inOutputFile, const Dtk_string &inReferenceName)
Definition: testlibcatiav5write.cpp:24
sampleWriter::CreateInfinitePlane
Dtk_BodyPtr CreateInfinitePlane()
Definition: testcreatecube.cpp:1496
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:53
catiav5w::WriteEntity
Dtk_ErrorStatus WriteEntity(const Dtk_EntityPtr &inEntity)
Write the entity provided in parameter.
Dtk_UUID
Definition: dtk_uuid.hpp:8
sampleWriter::CreateAxisSystem
Dtk_AxisSystemPtr CreateAxisSystem()
Definition: testcreatecube.cpp:1525
DTK_FALSE
#define DTK_FALSE
Definition: define.h:720
catiav5w::OverrideInstanceColorWithPathID
Dtk_ErrorStatus OverrideInstanceColorWithPathID(const PathID &inInstancePathId, const Dtk_RGB &inInstanceColor)
Override the Color of an instance in a Sub Product.
catiav5w::CreateNode
Dtk_ErrorStatus CreateNode(const NodeType &inNodeType, const Dtk_string &inNodeName=Dtk_string())
Create a node in the Specification Tree.
catiav5w::InitProduct
Dtk_ErrorStatus InitProduct(const Dtk_string &inFileName, const Dtk_string &inReferenceName, const catiav5w::FileDescription &inFileDescription=catiav5w::FileDescription())
Initialize a sub Product during CATProduct process.
Dtk_Info::SetBlankedStatus
Dtk_ErrorStatus SetBlankedStatus(const Dtk_Int32 &inBlankedStatus)
catiav5w::CreateCGRDocId
Dtk_ErrorStatus CreateCGRDocId(const Dtk_string &inCGRFileName, const Dtk_string &inCGRName, Dtk_ID &outDocId)
Create a CGR Reference and DocID related to a given CGR File.
catiav5w::inReferenceName
const Dtk_string & inReferenceName
Definition: catiav5w.hpp:459
catiav5w::InitPart
Dtk_ErrorStatus InitPart(const Dtk_string &inOutputFile, const Dtk_string &inReferenceName, Dtk_UUID &outPartUUID, const catiav5w::FileDescription &inFileDescription=catiav5w::FileDescription())
Initialize the part
sampleWriter::CreatePoint
Dtk_BodyPtr CreatePoint()
Definition: testcreatecube.cpp:1469
catiav5w::NodeTypePartBody
@ NodeTypePartBody
Definition: catiav5w.hpp:431
catiav5w::EndVirtualComponent
Dtk_ErrorStatus EndVirtualComponent(Dtk_ID &outDocId)
End - and write - the virtual component initialized by catiav5w::InitVirtualComponent.
Dtk_SmartPtr< Dtk_Entity >::DtkDynamicCast
static Dtk_SmartPtr< Dtk_Entity > DtkDynamicCast(const Dtk_SmartPtr< T2 > &p)
Definition: util_ptr_dtk.hpp:101
catiav5w::AddInstance
Dtk_ErrorStatus AddInstance(const Dtk_ID &inDocId, const Dtk_string &inInstanceName, const Dtk_transfo &inTransfo, Dtk_ID &outInstanceId)
Add an instance to a DocID into the Current (Sub/Root) CATProduct.
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
Dtk_SmartPtr::IsNULL
Dtk_bool IsNULL() const
Definition: util_ptr_dtk.hpp:118
catiav5w::CreateV4ModelDocId
Dtk_ErrorStatus CreateV4ModelDocId(const Dtk_string &inV4ModelFileName, const Dtk_string &inV4ModelName, Dtk_ID &outDocId)
Create a V4 Model Reference and DocID related to a given V4 Model File.
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
dtkTypeError
Dtk_string dtkTypeError(Dtk_Int32 errNumero)
catiav5w::EndWrite
Dtk_ErrorStatus EndWrite()
Free the Catia V5 Writer
catiav5w::WriteOptions::SetFileRelease
Dtk_ErrorStatus SetFileRelease(const Dtk_UInt32 inRelease)
Sets the release for the written files.
Dtk_string::c_str
const char * c_str() const
Retrieve the ASCII conversion string.
catiav5w::CreatePartDocId
Dtk_ErrorStatus CreatePartDocId(const Dtk_string &inPartFileName, const Dtk_string &inPartName, Dtk_ID &outDocId)
Create a Part Reference and DocID related to a given CATPart.
sampleWriter::layer::CreateSetWithFilters
Dtk_LayerInfosSetPtr CreateSetWithFilters()
Definition: testcreatelayerinfoset.cpp:23
sampleWriter::CreateMeshCylinder
Dtk_MeshPtr CreateMeshCylinder(int nbpoints)
Mesh Cylinder sample.
Definition: testcreatemesh.cpp:334
Dtk_string::mkdir
int mkdir() const
File Utility : Create a Directory.
Dtk_Info::SetLayer
Dtk_ErrorStatus SetLayer(const Dtk_Int32 &inLayer)
Dtk_pnt
This is a mathematical point class.
Definition: dtk_pnt.hpp:20
Dtk_string::FixPathSeparator
void FixPathSeparator()
File Utility : Fixes path separator consistency. It lets you replace the '\' or '/' by the OS needed ...
Dtk_Camera::Create
static Dtk_CameraPtr Create()
Calls default constructor to allocate a new object.
Dtk_tab
This is a high level array class.
Definition: util_stl_dtk.hpp:84
sampleWriter::CreateCube
Dtk_BodyPtr CreateCube()
Definition: testcreatecube.cpp:1316
catiav5w::EndProduct
Dtk_ErrorStatus EndProduct(Dtk_ID &outDocId)
Write effectively the Sub Product initialized by catiav5w::InitProduct.
catiav5w::CloseCurrentNode
Dtk_ErrorStatus CloseCurrentNode()
close the current node previously created by catiav5w::CreateNode.
catiav5w::SetLayerData
Dtk_ErrorStatus SetLayerData(const Dtk_LayerInfosSetPtr &inLayerDataSet)
Set Layer and LayerFilter Data in a CATPart context.
sampleWriter::CreateCurves
Dtk_BodyPtr CreateCurves()
Definition: testcreatecube.cpp:1357
catiav5w::WriteNamedView
Dtk_ErrorStatus WriteNamedView(const Dtk_ModelDisplayPtr &inNamedView)
Write the given ModelDisplay as NamedView - V5 camera -.
catiav5w::EndPart
Dtk_ErrorStatus EndPart()
Free data allocated by catiav5w::InitPart
dtkNoError
@ dtkNoError
Definition: error_dtk.hpp:149
Dtk_tab::push_back
void push_back(const T &x)
Inserts an element at the end of the array.
Definition: util_stl_dtk.hpp:416
catiav5w::InitWrite
Dtk_ErrorStatus InitWrite(const Dtk_string &inLogFile, Licence_dtk inLicFct, const WriteOptions &inOptions=WriteOptions())
Initialize the Catia V5 Writer
Dtk_RGB
Definition: dtk_rgb.hpp:7
Dtk_Info::SetColor
Dtk_ErrorStatus SetColor(const int &R, const int &G, const int &B)
Dtk_Info::create
static Dtk_SmartPtr< Dtk_Info > create()
Calls default constructor to allocate a new object.
WriteLayerData
Dtk_ErrorStatus WriteLayerData()
Definition: testlibcatiav5write.cpp:15
Dtk_dir
This is a mathematical direction class.
Definition: dtk_dir.hpp:14
catiav5w::OverrideBlankedStatusWithPathID
Dtk_ErrorStatus OverrideBlankedStatusWithPathID(const PathID &inInstancePathId, const Dtk_bool inBlankedStatus)
Override the Blanked Status of an instance in a Sub Product.
sampleWriter::CreateOpenShell
Dtk_BodyPtr CreateOpenShell()
Definition: testcreatecube.cpp:1343