/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance"). // All rights reserved. // // This software and its documentation and related materials are owned by // the Alliance. The software may only be incorporated into application // programs owned by members of the Alliance, subject to a signed // Membership Agreement and Supplemental Software License Agreement with the // Alliance. The structure and organization of this software are the valuable // trade secrets of the Alliance and its suppliers. The software is also // protected by copyright law and international treaty provisions. Application // programs incorporating this software must include the following statement // with their copyright notices: // // This application incorporates Open Design Alliance software pursuant to a license // agreement with Open Design Alliance. // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance. // All rights reserved. // // By use of this software, its documentation or related materials, you // acknowledge and accept the above terms. /////////////////////////////////////////////////////////////////////////////// // IfcExporter.h: interface for the OdIfcExporter class. // ////////////////////////////////////////////////////////////////////// #ifndef _NV2IFC_EXPORTER_H_INCLUDED_ #define _NV2IFC_EXPORTER_H_INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "Nv2IfcExport.h" #include "IfcHostAppServices.h" #include "IfcExportProperties.h" #include "IfcFile.h" #define STL_USING_MAP #include "OdaSTL.h" class OdGiDrawable; class OdNwModelItem; class OdIfcEntityCreator; class OdNwProperty; class OdNwCategory; class OdNwAttribute; class OdNwMaterialAttribute; class OdNwComponent; typedef OdSmartPtr OdNwPropertyPtr; typedef OdSmartPtr OdNwModelItemPtr; typedef OdSmartPtr OdNwCategoryPtr; typedef OdSmartPtr OdNwAttributePtr; typedef OdSmartPtr< OdNwMaterialAttribute> OdNwMaterialAttributePtr; typedef OdSmartPtr OdNwComponentPtr; namespace NV_IFC_EXPORT { class OdIfcExporter : public OdIfcExport { std::map m_surfaceStylesMap; std::map m_facetedBreps; std::map m_dictionary; OdArray m_entityTypes; OdIfcExportPropertiesPtr _properties; OdIfcModelPtr m_pModel; OdIfcFilePtr m_pIfcFile; OdDAIObjectId m_subContextId; OdDAIObjectId m_ownerHistoryId; OdGeVector3d m_modelScale; bool m_useFacilityPart; public: ODRX_DECLARE_MEMBERS(OdIfcExporter); OdIfcExporter(); virtual ExportResult doExport() ODRX_OVERRIDE; virtual OdRxDictionaryPtr properties() ODRX_OVERRIDE; virtual OdResult writeIfcFile(const OdString& fileName) ODRX_OVERRIDE; virtual OdResult setDictionary(const std::map& dictionary); private: OdResult initIfcFile(OdIfcFilePtr pDb, OdIfcEntityCreator& creator); ExportResult exportGeometry(OdIfcEntityCreator& creator); OdResult initHeaderSection(OdIfcFilePtr pDb); OdResult getproxyBuildingElementsByRoot(OdIfcEntityCreator& creator, OdNwModelItemPtr pRoot, OdDAIObjectIds& proxyElements, OdDAIObjectId& localPlacement); OdResult exportMaterial(const OdNwObjectId& materialId, const OdDAIObjectId& shapeId); OdResult exportPropertySet(const OdDAIObjectId& elemProxy, OdArray& attributes); OdResult exportPropertyAttribute(const OdDAIObjectId& elemProxy, OdNwAttributePtr pAttribute, OdString& guid); OdResult exportMaterialAttribute(const OdDAIObjectId& elemProxy, OdNwMaterialAttributePtr pAttribute); OdResult exportPublisher(OdIfcFilePtr pDb); OdDbStub* exportFragmentedGeometry(OdIfcEntityCreator& creator, OdNwComponentPtr pComp, const OdString& displayClassName); OdDbStub* exportSingleGeometry(OdIfcEntityCreator& creator, OdNwComponentPtr pComp, const OdString& displayClassName); OdDbStub* exportGeometryByVerteces(const OdNwObjectId& geometryId, OdIfcEntityCreator& creator); OdDbStub* exportTransformationMatrix(OdIfcEntityCreator& creator, const OdGeMatrix3d& matrix); OdDbStub* exportUnitMeasurementFirstModel(OdIfcEntityCreator& creator); protected: class ScaleKeeper { OdGeVector3d& m_scaleVector; public: ScaleKeeper(OdGeVector3d& scaleVector) : m_scaleVector(scaleVector) {} ~ScaleKeeper() { m_scaleVector = OdGeVector3d::kIdentity; } }; }; } #endif // _NV2IFC_EXPORTER_H_INCLUDED_