DATAKIT SDK  V2026.2
catiav5w.hpp
Go to the documentation of this file.
1 #ifndef __DTK_CATIAV5W_H__
2 #define __DTK_CATIAV5W_H__
3 
4 #include "def/define.h"
5 #include "struct/str_def.h"
6 
12 #include "util/error_dtk.hpp"
13 
14 #include "util/util_stl_dtk.hpp"
15 #include "util/util_ptr_dtk.hpp"
16 #include "util/util_ent_dtk.hpp"
17 ////////////////////////////////////////////////////////////
18 // catiav5w.h //
19 ////////////////////////////////////////////////////////////
20 
21 
22 
23 //! \brief Exported APIs for CatiaV5 Write Library
24 namespace catiav5w
25 {
27  typedef Dtk_ID MaterialId;
28 
29  //! \class WriteOptions
30  //! \brief This class provides several options to tunes CatiaV5 Writter.\n
31  //! It must be provided to catiav5w::InitWrite method.
32  //! \code
33  //! //...
34  //! Dtk_string LogFile = L"MyLogFile.log";
35  //! catiav5w::WriteOptions V5Options;
36  //! V5Options.WriteReferencePlaneAsHidden();
37  //! Dtk_ErrorStatus err = catiav5w::InitWrite( LogFile, NULL, V5Options);
38  //! //...
39  //! \endcode
41  {
42  protected:
43  //! \brief Option to write reference planes as hidden or visible - visible by default -
44  //! \sa WriteReferencePlaneAsHidden()
45  //! \sa WriteReferencePlaneAsVisible()
46  //! \sa AreReferencePlanesWrittenAsHidden()
49  public:
50  //! \BaseConstructor
52  {
53  }
54 
55  //! \BaseDestructor
57  {
58  }
59 
60  //! \brief Sets the reference plane writting as hidden.
61  //! \sa WriteReferencePlaneAsVisible()
63  {
65  }
66 
67  //! \brief Sets the reference plane writting as visible.
68  //! \sa WriteReferencePlaneAsHidden()
70  {
72  }
73 
74  //! \brief Tells if the reference planes are written as hidden.
75  //! \return DTK_TRUE if the reference planes are written as hidden DTK_FALSE else.
77  {
79  }
80 
81  //! \brief Sets the release for the written files.
82  //! \brief The valid versions are 14 and from 19 to GetMaximumFileReleaseHandled().
83  //! You can have more information from the API documentation.
84  //! \param [in] inRelease : The file release.
85  //! \return dtkNoError if success.
86  //! \return dtkErrorVersionNotSupported if fails. In this case, the 14 release number will be be used.
88  //! \brief Retrieve the Written file release.
89  inline Dtk_UInt32 GetFileRelease() const
90  {
91  return _FileRelease;
92  }
93  //! \brief Return the maximum file release number handled by the writer.
95  };
96 
97  //! \brief This is the wrapper class handling V5 write material data.
98  class Material
99  {
100  public:
101  class Lighting
102  {
103  protected:
112 
114  public:
116  {
117  //default values
118  //No color
119  //No Coefficient
120  m_AmbientCoefficient = -1.0;
121  m_DiffuseCoefficient = -1.0;
122  m_SpecularCoefficient = -1.0;
125  }
126  inline void SetAmbientData( const Dtk_RGB& inAmbientColor, const Dtk_Double64 inAmbientCoefficient )
127  {
128  m_AmbientColor = inAmbientColor;
129  m_AmbientCoefficient = ( ( inAmbientCoefficient > 1. ) || ( inAmbientCoefficient < 0. ) ) ? 1. : inAmbientCoefficient;
130  }
131  inline void SetDiffuseData( const Dtk_RGB& inDiffuseColor, const Dtk_Double64 inDiffuseCoefficient )
132  {
133  m_DiffuseColor = inDiffuseColor;
134  m_DiffuseCoefficient = ( ( inDiffuseCoefficient > 1. ) || ( inDiffuseCoefficient < 0. ) ) ? 1. : inDiffuseCoefficient;
135  }
136  inline void SetSpecularData( const Dtk_RGB& inSpecularColor, const Dtk_Double64 inSpecularCoefficient )
137  {
138  m_SpecularColor = inSpecularColor;
139  m_SpecularCoefficient = ( ( inSpecularCoefficient > 1. ) || ( inSpecularCoefficient < 0. ) ) ? 0. : inSpecularCoefficient;
140  }
141  inline void SetTransparencyData( const Dtk_RGB& inTransparencyColor, const Dtk_Double64 inTransparencyCoefficient )
142  {
143  m_TransparencyColor = inTransparencyColor;
144  m_TransparencyCoefficient = ( ( inTransparencyCoefficient > 1. ) || ( inTransparencyCoefficient < 0. ) ) ? 0. : inTransparencyCoefficient;
145  }
146  inline void SetReflectivityCoefficient( const Dtk_Double64 inReflectivityCoefficient )
147  {
148  m_ReflectivityCoefficient = ( ( inReflectivityCoefficient > 1. ) || ( inReflectivityCoefficient < 0. ) ) ? 0. : inReflectivityCoefficient;
149  }
150  inline const Dtk_RGB& GetAmbientColor() const { return m_AmbientColor; }
151  inline const Dtk_RGB& GetDiffuseColor() const { return m_DiffuseColor; }
152  inline const Dtk_RGB& GetSpecularColor() const { return m_SpecularColor; }
153  inline const Dtk_RGB& GetTransparencyColor() const { return m_TransparencyColor; }
159  };
160 
161  class Analysis
162  {
163  protected:
165  public:
167  {
168  //default values
169  m_Density = -1.0; //default no density
170  }
171  inline void SetDensity( const Dtk_Double64 inDensity ) { m_Density = inDensity; }
172  inline Dtk_Double64 GetDensity() const { return m_Density; }
173  };
174 
175  public:
179  public:
180 
181  Material( const Dtk_string& inName = L"" )
182  {
183  m_Name = inName;
184  }
185  };
186 
187 
188 
189 
190  //! \class FileDescription
191  //! \brief This class provides several informations about a CatiaV5 File.\n
192  //! It can be used with catiav5w::InitPart and catiav5w::InitProduct functions to specify file properties.
193  //! \code
194  //! //...
195  //! catiav5w::FileDescription Desc;
196  //! Desc.SetDefinition(L"MyDef");
197  //! Desc.SetDescription(L"MyDesc");
198  //! Desc.SetRevision(L"MyRev");
199  //! Desc.SetNomenclature(L"MyNom");
200  //! Desc.SetSourceType(catiav5w::FileDescription::Bought);
201  //! Dtk_UUID PartUUID = catiav5w::InitPart( inOutputFile, inReferenceName, Desc);
202  //! //...
203  //! \endcode
205  {
206  public:
207 
209  {
210  Unknown = 0,
212  Bought
213  };
214  protected:
215 
217  //! \brief Revision of the CatiaV5 File
219  //! \brief Definition of the CatiaV5 File
221  //! \brief Nomenclature of the CatiaV5 File
223  //! \brief Description of the CatiaV5 File
225  //! \brief Source Type of the CatiaV5 File.
227 
229 
231 
232  public:
233 
234  //! \BaseConstructor
236  {
237  _SourceType = Unknown; _PartDensity = -1.0;
238  }
239 
240  //! \BaseDestructor
242  {
243  }
244 
245  //! \brief Sets the file root material
246  //! \sa GetPartMaterial()
247  inline void SetPartMaterial( const catiav5w::Material& inMaterial )
248  {
249  m_PartMaterial = inMaterial;
250  }
251 
252  //! \brief Sets the file revision
253  //! \sa GetRevision()
254  inline void SetRevision( const Dtk_string& inRevision )
255  {
256  _Revision = inRevision;
257  }
258 
259  //! \brief Sets the file definition
260  //! \sa GetDefinition()
261  inline void SetDefinition( const Dtk_string& inDefinition )
262  {
263  _Definition = inDefinition;
264  }
265 
266  //! \brief Sets the file nomenclature
267  //! \sa GetNomenclature()
268  inline void SetNomenclature( const Dtk_string& inNomenclature )
269  {
270  _Nomenclature = inNomenclature;
271  }
272 
273  //! \brief Sets the file description
274  //! \sa GetDescription()
275  inline void SetDescription( const Dtk_string& inDescription )
276  {
277  _Description = inDescription;
278  }
279 
280  //! \brief Sets the file source type
281  //! \sa GetSourceType()
282  inline void SetSourceType( const ProductSourceType& inSourceType )
283  {
284  _SourceType = inSourceType;
285  }
286 
287  //! \brief Sets the Part Density
288  //! \sa GetPartDensity()
289  //! \deprecated Use SetPartMaterial with Analysis::Density instead.
290  SetAsDeprecated( "2023.4", "Use SetPartMaterial with Analysis::Density instead." )
291  inline void SetPartDensity( const Dtk_Double64 inPartDensity )
292  {
293  _PartDensity = inPartDensity;
294  }
295 
296 
297  //! \brief Adds an additional double property.
298  inline void AddDoubleProperty( const Dtk_string& inPropertyName, const double& inValue )
299  {
300  Dtk_string TmpValue = inValue;
302  TmpProp->SetTitle( inPropertyName );
303  TmpProp->SetAsReal();
304  TmpProp->SetValue( TmpValue );
305 
306  _AdditionalProperties.push_back( TmpProp );
307  }
308 
309  //! \brief Adds an additional integer property.
310  inline void AddIntegerProperty( const Dtk_string& inPropertyName, const Dtk_Int32& inValue )
311  {
312  Dtk_string TmpValue;
313  TmpValue.convert_from_int( inValue );
315  TmpProp->SetTitle( inPropertyName );
316  TmpProp->SetAsInteger();
317  TmpProp->SetValue( TmpValue );
318 
319  _AdditionalProperties.push_back( TmpProp );
320  }
321 
322 
323  //! \brief Adds an additional integer property.
324  inline void AddBooleanProperty( const Dtk_string& inPropertyName, const Dtk_bool& inValue )
325  {
326  Dtk_string TmpValue;
327  TmpValue.convert_from_int( inValue );
329  TmpProp->SetTitle( inPropertyName );
330  TmpProp->SetAsBoolean();
331  TmpProp->SetValue( TmpValue );
332 
333  _AdditionalProperties.push_back( TmpProp );
334  }
335 
336  //! \brief Adds an additional integer property.
337  inline void AddStringProperty( const Dtk_string& inPropertyName, const Dtk_string& inValue )
338  {
340  TmpProp->SetTitle( inPropertyName );
341  TmpProp->SetType( L"STRING" );
342  TmpProp->SetValue( inValue );
343 
344  _AdditionalProperties.push_back( TmpProp );
345  }
346  //! \brief Retrieves the file root material - read only -
347  //! \return The file root material
348  //! \sa SetPartMaterial()
349  inline const catiav5w::Material& GetPartMaterial() const
350  {
351  return m_PartMaterial;
352  }
353 
354  //! \brief Retrieves the file revision - read only -
355  //! \return The file revision
356  //! \sa SetRevision()
357  inline const Dtk_string& GetRevision() const
358  {
359  return _Revision;
360  }
361 
362  //! \brief Retrieves the file definition - read only -
363  //! \return The file definition
364  //! \sa SetDefinition()
365  inline const Dtk_string& GetDefinition() const
366  {
367  return _Definition;
368  }
369 
370  //! \brief Retrieves the file nomenclature - read only -
371  //! \return The file nomenclature
372  //! \sa SetNomenclature()
373  inline const Dtk_string& GetNomenclature() const
374  {
375  return _Nomenclature;
376  }
377 
378  //! \brief Retrieves the file description - read only -
379  //! \return The file description
380  //! \sa SetDescription()
381  inline const Dtk_string& GetDescription() const
382  {
383  return _Description;
384  }
385 
386  //! \brief Retrieves the file source type - read only -
387  //! \return The file source type
388  //! \sa SetSourceType()
389  inline const ProductSourceType& GetSourceType() const
390  {
391  return _SourceType;
392  }
393 
394  //! \brief Retrieves the Part Density - read only -
395  //! \return The Part Density
396  //! \sa SetPartDensity()
397  //! \deprecated Use GetPartMaterial method instead.
398  SetAsDeprecated( "2023.4", "Use GetPartMaterial method instead." )
399  inline Dtk_Double64 GetPartDensity() const
400  {
401  return _PartDensity;
402  }
403 
404  //! \brief Retrieves the file source type - read only -
405  //! \return The file source type
406  //! \sa SetSourceType()
408  {
409  return _AdditionalProperties.size();
410  }
411 
412  //! \brief Retrieves the file source type - read only -
413  //! \return The file source type
414  //! \sa SetSourceType()
415  inline const Dtk_PropertiesPtr& GetIthAdditionalProperties( const Dtk_Size_t& inPos ) const
416  {
417  return _AdditionalProperties[ inPos ];
418  }
419 
420  };
421 
422 
423  //! \brief Type of Specification Tree Node used into a CATPart file.
424  //! \brief The type of geometrical entities depends of the Node Type.Type of Specification Tree Node used into a CATPart file.
425  //! \brief You can create Bodies into a NodeTypePartBody (Hybrid Body) node and into NodeTypeMechanicalTool nodes.
426  //! \brief You can create Surfacic entities into NodeTypeGeometricSet nodes and into NodeTypePartBody (Hybrid Body) nodes.
427  enum NodeType
428  {
431  NodeTypePartBody = 2,//hybrid bodies
433  };
434 
435  //! \brief Initialize the Catia V5 Writer
436  //! \return dtkNoError if it is OK.
437  //! \remark This is the first function called for the writer.
438  //! \param [in] inLogFile : Log file
439  //! \param [in] inLicFct : Licence fuction or Null
440  Dtk_ErrorStatus InitWrite( const Dtk_string& inLogFile, Licence_dtk inLicFct, const WriteOptions& inOptions = WriteOptions() );
441 
442 
443  //! \brief Tells if the Write Module has been initialized or not.
444  //! \return DTK_TRUE if the Writer Module has been initialized, DTK_FALSE else.
446 
447  //! \brief Initialize the part
448  //! \return the Dtk_UUID of the created CATPart.
449  //! \remark used at the beginning of conversion.
450  //! \param [in] inOutputFile : Name of the CATPart to be Written.
451  //! \param [in] inReferenceName : Reference Name - visible at the Specification Tree Root -
452  //! \param [in] inFileDescription : Description File
453  //! \remarks The given path into inOutputFile must exist and you must have write permission in this folder.
454  //! \remarks InitPart/EndPart calls can't be nested. You have to call EndPart before calling InitPart another time.
455  //! \deprecated Use Dtk_ErrorStatus catiav5w::InitPart( const Dtk_string&, const Dtk_string&, Dtk_UUID&, const catiav5w::FileDescription& ) method instead.
456  SetAsDeprecated( "2024.2", "Use Dtk_ErrorStatus catiav5w::InitPart( const Dtk_string&, const Dtk_string&, Dtk_UUID&, const catiav5w::FileDescription& ) method instead." )
458  const Dtk_string &inOutputFile,
461 
462  //! \brief Initialize the part
463  //! \return dtkNoError if it is OK.
464  //! \remark used at the beginning of conversion.
465  //! \param [in] inOutputFile : Name of the CATPart to be Written.
466  //! \param [in] inReferenceName : Reference Name - visible at the Specification Tree Root -
467  //! \param [out] outPartUUID : The Dtk_UUID of the created CATPart.
468  //! \param [in] inFileDescription : Description File
469  //! \remarks The output file name will be checked to see if it's V5 application compliant. See http://catiadoc.free.fr/online/basug_C2/basugbt0402.htm for more explanations. If the fullpath is invalid an error will be retrurn and no file will be created.
470  //! \remarks The given path into inOutputFile must exist and you must have write permission in this folder.
471  //! \remarks InitPart/EndPart calls can't be nested. You have to call EndPart before calling InitPart another time.
473  const Dtk_string &inOutputFile,
475  Dtk_UUID& outPartUUID,
477 
478  //! \brief Free data allocated by catiav5w::InitPart
479  //! \return dtkNoError if it is OK.
480  //! \remark used at the end of conversion.
481  //! \remarks InitPart/EndPart calls can't be nested. You have to call EndPart before calling InitPart another time.
483 
484  //! \brief Free the Catia V5 Writer
485  //! \return dtkNoError if it is OK.
486  //! \remark used at the last function used for the writer.
488 
489  //! \brief Write the entity provided in parameter.
490  //! \param [in] inEntity : The Entity to be written
491  //! \return dtkNoError if it is OK.
492  //! \remark This function is used to write entities.
494 
495  //! \brief Write the given ModelDisplay as NamedView - V5 camera -.
496  //! \param [in] inNamedView : The NamedViewntity to be written
497  //! \return dtkNoError if it is OK.
499 
500  //! \brief Create a node in the Specification Tree.
501  //! \param [in] inNodeType : The Node Type.
502  //! \param [in] inNodeName : The Node Name.
503  //! \return dtkNoError if it is OK.
504  //! \return dtkErrorUnspecified if Node type is unknown.
505  //! \remark The catiav5w::NodeTypeGeometricSet type must be used for surfaces and WireFrame.
506  //! \remark For Solid, the catiav5w::NodeTypePartBody must be used.
507  Dtk_ErrorStatus CreateNode( const NodeType& inNodeType, const Dtk_string& inNodeName = Dtk_string() );
508 
509  //! \brief Create a node in the Specification Tree.
510  //! \param [in] inNodeType : The Node Type.
511  //! \param [in] inInfos : The Node Infos including Name/layer.
512  //! \return dtkNoError if it is OK.
513  //! \return dtkErrorUnspecified if Node type is unknown.
514  //! \remark The catiav5w::NodeTypeGeometricSet type must be used for surfaces and WireFrame.
515  //! \remark For Solid, the catiav5w::NodeTypePartBody must be used.
516  //! \remark At this moment only Name and Layer informations are handled.
517  Dtk_ErrorStatus CreateNode( const NodeType& inNodeType, const Dtk_InfoPtr& inInfos );
518 
519  //! \brief close the current node previously created by catiav5w::CreateNode.
520  //! \return dtkNoError if it is OK.
522 
523  //! \brief Adds a double paramater
524  //! \param [in] inParameterName : The parameter name.
525  //! \param [in] inValue : The parameter value.
526  //! \return dtkNoError if it is OK.
527  //! \remark This function must be called between InitPart/InitProduct and EndPart/EndProduct calls.
528  Dtk_ErrorStatus AddDoubleParameter( const Dtk_string& inParameterName, const Dtk_Double64& inValue );
529 
530  //! \brief Adds a integer paramater
531  //! \param [in] inParameterName : The parameter name.
532  //! \param [in] inValue : The parameter value.
533  //! \return dtkNoError if it is OK.
534  //! \remark This function must be called between InitPart/InitProduct and EndPart/EndProduct calls.
535  Dtk_ErrorStatus AddIntegerParameter( const Dtk_string& inParameterName, const Dtk_Int32& inValue );
536 
537  //! \brief Adds a boolean paramater
538  //! \param [in] inParameterName : The parameter name.
539  //! \param [in] inValue : The parameter value.
540  //! \return dtkNoError if it is OK.
541  //! \remark This function must be called between InitPart/InitProduct and EndPart/EndProduct calls.
542  Dtk_ErrorStatus AddBooleanParameter( const Dtk_string& inParameterName, const Dtk_bool& inValue );
543 
544  //! \brief Adds a string paramater
545  //! \param [in] inParameterName : The parameter name.
546  //! \param [in] inValue : The parameter value.
547  //! \return dtkNoError if it is OK.
548  //! \remark This function must be called between InitPart/InitProduct and EndPart/EndProduct calls.
549  Dtk_ErrorStatus AddStringParameter( const Dtk_string& inParameterName, const Dtk_string& inValue );
550 
551 
552  //! \brief Create a Part Reference and DocID related to a given CATPart.
553  //! \param [in] inPartFileName : Name of the CATPart to be linked.
554  //! \param [in] inPartName : CATPart Reference.
555  //! \param [out] outDocId : Resulting CATPart DocId - used by catiav5w::AddInstance -.
556  //! \return dtkNoError if it is OK.
557  //! \remark The given CATPart may have been created in the same DATAKIT V5 Writer instance or not - external file -
559  const Dtk_string& inPartName,
560  Dtk_ID& outDocId );
561 
562  //! \brief Create a Product Reference and DocID related to a given CATProduct.
563  //! \param [in] inPartFileName : Name of the CATProduct to be linked.
564  //! \param [in] inPartName : CATProduct Reference.
565  //! \param [out] outDocId : Resulting CATProduct DocId - used by catiav5w::AddInstance -.
566  //! \return dtkNoError if it is OK.
567  //! \remark The given CATProduct may have been created in the same DATAKIT V5 Writer instance or not - external file -
569  const Dtk_string& inPartName,
570  Dtk_ID& outDocId );
571 
572  //! \brief Create a CGR Reference and DocID related to a given CGR File.
573  //! \param [in] inCGRFileName : Name of the CGR to be linked.
574  //! \param [in] inCGRName : CGR Reference.
575  //! \param [out] outDocId : Resulting CGR DocId - used by catiav5w::AddInstance -.
576  //! \return dtkNoError if it is OK.
578  const Dtk_string& inCGRName,
579  Dtk_ID& outDocId );
580 
581  //! \brief Create a V4 Model Reference and DocID related to a given V4 Model File.
582  //! \param [in] inV4ModelFileName : Name of the V4 Model to be linked.
583  //! \param [in] inV4ModelName : V4 Model Reference.
584  //! \param [out] outDocId : Resulting V4 Model DocId - used by catiav5w::AddInstance -.
585  //! \remark Only .model V4 files can be linked to a CATProduct.
586  //! \return dtkNoError if it is OK.
587  Dtk_ErrorStatus CreateV4ModelDocId( const Dtk_string& inV4ModelFileName,
588  const Dtk_string& inV4ModelName,
589  Dtk_ID& outDocId );
590 
591  //! \brief Initialize a sub Product during CATProduct process.
592  //! \param [in] inFileName : Name of the CATProduct to be written.
593  //! \param [in] inReferenceName : Reference Name - visible at the Specification Tree Root -
594  //! \param [in] inFileDescription : Description File
595  //! \return dtkNoError if it is OK.
596  //! \remarks The given path into inFileName must exist and you must have write permission in this folder.
597  //! \remarks InitProduct/EndProduct calls can't be nested. You have to call EndProduct before calling InitProduct another time.
599  const Dtk_string& inFileName,
602 
603  //! \brief Write effectively the Sub Product initialized by catiav5w::InitProduct.
604  //! \brief This function also retrieve the resulting Sub CATProduct DocID
605  //! \param [out] outDocId : The resulting CATProduct DocId - used by catiav5w::AddInstance -.
606  //! \return dtkNoError if it is OK.
607  //! \remarks InitProduct/EndProduct calls can't be nested. You have to call EndProduct before calling InitProduct another time.
609 
610  //! \brief Add an instance to a DocID into the Current (Sub/Root) CATProduct.
611  //! \param [in] inDocId : DocID of an already written file
612  //! provided by catiav5w::CreatePartDocId / catiav5w::CreateCGRDocId / catiav5w::CreateV4ModelDocId / catiav5w::EndProduct functions-.
613  //! \param [in] inInstanceName : Instance Name.
614  //! \param [in] inTransfo : Transformation Matrix applicated to the instance.
615  //! \param [in] inBlankedStatus : Blankeds Status - 0 = Visible / 1 = Blanked -. Default value: 0.
616  //! \param [in] inInstanceColorAlpha : Instance ColorAlpha. Default Value: No Color/Alpha.
617  //! \return dtkNoError if it is OK.
618  //! \deprecated Use AddInstance( const Dtk_ID&, const Dtk_string&, const Dtk_transfo&, Dtk_ID& )
619  SetAsDeprecated( "2023.4", "Use catiav5w::AddInstance( const Dtk_ID&, const Dtk_string&, const Dtk_transfo&, Dtk_ID& ) method instead." )
620  Dtk_ErrorStatus AddInstance( const Dtk_ID& inDocId,
625 
626  //! \brief Add an instance to a DocID into the Current (Sub/Root) CATProduct.
627  //! \param [in] inDocId : DocID of an already written file
628  //! provided by catiav5w::CreatePartDocId / catiav5w::CreateCGRDocId / catiav5w::CreateV4ModelDocId / catiav5w::EndProduct functions-.
629  //! \param [in] inInstanceName : Instance Name.
630  //! \param [in] inTransfo : Transformation Matrix applicated to the instance.
631  //! \param [out] outInstanceId : returned Instance ID or 0 in case of error.
632  //! \return dtkNoError if it is OK.
634  const Dtk_string& inInstanceName,
635  const Dtk_transfo& inTransfo,
636  Dtk_ID& outInstanceId );
637  //! \brief Initialize a virtual component during CATProduct process.
638  //! \param [in] inReferenceName : Component Reference Name - visible at the Specification Tree Root -
639  //! \param [in] inFileDescription : Description File
640  //! \return dtkNoError if it is OK.
644 
645  //! \brief End - and write - the virtual component initialized by catiav5w::InitVirtualComponent.
646  //! \brief This function also retrieve the resulting Sub CATProduct DocID
647  //! \param [out] outDocId : The resulting Component DocId - used by catiav5w::AddVirtualComponentInstance -.
648  //! \return dtkNoError if it is OK.
650 
651  //! \brief Add an instance to a DocID into the Current (Sub/Root) CATProduct.
652  //! \param [in] inDocId : DocID of an already created Component
653  //! provided by catiav5w::EndVirtualComponent function-.
654  //! \param [in] inInstanceName : Instance Name.
655  //! \param [in] inTransfo : Transformation Matrix applicated to the instance.
656  //! \return dtkNoError if it is OK.
657  //! \remarks You must use the inDocId in the same Product context as the catiav5w::EndVirtualComponent call. If not you will obtain an error.
658  //! \deprecated Use AddVirtualComponentInstance( const Dtk_ID&, const Dtk_string&, const Dtk_transfo&, Dtk_ID& )
659  SetAsDeprecated( "2023.4", "Use catiav5w::AddVirtualComponentInstance( const Dtk_ID&, const Dtk_string&, const Dtk_transfo&, Dtk_ID& ) method instead." )
661  const Dtk_string& inInstanceName,
662  const Dtk_transfo& inTransfo );
663 
664  //! \brief Add an instance to a DocID into the Current (Sub/Root) CATProduct.
665  //! \param [in] inDocId : DocID of an already created Component
666  //! provided by catiav5w::EndVirtualComponent function-.
667  //! \param [in] inInstanceName : Instance Name.
668  //! \param [in] inTransfo : Transformation Matrix applicated to the instance.
669  //! \return dtkNoError if it is OK.
670  //! \remarks You must use the inDocId in the same Product context as the catiav5w::EndVirtualComponent call. If not you will obtain an error.
672  const Dtk_string& inInstanceName,
673  const Dtk_transfo& inTransfo,
674  Dtk_ID& outInstanceId );
675 
676  //! \brief Override the Blanked Status of an instance in a Sub Product.
677  //! \param [in] inInstanceId : InstanceID of an already created instance
678  //! provided by catiav5w::AddInstance or catiav5w::AddVirtualComponentInstance functions.
679  //! \param [in] inBlankedStatus : Blankeds Status - 0 = Visible / 1 = Blanked -. Default value: 0.
680  //! \return dtkNoError if it is OK.
681  //! \remarks You must use this function between InitProduct/EndProduct to have a product context where you override the attribute.
683 
684  //! \brief Override the Color of an instance in a Sub Product.
685  //! \param [in] inInstanceId : InstanceID of an already created instance
686  //! provided by catiav5w::AddInstance or catiav5w::AddVirtualComponentInstance functions.
687  //! \param [in] inInstanceColor : Instance Color.
688  //! \return dtkNoError if it is OK.
689  //! \remarks You must use this function between InitProduct/EndProduct to have a product context where you override the attribute.
690  Dtk_ErrorStatus OverrideInstanceColorWithPathID( const PathID& inInstancePathId, const Dtk_RGB& inInstanceColor );
691 
692  //! \brief Override the Alpha of an instance in a Sub Product.
693  //! \param [in] inInstanceId : InstanceID of an already created instance
694  //! provided by catiav5w::AddInstance or catiav5w::AddVirtualComponentInstance functions.
695  //! \param [in] inInstanceAlpha : Instance Alpha.
696  //! \return dtkNoError if it is OK.
697  //! \remarks You must use this function between InitProduct/EndProduct to have a product context where you override the attribute.
698  Dtk_ErrorStatus OverrideInstanceAlphaWithPathID( const PathID& inInstancePathId, const Dtk_UChar8 inInstanceAlpha );
699 
700  //! \brief Set Layer and LayerFilter Data in a CATPart context.
701  //! \param [in] inLayerDataSet : Layer and LayerFilter Data.
702  //! \return dtkNoError if it is OK.
703  //! \return dtkNoError if it is OK.
704  //! \remarks Layer Name and LayerFilters can only be added in CATPart context.
706 
707  //! \brief Add a Material in a CATPart context.
708  //! \param [in] inMaterial : Material to be added.
709  //! \return ID of the Material. It must be set in the Node or Body by calling Dtk_Info::SetRenderInfosId method
710  //! \remarks Material can only be added in CATPart context.
711  //! \deprecated Use Dtk_ErrorStatus catiav5w::AddMaterial( const Material&, MaterialId& ) method instead.
712  SetAsDeprecated( "2024.2", "Use Dtk_ErrorStatus catiav5w::AddMaterial( const Material&, MaterialId& ) method instead." )
713  MaterialId AddMaterial( const Material& inMaterial );
714 
715  //! \brief Add a Material in a CATPart context.
716  //! \param [in] inMaterial : Material to be added.
717  //! \param [out] outMaterialId : ID of the Material. It must be set in the Node or Body by calling Dtk_Info::SetRenderInfosId method
718  //! \return dtkNoError if it is OK.
719  //! \remarks Material can only be added in CATPart context.
720  Dtk_ErrorStatus AddMaterial( const Material& inMaterial, MaterialId& outMaterialId );
721 
722 };
723 #endif
724 
725 
726 /// @cond NO_DOXYGEN_DOC
727 namespace Config
728 {
729  /// @endcond
730  namespace catiav5w
731  {
734  }
735  /// @cond NO_DOXYGEN_DOC
736 }
737 /// @endcond
738 
739 
740 
741 
catiav5w::FileDescription::AddIntegerProperty
void AddIntegerProperty(const Dtk_string &inPropertyName, const Dtk_Int32 &inValue)
Adds an additional integer property.
Definition: catiav5w.hpp:310
Dtk_ID
uint32_t Dtk_ID
Definition: define.h:681
Dtk_transfo
This is the Transformation dedicated class.
Definition: dtk_transfo.hpp:19
catiav5w::FileDescription::SetDefinition
void SetDefinition(const Dtk_string &inDefinition)
Sets the file definition.
Definition: catiav5w.hpp:261
catiav5w::WriteOptions::WriteReferencePlaneAsVisible
void WriteReferencePlaneAsVisible()
Sets the reference plane writting as visible.
Definition: catiav5w.hpp:69
catiav5w::AddBooleanParameter
Dtk_ErrorStatus AddBooleanParameter(const Dtk_string &inParameterName, const Dtk_bool &inValue)
Adds a boolean paramater.
catiav5w::InitVirtualComponent
Dtk_ErrorStatus InitVirtualComponent(const Dtk_string &inReferenceName, const catiav5w::FileDescription &inFileDescription=catiav5w::FileDescription())
Initialize a virtual component during CATProduct process.
catiav5w::Material::Lighting::m_TransparencyCoefficient
Dtk_Double64 m_TransparencyCoefficient
Definition: catiav5w.hpp:111
catiav5w::OverrideInstanceAlphaWithPathID
Dtk_ErrorStatus OverrideInstanceAlphaWithPathID(const PathID &inInstancePathId, const Dtk_UChar8 inInstanceAlpha)
Override the Alpha of an instance in a Sub Product.
catiav5w::AddMaterial
Dtk_ErrorStatus AddMaterial(const Material &inMaterial, MaterialId &outMaterialId)
Add a Material in a CATPart context.
catiav5w::FileDescription::SetAsDeprecated
SetAsDeprecated("2023.4", "Use GetPartMaterial method instead.") inline Dtk_Double64 GetPartDensity() const
Retrieves the Part Density - read only -.
Definition: catiav5w.hpp:398
catiav5w::Material::Lighting::SetDiffuseData
void SetDiffuseData(const Dtk_RGB &inDiffuseColor, const Dtk_Double64 inDiffuseCoefficient)
Definition: catiav5w.hpp:131
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.
catiav5w::Material::Lighting::m_SpecularCoefficient
Dtk_Double64 m_SpecularCoefficient
Definition: catiav5w.hpp:109
catiav5w::Material::Lighting::m_TransparencyColor
Dtk_RGB m_TransparencyColor
Definition: catiav5w.hpp:110
catiav5w::FileDescription::GetDefinition
const Dtk_string & GetDefinition() const
Retrieves the file definition - read only -.
Definition: catiav5w.hpp:365
catiav5w::FileDescription::_Nomenclature
Dtk_string _Nomenclature
Nomenclature of the CatiaV5 File.
Definition: catiav5w.hpp:222
catiav5w::Material::Lighting::GetTransparencyColor
const Dtk_RGB & GetTransparencyColor() const
Definition: catiav5w.hpp:153
catiav5w::WriteOptions
This class provides several options to tunes CatiaV5 Writter. It must be provided to catiav5w::InitWr...
Definition: catiav5w.hpp:41
catiav5w::WriteOptions::GetFileRelease
Dtk_UInt32 GetFileRelease() const
Retrieve the Written file release.
Definition: catiav5w.hpp:89
catiav5w::AddIntegerParameter
Dtk_ErrorStatus AddIntegerParameter(const Dtk_string &inParameterName, const Dtk_Int32 &inValue)
Adds a integer paramater.
catiav5w::NodeTypeGeometricSet
@ NodeTypeGeometricSet
Definition: catiav5w.hpp:430
catiav5w::Material::Lighting
Definition: catiav5w.hpp:102
catiav5w::inTransfo
const Dtk_string const Dtk_transfo & inTransfo
Definition: catiav5w.hpp:622
catiav5w::IsWriteInitialized
Dtk_bool IsWriteInitialized()
Tells if the Write Module has been initialized or not.
catiav5w::Material
This is the wrapper class handling V5 write material data.
Definition: catiav5w.hpp:99
DTK_TRUE
#define DTK_TRUE
Definition: define.h:719
catiav5w::FileDescription::SetNomenclature
void SetNomenclature(const Dtk_string &inNomenclature)
Sets the file nomenclature.
Definition: catiav5w.hpp:268
catiav5w::SetWriteReferencePlanesAsHidden
void SetWriteReferencePlanesAsHidden(const Dtk_bool &inVal)
catiav5w::FileDescription::GetDescription
const Dtk_string & GetDescription() const
Retrieves the file description - read only -.
Definition: catiav5w.hpp:381
catiav5w::WriteOptions::_WriteReferencePlanesAsHidden
Dtk_bool _WriteReferencePlanesAsHidden
Option to write reference planes as hidden or visible - visible by default -.
Definition: catiav5w.hpp:47
catiav5w::FileDescription::GetIthAdditionalProperties
const Dtk_PropertiesPtr & GetIthAdditionalProperties(const Dtk_Size_t &inPos) const
Retrieves the file source type - read only -.
Definition: catiav5w.hpp:415
catiav5w::FileDescription::_SourceType
ProductSourceType _SourceType
Source Type of the CatiaV5 File.
Definition: catiav5w.hpp:226
catiav5w::Material::Lighting::GetAmbientColor
const Dtk_RGB & GetAmbientColor() const
Definition: catiav5w.hpp:150
Dtk_UInt32
uint32_t Dtk_UInt32
Definition: define.h:680
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:53
Dtk_Size_t
size_t Dtk_Size_t
Definition: define.h:704
Dtk_string::convert_from_int
void convert_from_int(const int integer, int force_unsigned_int=0)
affectation operator from a int
catiav5w::FileDescription::SetAsDeprecated
SetAsDeprecated("2023.4", "Use SetPartMaterial with Analysis::Density instead.") inline void SetPartDensity(const Dtk_Double64 inPartDensity)
Sets the Part Density.
Definition: catiav5w.hpp:290
catiav5w::WriteEntity
Dtk_ErrorStatus WriteEntity(const Dtk_EntityPtr &inEntity)
Write the entity provided in parameter.
Dtk_UUID
Definition: dtk_uuid.hpp:8
dtk_metadata.hpp
catiav5w::FileDescription::AddBooleanProperty
void AddBooleanProperty(const Dtk_string &inPropertyName, const Dtk_bool &inValue)
Adds an additional integer property.
Definition: catiav5w.hpp:324
catiav5w::FileDescription
This class provides several informations about a CatiaV5 File. It can be used with catiav5w::InitPart...
Definition: catiav5w.hpp:205
catiav5w::Material::Lighting::GetDiffuseColor
const Dtk_RGB & GetDiffuseColor() const
Definition: catiav5w.hpp:151
catiav5w::WriteOptions::GetMaximumFileReleaseHandled
static Dtk_UInt32 GetMaximumFileReleaseHandled()
Return the maximum file release number handled by the writer.
catiav5w::Material::Lighting::m_AmbientColor
Dtk_RGB m_AmbientColor
Definition: catiav5w.hpp:104
catiav5w::WriteOptions::WriteOptions
WriteOptions()
Default constructor.
Definition: catiav5w.hpp:51
DTK_FALSE
#define DTK_FALSE
Definition: define.h:720
catiav5w::FileDescription::GetNumAdditionalProperties
Dtk_Size_t GetNumAdditionalProperties() const
Retrieves the file source type - read only -.
Definition: catiav5w.hpp:407
Dtk_bool
char Dtk_bool
Definition: define.h:717
catiav5w::inBlankedStatus
const Dtk_string const Dtk_transfo const Dtk_bool inBlankedStatus
Definition: catiav5w.hpp:623
catiav5w::Material::Analysis::m_Density
Dtk_Double64 m_Density
Definition: catiav5w.hpp:164
catiav5w::OverrideInstanceColorWithPathID
Dtk_ErrorStatus OverrideInstanceColorWithPathID(const PathID &inInstancePathId, const Dtk_RGB &inInstanceColor)
Override the Color of an instance in a Sub Product.
catiav5w::AddDoubleParameter
Dtk_ErrorStatus AddDoubleParameter(const Dtk_string &inParameterName, const Dtk_Double64 &inValue)
Adds a double paramater.
catiav5w::CreateNode
Dtk_ErrorStatus CreateNode(const NodeType &inNodeType, const Dtk_string &inNodeName=Dtk_string())
Create a node in the Specification Tree.
Dtk_Double64
double Dtk_Double64
Definition: define.h:691
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.
catiav5w::Material::Lighting::GetReflectivityCoefficient
Dtk_Double64 GetReflectivityCoefficient() const
Definition: catiav5w.hpp:158
catiav5w::FileDescription::Unknown
@ Unknown
Definition: catiav5w.hpp:210
catiav5w::FileDescription::_PartDensity
Dtk_Double64 _PartDensity
Definition: catiav5w.hpp:230
catiav5w::FileDescription::SetRevision
void SetRevision(const Dtk_string &inRevision)
Sets the file revision.
Definition: catiav5w.hpp:254
catiav5w::Material::Lighting::SetSpecularData
void SetSpecularData(const Dtk_RGB &inSpecularColor, const Dtk_Double64 inSpecularCoefficient)
Definition: catiav5w.hpp:136
catiav5w::FileDescription::GetRevision
const Dtk_string & GetRevision() const
Retrieves the file revision - read only -.
Definition: catiav5w.hpp:357
dtk_uuid.hpp
catiav5w::PathID
Dtk_tab< Dtk_ID > PathID
Definition: catiav5w.hpp:26
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::SetAsDeprecated
SetAsDeprecated("2024.2", "Use Dtk_ErrorStatus catiav5w::InitPart( const Dtk_string&, const Dtk_string&, Dtk_UUID&, const catiav5w::FileDescription& ) method instead.") Dtk_UUID InitPart(const Dtk_string &inOutputFile
Initialize the part
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
catiav5w::FileDescription::_Definition
Dtk_string _Definition
Definition of the CatiaV5 File.
Definition: catiav5w.hpp:220
catiav5w::NodeTypePartBody
@ NodeTypePartBody
Definition: catiav5w.hpp:431
catiav5w::Material::m_Lighting
Lighting m_Lighting
Definition: catiav5w.hpp:177
catiav5w::FileDescription::m_PartMaterial
Material m_PartMaterial
Definition: catiav5w.hpp:216
catiav5w::Material::Lighting::m_DiffuseColor
Dtk_RGB m_DiffuseColor
Definition: catiav5w.hpp:106
Dtk_Properties::create
static Dtk_PropertiesPtr create()
catiav5w::WriteOptions::~WriteOptions
~WriteOptions()
Destructor.
Definition: catiav5w.hpp:56
util_ent_dtk.hpp
catiav5w::FileDescription::ProductSourceType
ProductSourceType
Definition: catiav5w.hpp:209
Dtk_Int32
int32_t Dtk_Int32
Definition: define.h:679
catiav5w::FileDescription::SetPartMaterial
void SetPartMaterial(const catiav5w::Material &inMaterial)
Sets the file root material.
Definition: catiav5w.hpp:247
catiav5w::EndVirtualComponent
Dtk_ErrorStatus EndVirtualComponent(Dtk_ID &outDocId)
End - and write - the virtual component initialized by catiav5w::InitVirtualComponent.
catiav5w::Material::Analysis::Analysis
Analysis()
Definition: catiav5w.hpp:166
catiav5w::FileDescription::SetSourceType
void SetSourceType(const ProductSourceType &inSourceType)
Sets the file source type.
Definition: catiav5w.hpp:282
error_dtk.hpp
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
catiav5w::Material::Lighting::GetAmbientCoefficient
Dtk_Double64 GetAmbientCoefficient() const
Definition: catiav5w.hpp:154
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.
catiav5w::WriteOptions::AreReferencePlanesWrittenAsHidden
Dtk_bool AreReferencePlanesWrittenAsHidden() const
Tells if the reference planes are written as hidden.
Definition: catiav5w.hpp:76
catiav5w::FileDescription::Bought
@ Bought
Definition: catiav5w.hpp:212
catiav5w::FileDescription::GetPartMaterial
const catiav5w::Material & GetPartMaterial() const
Retrieves the file root material - read only -.
Definition: catiav5w.hpp:349
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
catiav5w::Material::Lighting::SetReflectivityCoefficient
void SetReflectivityCoefficient(const Dtk_Double64 inReflectivityCoefficient)
Definition: catiav5w.hpp:146
catiav5w::FileDescription::_Revision
Dtk_string _Revision
Revision of the CatiaV5 File.
Definition: catiav5w.hpp:218
catiav5w::EndWrite
Dtk_ErrorStatus EndWrite()
Free the Catia V5 Writer
Dtk_UChar8
unsigned char Dtk_UChar8
Definition: define.h:690
catiav5w::AddStringParameter
Dtk_ErrorStatus AddStringParameter(const Dtk_string &inParameterName, const Dtk_string &inValue)
Adds a string paramater.
catiav5w::Material::Lighting::m_DiffuseCoefficient
Dtk_Double64 m_DiffuseCoefficient
Definition: catiav5w.hpp:107
catiav5w::inFileDescription
const Dtk_string const catiav5w::FileDescription & inFileDescription
Definition: catiav5w.hpp:460
catiav5w::NodeType
NodeType
Type of Specification Tree Node used into a CATPart file.
Definition: catiav5w.hpp:428
catiav5w::WriteOptions::SetFileRelease
Dtk_ErrorStatus SetFileRelease(const Dtk_UInt32 inRelease)
Sets the release for the written files.
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.
catiav5w::NodeTypeMechanicalTool
@ NodeTypeMechanicalTool
Definition: catiav5w.hpp:432
catiav5w::Material::Lighting::Lighting
Lighting()
Definition: catiav5w.hpp:115
catiav5w::MaterialId
Dtk_ID MaterialId
Definition: catiav5w.hpp:27
catiav5w::FileDescription::Made
@ Made
Definition: catiav5w.hpp:211
dtk_transfo.hpp
catiav5w::FileDescription::FileDescription
FileDescription()
Default constructor.
Definition: catiav5w.hpp:235
str_def.h
catiav5w::Material::Lighting::m_SpecularColor
Dtk_RGB m_SpecularColor
Definition: catiav5w.hpp:108
util_stl_dtk.hpp
catiav5w::Material::Lighting::m_ReflectivityCoefficient
Dtk_Double64 m_ReflectivityCoefficient
Definition: catiav5w.hpp:113
catiav5w::Material::Lighting::GetSpecularCoefficient
Dtk_Double64 GetSpecularCoefficient() const
Definition: catiav5w.hpp:156
catiav5w::FileDescription::~FileDescription
~FileDescription()
Destructor.
Definition: catiav5w.hpp:241
catiav5w::Material::Lighting::GetDiffuseCoefficient
Dtk_Double64 GetDiffuseCoefficient() const
Definition: catiav5w.hpp:155
catiav5w::NodeTypeUnknown
@ NodeTypeUnknown
Definition: catiav5w.hpp:429
catiav5w::Material::Lighting::GetTransparencyCoefficient
Dtk_Double64 GetTransparencyCoefficient() const
Definition: catiav5w.hpp:157
util_ptr_dtk.hpp
catiav5w::WriteOptions::WriteReferencePlaneAsHidden
void WriteReferencePlaneAsHidden()
Sets the reference plane writting as hidden.
Definition: catiav5w.hpp:62
define.h
catiav5w::Material::Lighting::GetSpecularColor
const Dtk_RGB & GetSpecularColor() const
Definition: catiav5w.hpp:152
catiav5w::Material::Lighting::SetTransparencyData
void SetTransparencyData(const Dtk_RGB &inTransparencyColor, const Dtk_Double64 inTransparencyCoefficient)
Definition: catiav5w.hpp:141
Dtk_tab
This is a high level array class.
Definition: util_stl_dtk.hpp:84
catiav5w::Material::Analysis
Definition: catiav5w.hpp:162
catiav5w::FileDescription::AddStringProperty
void AddStringProperty(const Dtk_string &inPropertyName, const Dtk_string &inValue)
Adds an additional integer property.
Definition: catiav5w.hpp:337
catiav5w::Material::Analysis::SetDensity
void SetDensity(const Dtk_Double64 inDensity)
Definition: catiav5w.hpp:171
catiav5w::CreateProductDocId
Dtk_ErrorStatus CreateProductDocId(const Dtk_string &inPartFileName, const Dtk_string &inPartName, Dtk_ID &outDocId)
Create a Product Reference and DocID related to a given CATProduct.
catiav5w::EndProduct
Dtk_ErrorStatus EndProduct(Dtk_ID &outDocId)
Write effectively the Sub Product initialized by catiav5w::InitProduct.
catiav5w::inInstanceColorAlpha
const Dtk_string const Dtk_transfo const Dtk_bool const Dtk_RGB & inInstanceColorAlpha
Definition: catiav5w.hpp:624
catiav5w::FileDescription::GetNomenclature
const Dtk_string & GetNomenclature() const
Retrieves the file nomenclature - read only -.
Definition: catiav5w.hpp:373
catiav5w::GetWriteHybridBodies
Dtk_bool GetWriteHybridBodies()
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.
catiav5w::Material::Analysis::GetDensity
Dtk_Double64 GetDensity() const
Definition: catiav5w.hpp:172
dtk_string.hpp
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
catiav5w::InitWrite
Dtk_ErrorStatus InitWrite(const Dtk_string &inLogFile, Licence_dtk inLicFct, const WriteOptions &inOptions=WriteOptions())
Initialize the Catia V5 Writer
catiav5w::FileDescription::_AdditionalProperties
Dtk_tab< Dtk_PropertiesPtr > _AdditionalProperties
Definition: catiav5w.hpp:228
catiav5w
Exported APIs for CatiaV5 Write Library.
Definition: catiav5w.hpp:25
catiav5w::inInstanceName
const Dtk_string & inInstanceName
Definition: catiav5w.hpp:621
catiav5w::Material::m_Analysis
Analysis m_Analysis
Definition: catiav5w.hpp:178
dtk_rgb.hpp
catiav5w::WriteOptions::_FileRelease
Dtk_UChar8 _FileRelease
Definition: catiav5w.hpp:48
Dtk_RGB
Definition: dtk_rgb.hpp:7
catiav5w::Material::Lighting::SetAmbientData
void SetAmbientData(const Dtk_RGB &inAmbientColor, const Dtk_Double64 inAmbientCoefficient)
Definition: catiav5w.hpp:126
Licence_dtk
char *(* Licence_dtk)(char *)
Definition: str_def.h:71
catiav5w::FileDescription::SetDescription
void SetDescription(const Dtk_string &inDescription)
Sets the file description.
Definition: catiav5w.hpp:275
catiav5w::OverrideBlankedStatusWithPathID
Dtk_ErrorStatus OverrideBlankedStatusWithPathID(const PathID &inInstancePathId, const Dtk_bool inBlankedStatus)
Override the Blanked Status of an instance in a Sub Product.
catiav5w::Material::m_Name
Dtk_string m_Name
Definition: catiav5w.hpp:176
catiav5w::FileDescription::GetSourceType
const ProductSourceType & GetSourceType() const
Retrieves the file source type - read only -.
Definition: catiav5w.hpp:389
catiav5w::FileDescription::AddDoubleProperty
void AddDoubleProperty(const Dtk_string &inPropertyName, const double &inValue)
Adds an additional double property.
Definition: catiav5w.hpp:298
catiav5w::FileDescription::_Description
Dtk_string _Description
Description of the CatiaV5 File.
Definition: catiav5w.hpp:224
catiav5w::Material::Lighting::m_AmbientCoefficient
Dtk_Double64 m_AmbientCoefficient
Definition: catiav5w.hpp:105
catiav5w::Material::Material
Material(const Dtk_string &inName=L"")
Definition: catiav5w.hpp:181