DATAKIT SDK  V2026.3
IFCWriter.h
Go to the documentation of this file.
1 #ifndef _IFCW_HPP_
2 #define _IFCW_HPP_
3 //! \brief Exported APIs for Ifc (.ifc) Write Library
4 
5 #include <util/util_ent_dtk.hpp>
6 #include <util/util_ptr_dtk.hpp>
7 
12 
13 #include <def/define.h>
14 #include <utility>
15 
16 namespace Ifcw
17 {
18  //! \class WriteOptions
19  //! \brief This class provides several options to tune the IFC Writer.\n
20  //! It must be provided to Ifcw::InitWrite method.
21  //! \code
22  //! //...
23  //! Dtk_string LogFile = L"MyLogFile.log";
24  //! Ifcw::WriteOptions IFCOptions;
25  //! Dtk_ErrorStatus err = Ifcw::InitWrite( LogFile, NULL, IFCOptions);
26  //! //...
27  //! \endcode
29  {
30  protected:
31  public:
32 
33  //! \BaseConstructor
35 
36  //! Int representing IFC version to use : 0 ( default ) = IFC2x3; 1 = IFC4
37  //! default value is 1 (IFC4).
39  //! DTK_TRUE : enable building type recognition (deduces if an element is an IFCWALL, IFCWINDOW...), DTK_FALSE : disable building type recognition
40  //! default value is DTK_TRUE.
42  //! DTK_TRUE : tessellate exact geometry. Such geometry is only exported in version IFC4. DTK_FALSE : export exact geometry as is (only in IFC4).
43  //! default value is DTK_FALSE.
45  };
46 
47  //! \struct ProjectInformation
48  //! \brief This struct enables the user to define global properties regarding the project, construction site and building.\n
49  //! It is used in the Ifcw::InitWrite method.
50  //! \see InitWrite
51  //!
52  //! Here is the detailed mapping of this struct field and IFC data :
53  //! projectPhase <-> IFCPROJECT.Phase
54  //! projectName <-> IFCPROJECT.Name
55  //! projectDetailedName <-> IFCPROJECT.LongName
56  //! siteLatitude <-> IFCSITE.RefLatitude in degree
57  //! siteLongitude <-> IFCSITE.RefLongitude in degree
58  //! siteElevation <-> IFCSITE.RefElevation in meter
59  //! buildingAddress <-> IFCBUILDING.BuildingAddress
60  //! buildingName <-> IFCBUILDING.Name AND IFCBUILDING.LongName
61  //! projectAuthor <-> IFCPERSON.GivenName
62  //! organizationName <-> IFCORGANIZATION.Name
63  //! organizationDescription <-> IFCORGANIZATION.Description
65  {
78  projectPhase(L"Project Phase"),
79  projectName(L"Project Name"),
80  projectDetailedName(L"Project Detailed Name"),
81  buildingAddress(L"Building Address"),
82  buildingName(L"Building Name"),
83  projectAuthor(L"Author"),
84  organizationName(L"Organization name"),
85  organizationDescription(L"Organization description"),
86  siteLatitude(0.),
87  siteLongitude(0.),
88  siteElevation(0.)
89  { };
92  };
93 
94  namespace typing
95  {
96  namespace predefined
97  {
98  //! \enum BuildingElement
99  //! \brief This enum provides commonly used ifc building elements types, to define entities to be written.\n
100  //! \see https://standards.buildingsmart.org/IFC/DEV/IFC4_2/FINAL/HTML/schema/ifcproductextension/lexical/ifcbuildingelement.htm
102  {
122  IfcWindow
123  };
124 
125  //! \enum DistributionElement
126  //! \brief This enum provides commonly used ifc distribution elements types, to define entities to be written.\n
127  //! \see https://standards.buildingsmart.org/IFC/DEV/IFC4_2/FINAL/HTML/schema/ifcproductextension/lexical/ifcdistributionelement.htm
129  {
141  IfcValve
142  };
143  }
144 
145  //! \class IfcCalendarDate
146  //! \brief This class represents an IFC date.\n
147  //! \remark Definition from ISO/CD 10303-41:1992: A date which is defined by a day in a month of a year.
149  {
150  private:
151  Dtk_Char8 day; //!< An int between 1 and 31.
152  Dtk_Char8 month; //!< An int between 1 and 12.
153  Dtk_Int32 year; //!< A positive int.
154  public:
155  //! \BaseConstructor
157  IfcCalendarDate( Dtk_Char8 inDay, Dtk_Char8 inMonth, Dtk_Int32 inYear );
158  friend bool operator==( IfcCalendarDate const& lhs, IfcCalendarDate const& rhs )
159  {
160  return lhs.day == rhs.day && lhs.month == rhs.month && lhs.year == rhs.year;
161  };
162  //! \brief Getter for the date day
163  //! \return The date day
165  {
166  return day;
167  }
168  //! \brief Getter for the date month
169  //! \return The date month
171  {
172  return month;
173  }
174  //! \brief Getter for the date year
175  //! \return The date year
177  {
178  return year;
179  }
180  };
181  }
182 
183  namespace classification
184  {
185  //! \class IfcClassification
186  //! \brief A class that represents a classification system, like UniFormat, Omniclass, SfB...
187  //! \remark Ifc objects are not directly link to IfcClassification in 2x3 and have to be linked to IfcClassificationReference
188  //! \see IfcClassificationReference
189  //! \see https://standards.buildingsmart.org/IFC/DEV/IFC4_3/RC1/HTML/schema/ifcexternalreferenceresource/lexical/ifcclassification.htm
191  {
192  private:
193  typing::IfcCalendarDate editionDate; //!< Classification version date ou publication.
194  Dtk_string source; //!< Where the classification comes from (publisher). Mandatory.
195  Dtk_string edition; //!< Classification version. Mandatory.
196  Dtk_string name; //!< Classifition name, like "UniFormat". Optionnal.
197  public:
198  //! \BaseConstructor
199  //! \remark Should not be used because at classification source and edition are mandatory parameter.
201  //! \brief Constructor taking 3 parameters.
202  //! \param [in] inSource : Classification source.
203  //! \param [in] inEdition : Classification edition.
204  //! \param [in] inName : Classification name.
205  //! \remark name is optionnal.
206  IfcClassification( Dtk_string inSource, Dtk_string inEdition, Dtk_string inName = "" );
207  friend bool operator==( IfcClassification const& lhs, IfcClassification const& rhs )
208  {
209  return lhs.editionDate == rhs.editionDate && lhs.source == rhs.source && lhs.edition == rhs.edition && lhs.name == rhs.name;
210  };
211  //! \brief Getter for the classification edition date
212  //! \return The classification edition date
214  //! \brief Getter for the classification source
215  //! \return The classification source
216  const Dtk_string & GetSource() const;
217  //! \brief Getter for the classification edition
218  //! \return The classification edition
219  const Dtk_string & GetEdition() const;
220  //! \brief Getter for the classification name
221  //! \return The classification name
222  const Dtk_string & GetName() const;
223  //! \brief Setter for the classification name
224  //! \param [in] inName : The classification name to be used
225  void SetName( Dtk_string inName );
226  //! \brief Setter for the classification source
227  //! \param [in] inSource : The classification source to be used
228  void SetSource( Dtk_string inSource );
229  //! \brief Setter for the classification edition
230  //! \param [in] inEdition : The classification edition to be used
231  void SetEdition( Dtk_string inEdition );
232  //! \brief Setter for the classification edition date
233  //! \param [in] inDate : The ifc date to be used
235  //! \brief Setter for the classification edition date
236  //! \param [in] inDay : The day of date to be used
237  //! \param [in] inMonth : The month of date to be used
238  //! \param [in] inYear : The year of date to be used
239  void SetEditionDate( Dtk_Char8 inDay, Dtk_Char8 inMonth, Dtk_Int32 inYear );
240  };
241 
242  //! \class IfcClassificationReference
243  //! \brief This class represent a classification reference to be used for an ifc object, e.g.: B2010 in OmniClass for exterior walls. It is link to a classification.
244  //! \see IfcClassification
245  //! \remark One of its parameter have to be assigned (all optionals).
246  //! \see https://standards.buildingsmart.org/IFC/DEV/IFC4_3/RC1/HTML/schema/ifcexternalreferenceresource/lexical/ifcclassificationreference.htm
247  //! \see https://standards.buildingsmart.org/IFC/DEV/IFC4_3/RC1/HTML/schema/ifcexternalreferenceresource/lexical/ifcexternalreference.htm
249  {
250  private:
251  IfcClassification referencedSource;//!< The classification that is referred.
252  Dtk_string location;//!< Location where the classification can be accessed (URL). Optionnal.
253  Dtk_string itemReference;//!< Item reference provides a unique identifier of the referenced item within the classification. Optionnal.
254  Dtk_string name;//!< Name to further specify the reference. Optionnal.
255 
256  public:
257  //! \BaseConstructor
258  //! \remark One of the parameter should be set, otherwise name will be set to 'Undefined'.
259  IfcClassificationReference( Dtk_string inLocation = "", Dtk_string inItemReference = "", Dtk_string inName = "", IfcClassification inReferencedSource = IfcClassification() );
261  {
262  return lhs.referencedSource == rhs.referencedSource
263  && lhs.location == rhs.location
264  && lhs.itemReference == rhs.itemReference && lhs.name == rhs.name;
265  };
266  //! \brief Getter for the classification the reference is linked to
267  //! \return The classification the reference is linked to
269  //! \brief Getter for the reference location
270  //! \return The reference location
271  const Dtk_string & GetLocation() const;
272  //! \brief Getter for the reference item reference
273  //! \return The reference item reference
274  const Dtk_string & GetItemReference() const;
275  //! \brief Getter for the reference name
276  //! \return The reference name
277  const Dtk_string & GetName() const;
278  //! \brief Setter for the reference location
279  //! \param [in] inLocation : reference location to be used
280  void SetLocation( Dtk_string inLocation );
281  //! \brief Setter for the reference item reference
282  //! \param [in] inItemReference : reference item reference to be used
283  void SetItemReference( Dtk_string inItemReference );
284  //! \brief Setter for the reference name
285  //! \param [in] inName : reference name to be used
286  void SetName( Dtk_string inName );
287  };
288  }
289 
290 
291  //! \class IfcElementType
292  //! \brief A IfcElementType is used to define the common properties of a certain type or style of an entity that may be applied to instances of that entity type.
293  //! \remark Types may be exchanged without being already assigned to occurrences.
294  //! \remark Type shapes are overwritten by occurence shapes. Type properties are added to occurence properties and overwritten for those which have the same filed.
295  //! \see https://standards.buildingsmart.org/IFC/DEV/IFC4_2/FINAL/HTML/schema/ifcproductextension/lexical/ifcelementtype.htm
297  {
298  private :
299  Dtk_tab<Dtk_MetaDataPtr> propertySet; //!< The shared properties of the elements that will be assigned this type. Optional.
300  Dtk_tab<Dtk_EntityPtr> shapeReprensentation; //!< The shared representation shape of the elements that will be assigned this type.
301  Dtk_string subtype; //!< The element subtype of the instances that will be assigned to this type. (e.g. IfcWall, IfcBeam...)
302  Dtk_string predefinedType; //!< Predefined type of the element subtype (e.g. if productSubType = IFCROOF : FLAT_ROOF, SHED_ROOF...). If not set, will be set to "NOTDEFINED". Overrides IfcElement predefined type
303  Dtk_string tag; //!< The tag (or label) identifier at the particular type of a product, e.g. the article number (like the EAN). Optional.
304  Dtk_string name; //!< Name for the defined type. Optional.
305  Dtk_ID ID; //!< Id of the type, to be identified when creating objects of that type.
306 
307  public:
310  //! \brief Getter for type property set
311  //! \return The set of properties assigned to the type
312  const Dtk_tab<Dtk_MetaDataPtr> & GetPropertySet() const { return propertySet; }
313 
314  //! \brief Getter for type property set
315  //! \return The set of properties assigned to the type
316  Dtk_tab<Dtk_MetaDataPtr> & GetPropertySet() { return propertySet; }
317 
318  //! \brief Getter for type shape representation
319  //! \return The entities of the shape reprentation of the type
320  const Dtk_tab<Dtk_EntityPtr> & GetShapeRepresentation() const { return shapeReprensentation; }
321 
322  //! \brief Getter for type tag
323  //! \return The tag of the type
324  const Dtk_string & GetTag() const { return tag; }
325 
326  //! \brief Getter for type name
327  //! \return The name of the type
328  const Dtk_string & GetName() const { return name; }
329 
330  //! \brief Getter for type ID
331  //! \return The ID of the type
332  Dtk_ID GetID() const { return ID; }
333 
334  //! \brief Getter for IfcElementType element subtype.
335  //! \return The Ifc element subtype assigned in the IfcElementType
336  const Dtk_string & GetSubtype() const { return subtype; }
337 
338  //! \brief Getter for IfcElementType predefined type.
339  //! \return The predefined type assigned in the IfcElementType
340  const Dtk_string & GetPredefinedType() const { return predefinedType; }
341 
342  //! \brief Setter for IfcElementType building element type.
343  //! \param [in] inType : The building element type to be assigned in the IfcElementType
344  void SetSubtype( const Dtk_string & inType );
345 
346  //! \brief Setter for IfcElement building element subtype.
347  //! \param [in] inTypeEnum : The building element subtype to be assigned in the IfcElementType
349 
350  //! \brief Setter for IfcElement distribution element subtype.
351  //! \param [in] inTypeEnum : The distribution element subtype to be assigned in the IfcElementType
353 
354  //! \brief Setter for IfcElementType propertySet.
355  //! \param [in] inProperties : The property set to be attached to the IfcElementType
356  //! \param [in] inSetName : The name of the property set (default is "UserDefined")
357  void SetPropertySet( Dtk_tab<Dtk_MetaDataPtr> inProperties, const Dtk_string & inSetName = "" );
358 
359  //! \brief Adds a property to IfcElementType current property set.
360  //! \param [in] inProperty : The property to be added to the property set
361  //! \param [in] inSetName : The name of the property set in which the property belong
362  void AddProperty( Dtk_MetaDataPtr inProperty, const Dtk_string & inSetName = "" );
363 
364  //! \brief Setter for IfcElementType shapeRepresentation (geometry)
365  //! \param [in] inShapes : The entities to be assigned as shape representation (only Dtk_BodyPtr and Dtk_MeshPtr are supported for now)
366  //! \return dtkNoError if the shape representation has been successfully assigned
367  //! \return dtkErrorTypeNotsupported if one of the Dtk_EntityPtr type is not supported. Supported types will still be assigned.
369 
370  //! \brief Adds an entity to IfcElementType shape representation (geometry)
371  //! \param [in] inShape : The entity to add in the shape representation (only Dtk_BodyPtr and Dtk_MeshPtr are supported for now)
372  //! \return dtkNoError if the shape representation has been successfully assigned
373  //! \return dtkErrorTypeNotsupported if one of the Dtk_EntityPtr type is not supported
375 
376  //! \brief Setter for IfcElementType tag
377  //! \param [in] inTag : The tag of the type
378  void SetTag( const Dtk_string & inTag );
379 
380  //! \brief Setter for IfcElementType name
381  //! \param [in] inName : The name of the type
382  void SetName( const Dtk_string & inName );
383 
384  //! \brief Setter for IfcElementType ID
385  //! \param [in] inID : The ID of the type
386  void SetID( const Dtk_ID & inID );
387 
388  //! \brief Setter for IfcElementType predefined type
389  //! \param [in] inType : The predefined type of the IfcElementType
390  void SetPredefinedType( const Dtk_string & inType );
391  };
392 
393  //! \class IfcType
394  //! \brief This class has been renamed IfcElementType.
395  //! \deprecated Use IfcElementType instead.
396  class IfcType
397  {
398  IfcElementType m_oNewClass;
399 
400  public:
401  SetAsDeprecated( "2026.3", "Use IfcElementType instead." )
402  //! \deprecated Use IfcElementType instead.
403  IfcType() : m_oNewClass() {};
404  ~IfcType(){};
405  //! \deprecated Use IfcElementType::GetPropertySet instead.
406  const Dtk_tab<Dtk_MetaDataPtr>& GetPropertySet() const { return m_oNewClass.GetPropertySet(); }
407  //! \deprecated Use IfcElementType::GetShapeRepresentation instead.
408  const Dtk_tab<Dtk_EntityPtr>& GetShapeRepresentation() const { return m_oNewClass.GetShapeRepresentation(); };
409  //! \deprecated Use IfcElementType::GetTag instead.
410  const Dtk_string& GetTag() const { return m_oNewClass.GetTag(); };
411  //! \deprecated Use IfcElementType::GetName instead.
412  const Dtk_string& GetName() const { return m_oNewClass.GetName(); };
413  //! \deprecated Use IfcElementType::GetID instead.
414  Dtk_ID GetID() const { return m_oNewClass.GetID(); };
415  //! \deprecated Use IfcElementType::GetSubtype instead.
416  const Dtk_string& GetBuildingElementType() const { return m_oNewClass.GetSubtype(); };
417  //! \deprecated Use IfcElementType::GetPredefinedType instead.
418  const Dtk_string& GetPredefinedType() const { return m_oNewClass.GetPredefinedType(); };
419  //! \deprecated Use IfcElementType::SetSubtype instead.
420  void SetBuildingElementType( const Dtk_string& inType ) { m_oNewClass.SetSubtype( inType ); };
421  //! \deprecated Use IfcElementType::SetSubtype instead.
422  void SetBuildingElementType( typing::predefined::BuildingElement inTypeEnum ) { m_oNewClass.SetSubtype( inTypeEnum ); };
423  //! \deprecated Use IfcElementType::SetPropertySet instead.
424  void SetPropertySet( Dtk_tab<Dtk_MetaDataPtr> inProperties, const Dtk_string& inSetName = "" ){ m_oNewClass.SetPropertySet( std::move( inProperties ), inSetName ); };
425  //! \deprecated Use IfcElementType::AddProperty instead.
426  void AddProperty( Dtk_MetaDataPtr inProperty, const Dtk_string& inSetName = "" ){ m_oNewClass.AddProperty( inProperty, inSetName ); };
427  //! \deprecated Use IfcElementType::SetShapeRepresentation instead.
428  void SetShape( Dtk_tab< Dtk_EntityPtr > inShapes ){ m_oNewClass.SetShapeRepresentation( std::move( inShapes ) ); };
429  //! \deprecated Use IfcElementType::AddShape instead.
430  void AddShape( Dtk_EntityPtr inShape ){ m_oNewClass.AddShape( inShape ); };
431  //! \deprecated Use IfcElementType::SetTag instead.
432  void SetTag( const Dtk_string& inTag ){ m_oNewClass.SetTag( inTag ); };
433  //! \deprecated Use IfcElementType::SetName instead.
434  void SetName( const Dtk_string& inName ){ m_oNewClass.SetName( inName ); };
435  //! \deprecated Use IfcElementType::SetID instead.
436  void SetID( const Dtk_ID& inID ){ m_oNewClass.SetID( inID ); };
437  //! \deprecated Use IfcElementType::SetPredefinedType instead.
438  void SetPredefinedType( const Dtk_string& inType ){ m_oNewClass.SetPredefinedType( inType ); };
439  };
440 
441  //! \class IfcElement
442  //! \brief This class provides several parameters for the next ifc entity to be written, as its custom property set, level, classification.\n
443  //! It must be provided to Ifcw::InitObject method.
444  //! \remark The propertySet can gather properties from different IfcPropertySet, we'll write as many set as there are different set names
445  //! \see SetPropertySet, AddProperty
446  //! \see https://standards.buildingsmart.org/IFC/DEV/IFC4_2/FINAL/HTML/schema/ifcproductextension/lexical/ifcelement.htm
447  //! \code
448  //! //...
449  //! Dtk_string ifcType = L"IFCWALL";
450  //! Ifcw::IfcElement* entityParams = new IfcElement();
451  //! entityParams->SetIfcType( ifcType );
452  //! Dtk_ErrorStatus err = Ifcw::InitObject( entityParams );
453  //! //...
454  //! \endcode
456  {
457  private:
458  classification::IfcClassificationReference classificationReference; //!< Element reference in classification. Optionnal.
459  Dtk_tab<Dtk_MetaDataPtr> propertySet; //!< Element properties. Set name is determine by Dtk_MetaData category. If different categories are set, different property sets will be written.
460  Dtk_string name; //!< Element name. Default is 'UNDEFINED'
461  Dtk_string subtype; //!< Element subtype, like IFCWALL, IFCCOLUMN... Default is IFCBUILDINGELEMENTPROXY \see typing::predefined::BuildingElement
462  Dtk_string predefinedType; //!< //!< Predefined type of the element subtype (e.g. if productSubType = IFCROOF : FLAT_ROOF, SHED_ROOF...). If not set, will be set to "NOTDEFINED"
463  Dtk_string GUID; //!< Element GUID. If not set a GUID will be generated.
464  Dtk_string level; //!< Building level where the element belongs to. If not set will be placed in the building without level.
465  Dtk_string tag; //!< Tag identifier of the element occurence, e.g. position, serial number.
466  Dtk_transfo instanceTrf; //!< Instance transformation matrice (if the element is instantiated)
467  Dtk_RGB color; //!< Element color. Default is grey.
468  Dtk_ID typeID; //!< Element IfcElementType ID (only if it belongs to a IfcElementType). If type shapes are defined, they will be used as this element representation shapes (if it has no shape entities assigned through further WriteEntity call).
469  public:
470  //! \BaseConstructor
472  //! \brief Getter for IfcElement propertySet
473  //! \return The table of propertySet assigned to the IfcElement
474  const Dtk_tab<Dtk_MetaDataPtr> & GetPropertySet() const { return propertySet; }
475 
476  //! \brief Getter for IfcElementType ID.
477  //! \return The ID of the current object type
478  Dtk_ID GetTypeID() const { return typeID; }
479 
480  //! \brief Getter for IfcElement name.
481  //! \return The name assigned in the IfcElement
482  const Dtk_string & GetName() const { return name; }
483 
484  //! \brief Getter for IfcElement GUID
485  //! \return The GUID assigned in the IfcElement.
486  const Dtk_string & GetGUID() const { return GUID; }
487 
488  //! \brief Getter for IfcElement level
489  //! \return The level assigned in the IfcElement.
490  const Dtk_string & GetLevel() const { return level; }
491 
492  //! \brief Getter for IfcElement tag
493  //! \return The tag assigned in the IfcElement.
494  const Dtk_string & GetTag() const { return tag; }
495 
496  //! \brief Getter for IfcElement subtype.
497  //! \return The element subtype assigned in the IfcElement
498  const Dtk_string & GetSubtype() const { return subtype; }
499 
500  //! \brief Getter for IfcElement predefined type.
501  //! \return The building element predefined type assigned in the IfcElement
502  const Dtk_string & GetPredefinedType() const { return predefinedType; }
503 
504  //! \brief Getter for IfcElement color.
505  //! \return The color assigned in the IfcElement
506  Dtk_RGB GetColor() const { return color; }
507 
508  //! \brief Getter for IfcElement instance transformation matrice.
509  //! \return The instance transformation matrice assigned in the IfcElement
510  const Dtk_transfo & GetInstanceTrf() const { return instanceTrf; }
511 
512  //! \brief Getter for classification reference
513  //! \return The classification reference assigned in the IfcElement
514  const classification::IfcClassificationReference & GetClassificationReference() const { return classificationReference; }
515 
516  //! \brief Setter for IfcElement propertySet.
517  //! \param [in] inProperties : The property set to be attached to the IfcElement
518  //! \param [in] inSetName : The name of the property set (default is "UserDefined")
519  void SetPropertySet( Dtk_tab<Dtk_MetaDataPtr> inProperties, const Dtk_string & inSetName = "" );
520  //! \brief Adds a property to IfcElement current property set.
521  //! \param [in] inProperty : The property to be added to the property set
522  //! \param [in] inSetName : The name of the property set in which the property belong
523  void AddProperty( Dtk_MetaDataPtr inProperty, Dtk_string inSetName = "" );
524  //! \brief Setter for IfcElement name.
525  //! \param [in] inName : The name to be assigned in the IfcElement
526  void SetName( Dtk_string inName );
527  //! \brief Setter for IfcElement IfcElementType ID.
528  //! \param [in] inID : The type ID to be assigned in the IfcElement
529  void SetTypeID( const Dtk_ID & inID );
530  //! \brief Setter for IfcElement GUID.
531  //! \param [in] inGUID : The GUID to be assigned in the IfcElement
532  void SetGUID( Dtk_string inGUID );
533  //! \brief Setter for IfcElement level.
534  //! \param [in] inLevel : The level to be assigned in the IfcElement
535  void SetLevel( Dtk_string inLevel );
536  //! \brief Setter for IfcElement tag.
537  //! \param [in] inTag : The tag to be assigned in the IfcElement
538  void SetTag( Dtk_string inTag );
539  //! \brief Setter for IfcElement subtype.
540  //! \param [in] inType : The element subtype to be assigned in the IfcElement
541  void SetSubtype( Dtk_string inType );
542  //! \brief Setter for IfcElement subtype.
543  //! \param [in] inEnum : The building element subtype to be assigned in the IfcElement
545  //! \brief Setter for IfcElement subtype.
546  //! \param [in] inEnum : The distribution element subtype to be assigned in the IfcElement
548  //! \brief Setter for IfcElement predefined type.
549  //! \param [in] inType : The building element predefined type to be assigned in the IfcElement
550  void SetPredefinedType( const Dtk_string & inType );
551  //! \brief Setter for IfcElement color.
552  //! \param [in] inColor : The color to be assigned in the IfcElement
553  void SetColor( const Dtk_RGB & inColor );
554  //! \brief Setter for IfcElement instance transformation matrice.
555  //! \param [in] inTrf : The instance transformation matrice to be assigned in the IfcElement
556  void SetInstanceTrf( const Dtk_transfo & inTrf );
557  //! \brief Setter for IfcElement classification reference
558  //! \param [in] inClassificationRef : The classification reference to be assigned in the IfcElement
560  };
561 
562  //! \class IfcBuildingElement
563  //! \brief This class has been renamed IfcElement.
564  //! \deprecated Use IfcElement instead.
566  {
567  IfcElement m_oNewClass;
568  public:
569  //! \deprecated Use IfcElement instead.
570  SetAsDeprecated( "2026.3", "Use IfcElement instead." )
571  IfcBuildingElement() : m_oNewClass() {};
572 
573  //! \deprecated Use IfcElement::GetPropertySet instead.
574  const Dtk_tab<Dtk_MetaDataPtr>& GetPropertySet() const { return m_oNewClass.GetPropertySet(); }
575 
576  //! \deprecated Use IfcElement::GetTypeID instead.
577  Dtk_ID GetTypeID() const { return m_oNewClass.GetTypeID(); }
578  //! \deprecated Use IfcElement::GetName instead.
579  const Dtk_string& GetName() const
580  {
581  return m_oNewClass.GetName();
582  }
583  //! \deprecated Use IfcElement::GetGUID instead.
584  const Dtk_string& GetGUID() const
585  {
586  return m_oNewClass.GetGUID();
587  }
588  //! \deprecated Use IfcElement::GetLevel instead.
589  const Dtk_string& GetLevel() const
590  {
591  return m_oNewClass.GetLevel();
592  }
593  //! \deprecated Use IfcElement::GetTag instead.
594  const Dtk_string& GetTag() const
595  {
596  return m_oNewClass.GetTag();
597  }
598 
599  //! \deprecated Use IfcElement::GetSubtype instead.
600  const Dtk_string& GetSubtype() const
601  {
602  return m_oNewClass.GetSubtype();
603  }
604  //! \deprecated Use IfcElement::GetPredefinedType instead.
606  {
607  return m_oNewClass.GetPredefinedType();
608  }
609  //! \deprecated Use IfcElement::GetColor instead.
610  Dtk_RGB GetColor() const { return m_oNewClass.GetColor(); }
611  //! \deprecated Use IfcElement::GetInstanceTrf instead.
612  const Dtk_transfo& GetInstanceTrf() const { return m_oNewClass.GetInstanceTrf(); }
613 
614  //! \deprecated Use IfcElement::GetClassificationReference instead.
616  //! \deprecated Use IfcElement::SetPropertySet instead.
617  void SetPropertySet( Dtk_tab<Dtk_MetaDataPtr> inProperties, const Dtk_string& inSetName = "" ){ m_oNewClass.SetPropertySet( std::move( inProperties ), inSetName ); }; ;
618  //! \deprecated Use IfcElement::AddProperty instead.
619  void AddProperty( Dtk_MetaDataPtr inProperty, Dtk_string inSetName = "" ) { m_oNewClass.AddProperty( inProperty, inSetName ); };
620  //! \deprecated Use IfcElement::SetName instead.
621  void SetName( Dtk_string inName ) { m_oNewClass.SetName( inName ); };
622  //! \deprecated Use IfcElement::SetTypeID instead.
623  void SetTypeID( const Dtk_ID& inID ) { m_oNewClass.SetTypeID( inID ); };
624  //! \deprecated Use IfcElement::SetGUID instead.
625  void SetGUID( Dtk_string inGUID ) { m_oNewClass.SetGUID( inGUID ); };
626  //! \deprecated Use IfcElement::SetLevel instead.
627  void SetLevel( Dtk_string inLevel ) { m_oNewClass.SetLevel( inLevel ); };
628  //! \deprecated Use IfcElement::SetTag instead.
629  void SetTag( Dtk_string inTag ) { m_oNewClass.SetTag( inTag ); };
630  //! \deprecated Use IfcElement::SetSubtype instead.
631  void SetBuildingElementType( Dtk_string inType ) { m_oNewClass.SetSubtype( inType ); };
632  //! \deprecated Use IfcElement::SetSubtype instead.
633  void SetBuildingElementType( typing::predefined::BuildingElement inTypeEnum ){ m_oNewClass.SetSubtype( inTypeEnum ); };
634  //! \deprecated Use IfcElement::SetPredefinedType instead.
635  void SetPredefinedType( const Dtk_string& inType ) { m_oNewClass.SetPredefinedType( inType ); };
636  //! \deprecated Use IfcElement::SetColor instead.
637  void SetColor( const Dtk_RGB& inColor ) { m_oNewClass.SetColor( inColor ); };
638  //! \deprecated Use IfcElement::SetInstanceTrf instead.
639  void SetInstanceTrf( const Dtk_transfo& inTrf ) { m_oNewClass.SetInstanceTrf( inTrf ); };
640  //! \deprecated Use IfcElement::SetClassificationReference instead.
641  void SetClassificationReference( classification::IfcClassificationReference inClassificationRef ) { m_oNewClass.SetClassificationReference( inClassificationRef ); };
642  };
643 
644  //! \brief Initialize the Ifc Writer and the IFC version you want to write
645  //! \return dtkNoError if it is OK.
646  //! \param [in] inOutputFile : Output file name
647  //! \param [in] inLogFile : Log file
648  //! \param [in] inOptions : options to tune the IFC Writer
649  //! \remark This function is the first call for the writer, it must me called after Dtk_API::StartAPI(...)
650  //! \see WriteOptions
651  DtkErrorStatus InitWrite(const Dtk_string& inOutputFile, const Dtk_string& inLogFile, const WriteOptions& inOptions, ProjectInformation* inProjectInfo = nullptr);
652 
653  //! \brief Creation of the output file and free the Ifc Writer
654  //! \return dtkNoError if it is OK.
655  //! \remark used as the last function used for the writer.
657 
658  //! \brief Initialize an ifcobject with various information.
659  //! \param [in] inParameters : The parameters you want for the object to be written (see IfcElement class)
660  //! \return dtkNoError if it is OK.
661  //! \remark To close the current object you will need to call EndObject() function .
663  //! \deprecated Use InitObject( IfcElement inParameters ) instead.
665 
666  //! \brief Ends the current object
667  //! \return dtkNoError if it is OK.
669 
670  //! \brief Write the entity provided in parameter. The entity corresponds to current object geometry (e.g: a Dtk_MeshPtr())
671  //! \param [in] inEntity : The Entity to be written
672  //! \param [in] inMat : The matrice that needs to be applied before the writing
673  //! \return dtkNoError if it is OK.
674  //! \remark This function is used to write entities (only Dtk_MeshPtr ).
675  Dtk_ErrorStatus WriteEntity(const Dtk_EntityPtr& inEntity, const Dtk_transfo & inMat = Dtk_transfo());
676 
677  //! \brief Write the type provided in parameter. The type can exists by itself without having entities related to it.
678  //! \param [in] inType : The ifcType to be written
679  //! \return dtkNoError if it is OK.
680  //! \remark Should be used before WriteEntity if the entity to be written uses the current ifcType.
682  //! \deprecated Use WriteType( const IfcElementType& inType ) instead.
684 
685 }// namespace Ifcw
686 
687 #endif
Ifcw::IfcType::GetPropertySet
const Dtk_tab< Dtk_MetaDataPtr > & GetPropertySet() const
Definition: IFCWriter.h:406
Ifcw::classification::IfcClassificationReference::SetLocation
void SetLocation(Dtk_string inLocation)
Setter for the reference location.
Ifcw::IfcType::SetPredefinedType
void SetPredefinedType(const Dtk_string &inType)
Definition: IFCWriter.h:438
Ifcw::typing::IfcCalendarDate::IfcCalendarDate
IfcCalendarDate(Dtk_Char8 inDay, Dtk_Char8 inMonth, Dtk_Int32 inYear)
Ifcw::IfcType::GetName
const Dtk_string & GetName() const
Definition: IFCWriter.h:412
Dtk_ID
uint32_t Dtk_ID
Definition: define.h:688
Dtk_transfo
This is the Transformation dedicated class.
Definition: dtk_transfo.hpp:19
Ifcw::classification::IfcClassification::SetSource
void SetSource(Dtk_string inSource)
Setter for the classification source.
Ifcw::IfcElementType::SetPredefinedType
void SetPredefinedType(const Dtk_string &inType)
Setter for IfcElementType predefined type.
Ifcw::typing::predefined::IfcPipeSegment
@ IfcPipeSegment
Definition: IFCWriter.h:140
Ifcw::IfcElement::SetGUID
void SetGUID(Dtk_string inGUID)
Setter for IfcElement GUID.
Ifcw::ProjectInformation::buildingName
Dtk_string buildingName
Definition: IFCWriter.h:70
Ifcw::WriteEntity
Dtk_ErrorStatus WriteEntity(const Dtk_EntityPtr &inEntity, const Dtk_transfo &inMat=Dtk_transfo())
Write the entity provided in parameter. The entity corresponds to current object geometry (e....
Ifcw::IfcElement::SetPropertySet
void SetPropertySet(Dtk_tab< Dtk_MetaDataPtr > inProperties, const Dtk_string &inSetName="")
Setter for IfcElement propertySet.
Ifcw::IfcType::SetBuildingElementType
void SetBuildingElementType(typing::predefined::BuildingElement inTypeEnum)
Definition: IFCWriter.h:422
Ifcw::typing::predefined::IfcFooting
@ IfcFooting
Definition: IFCWriter.h:110
Ifcw::IfcElement::SetLevel
void SetLevel(Dtk_string inLevel)
Setter for IfcElement level.
Ifcw::IfcType::SetBuildingElementType
void SetBuildingElementType(const Dtk_string &inType)
Definition: IFCWriter.h:420
Ifcw::classification::IfcClassification::GetName
const Dtk_string & GetName() const
Getter for the classification name.
Ifcw::IfcBuildingElement::GetTag
const Dtk_string & GetTag() const
Definition: IFCWriter.h:594
Ifcw::IfcElement::GetGUID
const Dtk_string & GetGUID() const
Getter for IfcElement GUID.
Definition: IFCWriter.h:486
Ifcw::IfcBuildingElement::SetInstanceTrf
void SetInstanceTrf(const Dtk_transfo &inTrf)
Definition: IFCWriter.h:639
Ifcw::classification::IfcClassification::IfcClassification
IfcClassification(Dtk_string inSource, Dtk_string inEdition, Dtk_string inName="")
Constructor taking 3 parameters.
Ifcw::IfcType::~IfcType
~IfcType()
Definition: IFCWriter.h:404
Ifcw::typing::predefined::IfcLightFixture
@ IfcLightFixture
Definition: IFCWriter.h:138
Ifcw::typing::predefined::IfcChimney
@ IfcChimney
Definition: IFCWriter.h:105
Ifcw::IfcElement::AddProperty
void AddProperty(Dtk_MetaDataPtr inProperty, Dtk_string inSetName="")
Adds a property to IfcElement current property set.
Ifcw::IfcType
This class has been renamed IfcElementType.
Definition: IFCWriter.h:397
Ifcw::IfcElementType::GetShapeRepresentation
const Dtk_tab< Dtk_EntityPtr > & GetShapeRepresentation() const
Getter for type shape representation.
Definition: IFCWriter.h:320
Ifcw::typing::predefined::IfcSlab
@ IfcSlab
Definition: IFCWriter.h:118
Ifcw::IfcBuildingElement::SetPredefinedType
void SetPredefinedType(const Dtk_string &inType)
Definition: IFCWriter.h:635
Ifcw::IfcType::GetTag
const Dtk_string & GetTag() const
Definition: IFCWriter.h:410
Ifcw::classification::IfcClassificationReference::operator==
friend bool operator==(IfcClassificationReference const &lhs, IfcClassificationReference const &rhs)
Definition: IFCWriter.h:260
Ifcw::IfcBuildingElement::GetName
const Dtk_string & GetName() const
Definition: IFCWriter.h:579
Ifcw::IfcElementType::~IfcElementType
~IfcElementType()
Definition: IFCWriter.h:309
Ifcw::ProjectInformation::buildingAddress
Dtk_string buildingAddress
Definition: IFCWriter.h:69
Ifcw::ProjectInformation::siteElevation
Dtk_Double64 siteElevation
Definition: IFCWriter.h:76
Ifcw::ProjectInformation::operator=
ProjectInformation & operator=(ProjectInformation &&p)
Ifcw::InitWrite
DtkErrorStatus InitWrite(const Dtk_string &inOutputFile, const Dtk_string &inLogFile, const WriteOptions &inOptions, ProjectInformation *inProjectInfo=nullptr)
Initialize the Ifc Writer and the IFC version you want to write
Ifcw::typing::predefined::IfcDuctFitting
@ IfcDuctFitting
Definition: IFCWriter.h:135
Ifcw::IfcElement::SetColor
void SetColor(const Dtk_RGB &inColor)
Setter for IfcElement color.
Ifcw::IfcBuildingElement::SetPropertySet
void SetPropertySet(Dtk_tab< Dtk_MetaDataPtr > inProperties, const Dtk_string &inSetName="")
Definition: IFCWriter.h:617
Ifcw::WriteOptions::versionIndicator
int versionIndicator
Definition: IFCWriter.h:38
Ifcw::IfcElementType::SetID
void SetID(const Dtk_ID &inID)
Setter for IfcElementType ID.
DTK_TRUE
#define DTK_TRUE
Definition: define.h:726
Ifcw::IfcBuildingElement::GetClassificationReference
const classification::IfcClassificationReference & GetClassificationReference() const
Definition: IFCWriter.h:615
Ifcw::ProjectInformation::projectPhase
Dtk_string projectPhase
Definition: IFCWriter.h:66
Ifcw::WriteOptions::buildingTypeRecognition
Dtk_bool buildingTypeRecognition
Definition: IFCWriter.h:41
Ifcw::IfcBuildingElement::GetPredefinedType
const Dtk_string & GetPredefinedType() const
Definition: IFCWriter.h:605
Ifcw::IfcElement
This class provides several parameters for the next ifc entity to be written, as its custom property ...
Definition: IFCWriter.h:456
Ifcw::IfcElement::SetTag
void SetTag(Dtk_string inTag)
Setter for IfcElement tag.
Ifcw::typing::predefined::IfcShadingDevice
@ IfcShadingDevice
Definition: IFCWriter.h:117
Ifcw::classification::IfcClassificationReference::GetItemReference
const Dtk_string & GetItemReference() const
Getter for the reference item reference.
Ifcw::IfcBuildingElement::SetBuildingElementType
void SetBuildingElementType(Dtk_string inType)
Definition: IFCWriter.h:631
Ifcw::InitObject
DtkErrorStatus InitObject(IfcElement inParameters)
Initialize an ifcobject with various information.
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:53
Ifcw::typing::predefined::IfcDistributionChamberElement
@ IfcDistributionChamberElement
Definition: IFCWriter.h:134
Ifcw::IfcBuildingElement::GetColor
Dtk_RGB GetColor() const
Definition: IFCWriter.h:610
Ifcw::IfcElementType::SetSubtype
void SetSubtype(typing::predefined::BuildingElement inTypeEnum)
Setter for IfcElement building element subtype.
Ifcw::classification::IfcClassificationReference::SetItemReference
void SetItemReference(Dtk_string inItemReference)
Setter for the reference item reference.
Ifcw::IfcElementType::SetPropertySet
void SetPropertySet(Dtk_tab< Dtk_MetaDataPtr > inProperties, const Dtk_string &inSetName="")
Setter for IfcElementType propertySet.
Ifcw::typing::predefined::IfcValve
@ IfcValve
Definition: IFCWriter.h:141
Ifcw::IfcElement::GetColor
Dtk_RGB GetColor() const
Getter for IfcElement color.
Definition: IFCWriter.h:506
Ifcw::ProjectInformation::projectAuthor
Dtk_string projectAuthor
Definition: IFCWriter.h:71
Ifcw::IfcBuildingElement::SetTag
void SetTag(Dtk_string inTag)
Definition: IFCWriter.h:629
dtk_metadata.hpp
Ifcw::IfcType::SetTag
void SetTag(const Dtk_string &inTag)
Definition: IFCWriter.h:432
Ifcw::classification::IfcClassification::SetEditionDate
void SetEditionDate(Dtk_Char8 inDay, Dtk_Char8 inMonth, Dtk_Int32 inYear)
Setter for the classification edition date.
DTK_FALSE
#define DTK_FALSE
Definition: define.h:727
Ifcw::typing::predefined::IfcDoor
@ IfcDoor
Definition: IFCWriter.h:109
Dtk_bool
char Dtk_bool
Definition: define.h:724
Ifcw::IfcElement::GetTag
const Dtk_string & GetTag() const
Getter for IfcElement tag.
Definition: IFCWriter.h:494
Ifcw::typing::IfcCalendarDate::GetDay
Dtk_Char8 GetDay() const
Getter for the date day.
Definition: IFCWriter.h:164
Ifcw::typing::predefined::IfcRampFlight
@ IfcRampFlight
Definition: IFCWriter.h:115
Ifcw::IfcElement::SetSubtype
void SetSubtype(Dtk_string inType)
Setter for IfcElement subtype.
Ifcw::typing::IfcCalendarDate::GetYear
Dtk_Int32 GetYear() const
Getter for the date year.
Definition: IFCWriter.h:176
Ifcw::typing::predefined::IfcWall
@ IfcWall
Definition: IFCWriter.h:121
Dtk_Double64
double Dtk_Double64
Definition: define.h:698
Ifcw::IfcBuildingElement::SetLevel
void SetLevel(Dtk_string inLevel)
Definition: IFCWriter.h:627
Ifcw::typing::predefined::IfcRoof
@ IfcRoof
Definition: IFCWriter.h:116
Ifcw::IfcElementType::GetSubtype
const Dtk_string & GetSubtype() const
Getter for IfcElementType element subtype.
Definition: IFCWriter.h:336
Ifcw::typing::predefined::IfcRailing
@ IfcRailing
Definition: IFCWriter.h:113
Ifcw::IfcBuildingElement::SetBuildingElementType
void SetBuildingElementType(typing::predefined::BuildingElement inTypeEnum)
Definition: IFCWriter.h:633
Ifcw::EndObject
DtkErrorStatus EndObject()
Ends the current object.
Ifcw::IfcType::AddShape
void AddShape(Dtk_EntityPtr inShape)
Definition: IFCWriter.h:430
Ifcw::classification::IfcClassificationReference::GetReferencedSource
const IfcClassification & GetReferencedSource() const
Getter for the classification the reference is linked to.
Ifcw::IfcBuildingElement::SetAsDeprecated
SetAsDeprecated("2026.3", "Use IfcElement instead.") IfcBuildingElement()
Definition: IFCWriter.h:570
Ifcw::classification::IfcClassificationReference::GetLocation
const Dtk_string & GetLocation() const
Getter for the reference location.
Ifcw::IfcBuildingElement::SetClassificationReference
void SetClassificationReference(classification::IfcClassificationReference inClassificationRef)
Definition: IFCWriter.h:641
Ifcw::IfcType::GetBuildingElementType
const Dtk_string & GetBuildingElementType() const
Definition: IFCWriter.h:416
Ifcw::IfcType::GetShapeRepresentation
const Dtk_tab< Dtk_EntityPtr > & GetShapeRepresentation() const
Definition: IFCWriter.h:408
Ifcw::IfcElementType::SetSubtype
void SetSubtype(const Dtk_string &inType)
Setter for IfcElementType building element type.
Ifcw::typing::predefined::IfcPlate
@ IfcPlate
Definition: IFCWriter.h:112
Ifcw::IfcElement::SetPredefinedType
void SetPredefinedType(const Dtk_string &inType)
Setter for IfcElement predefined type.
Ifcw::IfcBuildingElement::SetName
void SetName(Dtk_string inName)
Definition: IFCWriter.h:621
Ifcw::IfcElementType::AddProperty
void AddProperty(Dtk_MetaDataPtr inProperty, const Dtk_string &inSetName="")
Adds a property to IfcElementType current property set.
Ifcw::IfcBuildingElement::GetSubtype
const Dtk_string & GetSubtype() const
Definition: IFCWriter.h:600
Ifcw::IfcElement::IfcElement
IfcElement()
Default constructor.
Ifcw::IfcElementType::SetTag
void SetTag(const Dtk_string &inTag)
Setter for IfcElementType tag.
Ifcw::IfcElementType
A IfcElementType is used to define the common properties of a certain type or style of an entity that...
Definition: IFCWriter.h:297
Ifcw::IfcBuildingElement::AddProperty
void AddProperty(Dtk_MetaDataPtr inProperty, Dtk_string inSetName="")
Definition: IFCWriter.h:619
Ifcw::ProjectInformation::organizationName
Dtk_string organizationName
Definition: IFCWriter.h:72
Ifcw::typing::IfcCalendarDate::IfcCalendarDate
IfcCalendarDate()
Default constructor.
Ifcw::typing::predefined::IfcAlarm
@ IfcAlarm
Definition: IFCWriter.h:131
Ifcw::IfcElementType::GetPredefinedType
const Dtk_string & GetPredefinedType() const
Getter for IfcElementType predefined type.
Definition: IFCWriter.h:340
Ifcw::typing::predefined::IfcBuildingElementProxy
@ IfcBuildingElementProxy
Definition: IFCWriter.h:104
Ifcw::typing::predefined::IfcFireSuppressionTerminal
@ IfcFireSuppressionTerminal
Definition: IFCWriter.h:137
Ifcw::classification::IfcClassificationReference::IfcClassificationReference
IfcClassificationReference(Dtk_string inLocation="", Dtk_string inItemReference="", Dtk_string inName="", IfcClassification inReferencedSource=IfcClassification())
Default constructor.
Ifcw::typing::predefined::IfcMember
@ IfcMember
Definition: IFCWriter.h:111
Ifcw::IfcElement::SetTypeID
void SetTypeID(const Dtk_ID &inID)
Setter for IfcElement IfcElementType ID.
Ifcw::IfcType::SetPropertySet
void SetPropertySet(Dtk_tab< Dtk_MetaDataPtr > inProperties, const Dtk_string &inSetName="")
Definition: IFCWriter.h:424
Ifcw::ProjectInformation::siteLatitude
Dtk_Double64 siteLatitude
Definition: IFCWriter.h:74
util_ent_dtk.hpp
Dtk_Int32
int32_t Dtk_Int32
Definition: define.h:686
Ifcw::IfcElement::GetSubtype
const Dtk_string & GetSubtype() const
Getter for IfcElement subtype.
Definition: IFCWriter.h:498
Ifcw::IfcElement::GetLevel
const Dtk_string & GetLevel() const
Getter for IfcElement level.
Definition: IFCWriter.h:490
Ifcw::classification::IfcClassification::SetName
void SetName(Dtk_string inName)
Setter for the classification name.
Ifcw::typing::predefined::IfcDuctSegment
@ IfcDuctSegment
Definition: IFCWriter.h:136
Ifcw::IfcElement::GetInstanceTrf
const Dtk_transfo & GetInstanceTrf() const
Getter for IfcElement instance transformation matrice.
Definition: IFCWriter.h:510
Ifcw::IfcBuildingElement::GetLevel
const Dtk_string & GetLevel() const
Definition: IFCWriter.h:589
Ifcw::typing::predefined::IfcCurtainWall
@ IfcCurtainWall
Definition: IFCWriter.h:108
Dtk_Char8
char Dtk_Char8
Definition: define.h:696
Ifcw::WriteOptions
This class provides several options to tune the IFC Writer. It must be provided to Ifcw::InitWrite me...
Definition: IFCWriter.h:29
Ifcw::IfcBuildingElement::SetGUID
void SetGUID(Dtk_string inGUID)
Definition: IFCWriter.h:625
Ifcw::IfcElementType::IfcElementType
IfcElementType()
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
Ifcw::IfcElementType::GetID
Dtk_ID GetID() const
Getter for type ID.
Definition: IFCWriter.h:332
Ifcw::IfcElement::SetClassificationReference
void SetClassificationReference(classification::IfcClassificationReference inClassificationRef)
Setter for IfcElement classification reference.
Ifcw::EndWrite
DtkErrorStatus EndWrite()
Creation of the output file and free the Ifc Writer
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
Ifcw::IfcType::SetID
void SetID(const Dtk_ID &inID)
Definition: IFCWriter.h:436
Ifcw::ProjectInformation::siteLongitude
Dtk_Double64 siteLongitude
Definition: IFCWriter.h:75
Ifcw::ProjectInformation::~ProjectInformation
~ProjectInformation()
Definition: IFCWriter.h:90
Ifcw::IfcBuildingElement::SetColor
void SetColor(const Dtk_RGB &inColor)
Definition: IFCWriter.h:637
Ifcw::typing::predefined::IfcStairFlight
@ IfcStairFlight
Definition: IFCWriter.h:120
Ifcw::IfcType::AddProperty
void AddProperty(Dtk_MetaDataPtr inProperty, const Dtk_string &inSetName="")
Definition: IFCWriter.h:426
Ifcw::IfcElementType::GetPropertySet
Dtk_tab< Dtk_MetaDataPtr > & GetPropertySet()
Getter for type property set.
Definition: IFCWriter.h:316
Ifcw::IfcElementType::SetShapeRepresentation
DtkErrorStatus SetShapeRepresentation(Dtk_tab< Dtk_EntityPtr > const &inShapes)
Setter for IfcElementType shapeRepresentation (geometry)
Ifcw::typing::predefined::IfcWindow
@ IfcWindow
Definition: IFCWriter.h:122
dtk_transfo.hpp
Ifcw::classification::IfcClassification::operator==
friend bool operator==(IfcClassification const &lhs, IfcClassification const &rhs)
Definition: IFCWriter.h:207
Ifcw::typing::predefined::IfcPipeFitting
@ IfcPipeFitting
Definition: IFCWriter.h:139
Ifcw::IfcType::SetShape
void SetShape(Dtk_tab< Dtk_EntityPtr > inShapes)
Definition: IFCWriter.h:428
Ifcw::IfcType::GetPredefinedType
const Dtk_string & GetPredefinedType() const
Definition: IFCWriter.h:418
Ifcw::IfcElement::SetName
void SetName(Dtk_string inName)
Setter for IfcElement name.
Ifcw::ProjectInformation::organizationDescription
Dtk_string organizationDescription
Definition: IFCWriter.h:73
Ifcw::IfcElement::GetName
const Dtk_string & GetName() const
Getter for IfcElement name.
Definition: IFCWriter.h:482
util_ptr_dtk.hpp
Ifcw::IfcElement::SetSubtype
void SetSubtype(typing::predefined::BuildingElement inEnum)
Setter for IfcElement subtype.
Ifcw::WriteOptions::WriteOptions
WriteOptions()
Default constructor.
Definition: IFCWriter.h:34
define.h
Ifcw::IfcElement::GetTypeID
Dtk_ID GetTypeID() const
Getter for IfcElementType ID.
Definition: IFCWriter.h:478
Ifcw::IfcBuildingElement::GetTypeID
Dtk_ID GetTypeID() const
Definition: IFCWriter.h:577
Ifcw::typing::predefined::IfcColumn
@ IfcColumn
Definition: IFCWriter.h:106
Ifcw::typing::IfcCalendarDate
This class represents an IFC date. .
Definition: IFCWriter.h:149
Dtk_tab
This is a high level array class.
Definition: util_stl_dtk.hpp:84
Ifcw::classification::IfcClassificationReference::SetName
void SetName(Dtk_string inName)
Setter for the reference name.
Ifcw::classification::IfcClassificationReference
This class represent a classification reference to be used for an ifc object, e.g....
Definition: IFCWriter.h:249
Ifcw::classification::IfcClassification::GetEditionDate
const typing::IfcCalendarDate & GetEditionDate() const
Getter for the classification edition date.
Ifcw::classification::IfcClassificationReference::GetName
const Dtk_string & GetName() const
Getter for the reference name.
Ifcw::typing::predefined::IfcBeam
@ IfcBeam
Definition: IFCWriter.h:103
Ifcw::IfcElement::GetPredefinedType
const Dtk_string & GetPredefinedType() const
Getter for IfcElement predefined type.
Definition: IFCWriter.h:502
Ifcw::ProjectInformation
This struct enables the user to define global properties regarding the project, construction site and...
Definition: IFCWriter.h:65
Ifcw::IfcBuildingElement::SetTypeID
void SetTypeID(const Dtk_ID &inID)
Definition: IFCWriter.h:623
Ifcw::IfcElementType::AddShape
DtkErrorStatus AddShape(Dtk_EntityPtr inShape)
Adds an entity to IfcElementType shape representation (geometry)
Ifcw::IfcType::SetAsDeprecated
SetAsDeprecated("2026.3", "Use IfcElementType instead.") IfcType()
Definition: IFCWriter.h:401
Ifcw::IfcElement::SetSubtype
void SetSubtype(typing::predefined::DistributionElement inEnum)
Setter for IfcElement subtype.
Ifcw::IfcElementType::GetTag
const Dtk_string & GetTag() const
Getter for type tag.
Definition: IFCWriter.h:324
Ifcw::typing::predefined::IfcStair
@ IfcStair
Definition: IFCWriter.h:119
Ifcw::IfcBuildingElement::GetGUID
const Dtk_string & GetGUID() const
Definition: IFCWriter.h:584
Ifcw::IfcBuildingElement::GetInstanceTrf
const Dtk_transfo & GetInstanceTrf() const
Definition: IFCWriter.h:612
Ifcw::IfcType::GetID
Dtk_ID GetID() const
Definition: IFCWriter.h:414
dtk_string.hpp
Ifcw::typing::IfcCalendarDate::GetMonth
Dtk_Char8 GetMonth() const
Getter for the date month.
Definition: IFCWriter.h:170
Ifcw::ProjectInformation::projectName
Dtk_string projectName
Definition: IFCWriter.h:67
Ifcw::IfcBuildingElement::GetPropertySet
const Dtk_tab< Dtk_MetaDataPtr > & GetPropertySet() const
Definition: IFCWriter.h:574
Ifcw::ProjectInformation::ProjectInformation
ProjectInformation()
Definition: IFCWriter.h:77
Ifcw
Exported APIs for Ifc (.ifc) Write Library.
Definition: IFCWriter.h:17
Ifcw::typing::predefined::BuildingElement
BuildingElement
This enum provides commonly used ifc building elements types, to define entities to be written....
Definition: IFCWriter.h:102
Ifcw::IfcBuildingElement
This class has been renamed IfcElement.
Definition: IFCWriter.h:566
Ifcw::IfcElement::SetInstanceTrf
void SetInstanceTrf(const Dtk_transfo &inTrf)
Setter for IfcElement instance transformation matrice.
Ifcw::IfcElementType::SetName
void SetName(const Dtk_string &inName)
Setter for IfcElementType name.
Ifcw::classification::IfcClassification
A class that represents a classification system, like UniFormat, Omniclass, SfB...
Definition: IFCWriter.h:191
Ifcw::typing::predefined::IfcCableCarrierSegment
@ IfcCableCarrierSegment
Definition: IFCWriter.h:133
Ifcw::IfcElementType::GetPropertySet
const Dtk_tab< Dtk_MetaDataPtr > & GetPropertySet() const
Getter for type property set.
Definition: IFCWriter.h:312
Ifcw::typing::predefined::IfcRamp
@ IfcRamp
Definition: IFCWriter.h:114
Ifcw::WriteOptions::tessellateExactGeometry
Dtk_bool tessellateExactGeometry
Definition: IFCWriter.h:44
dtk_rgb.hpp
Dtk_RGB
Definition: dtk_rgb.hpp:7
Ifcw::typing::IfcCalendarDate::operator==
friend bool operator==(IfcCalendarDate const &lhs, IfcCalendarDate const &rhs)
Definition: IFCWriter.h:158
Ifcw::IfcElementType::SetSubtype
void SetSubtype(typing::predefined::DistributionElement inTypeEnum)
Setter for IfcElement distribution element subtype.
Ifcw::WriteType
Dtk_ErrorStatus WriteType(const IfcElementType &inType)
Write the type provided in parameter. The type can exists by itself without having entities related t...
Ifcw::IfcElement::GetPropertySet
const Dtk_tab< Dtk_MetaDataPtr > & GetPropertySet() const
Getter for IfcElement propertySet.
Definition: IFCWriter.h:474
Ifcw::typing::predefined::DistributionElement
DistributionElement
This enum provides commonly used ifc distribution elements types, to define entities to be written....
Definition: IFCWriter.h:129
Ifcw::classification::IfcClassification::SetEditionDate
void SetEditionDate(typing::IfcCalendarDate inDate)
Setter for the classification edition date.
Ifcw::ProjectInformation::projectDetailedName
Dtk_string projectDetailedName
Definition: IFCWriter.h:68
Ifcw::classification::IfcClassification::GetEdition
const Dtk_string & GetEdition() const
Getter for the classification edition.
Ifcw::IfcType::SetName
void SetName(const Dtk_string &inName)
Definition: IFCWriter.h:434
Ifcw::classification::IfcClassification::IfcClassification
IfcClassification()
Default constructor.
Ifcw::IfcElement::GetClassificationReference
const classification::IfcClassificationReference & GetClassificationReference() const
Getter for classification reference.
Definition: IFCWriter.h:514
Ifcw::IfcElementType::GetName
const Dtk_string & GetName() const
Getter for type name.
Definition: IFCWriter.h:328
Ifcw::classification::IfcClassification::SetEdition
void SetEdition(Dtk_string inEdition)
Setter for the classification edition.
Ifcw::typing::predefined::IfcCableCarrierFitting
@ IfcCableCarrierFitting
Definition: IFCWriter.h:132
Ifcw::classification::IfcClassification::GetSource
const Dtk_string & GetSource() const
Getter for the classification source.
Ifcw::typing::predefined::IfcAirTerminal
@ IfcAirTerminal
Definition: IFCWriter.h:130
Ifcw::typing::predefined::IfcCovering
@ IfcCovering
Definition: IFCWriter.h:107