/////////////////////////////////////////////////////////////////////////////// // 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. /////////////////////////////////////////////////////////////////////////////// #ifndef _IFC_MODEL_OPS_FILLER_H #define _IFC_MODEL_OPS_FILLER_H #include "IfcCore.h" #include "IfcModel.h" #include "IfcFile.h" #include "IfcModelFiller.h" #include "IfcModelOpsHelper.h" #include "TD_PackPush.h" /** \details Subclass of OdIfcModelFiller that provides extended set of model entities creation operations (building elements, relationships, material and style processing). */ class IFCCORE_EXPORT IfcModelOpsFiller : public OdIfcModelFiller { public: /** \details Default constructor for the IfcModelOpsFiller class. \param pModel [in] Pointer to an IFC model. */ IfcModelOpsFiller(OdIfcModel *pModel); /** \details Destructor of the IfcModelOpsFiller class. */ ~IfcModelOpsFiller(); /** details Fills an empty model with predefined set of entities, including geometrical contexts and subcontexts, project, site and building. \param pDb [in] OdSmartPtr pointer to previously created OdIfcFile. */ void prepareModel(OdIfcFilePtr pDb); /** \details Appends new IfcRelContainedInSpatialstructure relationship for selected entities within a model in OdIfcFile. \param pDb [in] OdSmartPtr pointer to previously created OdIfcFile. \param pEnt [in] OdSmartPtr to related entity. \param pTargetEntity [in] OdSmartPtr of relating entity to provide type of previously created target entity in the OdIfcFile model. */ void appendToSpatial(OdIfcFilePtr pDb, OdDAI::ApplicationInstancePtr pEnt, OdDAI::ApplicationInstancePtr pTargetEntity); /** \details Appends new IfcRelAggregates relationship for selected entities within a model in OdIfcFile. \param pDb [in] OdSmartPtr pointer to previously created OdIfcFile. \param pEnt [in] OdSmartPtr to related entity. \param pTargetEntity [in] OdSmartPtr of relating entity to provide type of previously created target entity in the OdIfcFile model. */ void appendToRelAggregates(OdIfcFilePtr pDb, OdDAI::ApplicationInstancePtr pEnt, OdDAI::ApplicationInstancePtr pTargetEntity); /** \details Appends new IfcBuilding entity to the model. \param name [in] OdString to determine building element proxy name. \param compositionType [in] OdAnsiString to determine building composition type. \param localPlacementId [in] OdDAIObjectId of entity placement. \returns A pointer to the created and appended to the model entity. */ OdIfc::OdIfcInstancePtr createBuilding(const OdString& name, const OdAnsiString& compositionType, const OdDAIObjectId localPlacementId); /** \details Appends new IfcBuildingStorey entity to the model. \param name [in] OdString to determine building element proxy name. \param compositionType [in] OdAnsiString to determine building storey composition type. \param localPlacementId [in] OdDAIObjectId of entity placement. \returns A pointer to the created and appended to the model entity. */ OdIfc::OdIfcInstancePtr createBuildingStorey(const OdString & name, const OdAnsiString& compositionType, const OdDAIObjectId localPlacementId); /** \details Appends new IfcSpace entity to the model. \param compositionType [in] OdAnsiString to determine building storey composition type. \param localPlacementId [in] OdDAIObjectId of entity placement. \returns A pointer to the created and appended to the model entity. */ OdIfc::OdIfcInstancePtr createSpace(const OdAnsiString& compositionType, const OdDAIObjectId localPlacementId); /** \details Appends new IfcBuildingElementProxy entity to the model. \param name [in] OdString to determine building element proxy name. \param objectPlacement [in] OdDAIObjectId of entity placement. \param representation [in] OdDAIObjectId of entity representation. \returns A pointer to the created and appended to the model entity. */ OdIfc::OdIfcInstancePtr createBuildingElementProxy(const OdString & name, const OdDAIObjectId & objectPlacement, const OdDAIObjectId & representation); /** \details Appends new IfcBuildingElementPart entity to the model. \param name [in] OdAnsiString to determine building element part name. \param objectPlacement [in] OdDAIObjectId of entity placement. \param representation [in] OdDAIObjectId of entity representation. \returns A pointer to the created and appended to the model entity. */ OdIfc::OdIfcInstancePtr createBuildingElementPart(const OdString & name, const OdDAIObjectId & objectPlacement, const OdDAIObjectId & representation); /** \details Appends new IfcBuildingElement subclass entity to the model. \param entityType [in] OdAnsiString to determine building element IFC type name. \param name [in] OdAnsiString to determine building element name. \param objectPlacement [in] OdDAIObjectId of entity placement. \param representation [in] OdDAIObjectId of entity representation. \returns A pointer to the created and appended to the model entity. */ OdIfc::OdIfcInstancePtr createBuildingElement(const OdAnsiString & entityType, const OdString & name, const OdDAIObjectId & objectPlacement, const OdDAIObjectId & representation); /** \details Appends new IfcBuildingElementType subclass entity to the model to define specific product information, that is common to all occurrences of that product type. \param type [in] OdAnsiString to determine building element type IFC name. \param name [in] OdAnsiString to determine building element type name. \param hasPropertySets [in] OdDAIObjectId collection of entity building element type commonly shared property sets. \param predefinedType [in] OdAnsiString name of predefined type. \returns A pointer to the created and appended to the model entity. */ OdIfc::OdIfcInstancePtr createEntityType(const OdAnsiString & type, const OdString & name, const OdDAIObjectIds & hasPropertySets, const OdAnsiString & predefinedType); /** \details Appends new IfcRelationship subclass entity to the model. \param type [in] OdAnsiString to determine IfcRelationship subclass type IFC name. \param name [in] OdAnsiString to determine IfcRelationship subclass entity name. \returns A pointer to the created and appended to the model entity. */ OdIfc::OdIfcInstancePtr createRelElement(const OdAnsiString & type, const OdString& name); /** \details Appends new IfcTypeProduct subclass entity to the model to define specific product information, that is common to all occurrences of that product type. \param type [in] OdAnsiString to determine IfcTypeProduct subclass type name. \param name [in] OdAnsiString to determine IfcTypeProduct subclass entity type name. \param hasPropertySets [in] OdDAIObjectId collection of entity building element type commonly shared property sets. \param representationMaps [in] OdDAIObjectId collection of representation maps. \returns A pointer to the created and appended to the model entity. */ OdIfc::OdIfcInstancePtr createEntityStyle(const OdAnsiString& type, const OdString& name, const OdDAIObjectIds &hasPropertySets, const OdDAIObjectIds &representationMaps); /** \details Appends new IfcPropertySetDefinition subclass entity to the model. \param propName [in] OdAnsiString to determine IfcPropertySetDefinition subclass type name. \returns A pointer to the created and appended to the model entity. */ OdIfc::OdIfcInstancePtr createEntityLiningProperties(const OdAnsiString & propName); /** \details Appends new IfcPropertySetDefinition subclass entity to the model. \param entName [in] OdAnsiString to determine IfcPropertySetDefinition subclass type name. \returns A pointer to the created and appended to the model entity. */ OdIfc::OdIfcInstancePtr createEntityPanelProperties(const OdAnsiString& entName); /** \details Appends new IfcRoof entity to the model. \param name [in] OdAnsiString to determine entity name. \param ifcObjectPlacementId [in] OdDAIObjectId of entity placement. \param shapeType [in] OdAnsiString to determine shape type. \returns A pointer to the created and appended to the model entity. */ OdIfc::OdIfcInstancePtr createRoof(const OdString& name, const OdDAIObjectId& ifcObjectPlacementId, const OdAnsiString& shapeType); /** \details Appends new IfcCartesianTransformationOperator3DnonUniform entity to the model. \param logicalLength [in] double to determine transformation value. \param originPt [in] OdGePoint3d of transformation. \returns A pointer to the created and appended to the model entity. */ OdIfc::OdIfcInstancePtr createCartesianTransformationOperator3DnonUniform(const double & logicalLength, const OdGePoint3d originPt); /** \details Appends new IfcCartesianTransformationOperator3D entity to the model. \returns A pointer to the created and appended to the model entity. */ OdIfc::OdIfcInstancePtr createCartesianTransformationOperator3D(); /** \details Appends new IfcCartesianTransformationOperator3DnonUniform entity to the model. \param axis1 [in] pointer to OdGeVector3d to determine x axis direction. \param axis2 [in] pointer to OdGeVector3d to determine y axis direction. \param axis3 [in] pointer to OdGeVector3d to determine z axis direction. \param scale [in] pointer to double to determine the x axis scale factor. \param scale2 [in] pointer to double to determine y axis scale factor. \param scale3 [in] pointer to double to determine z axis scale factor. \param localOrigin [in] OdGePoint3d local origin of transformation. \returns A pointer to the created and appended to the model entity. */ OdIfc::OdIfcInstancePtr createCartesianTransformationOperator3DnonUniform(const OdGeVector3d * axis1, const OdGeVector3d * axis2, const OdGePoint3d * localOrigin, const double * scale, const OdGeVector3d * axis3, const double * scale2, const double * scale3); /** \details Returns existing building OdDAIObjectId. \returns Building OdDAIObjectId previously appended to the model. */ OdDAIObjectId getBuilding(); /** \details Returns existing building placement OdDAIObjectId. \returns Building placement OdDAIObjectId from the model storage. */ OdDAIObjectId getBuildingPlacement(); /** \details Returns IfcModelOpsFiller subclass to process materials. \returns pointer to IfcModelMaterialFiller instance. */ std::shared_ptr getMaterialFiller(); /** \details Retrieves IfcModelOpsFiller subclass to process geometry. \returns pointer to IfcModelGeometryFiller instance. */ std::shared_ptr getGeometryFiller(); /** \details Returns IfcModelOpsFiller subclass to process styles. \returns pointer to IfcModelStyleFiller instance. */ std::shared_ptr getStyleFiller(); protected: std::shared_ptr m_materialFiller; std::shared_ptr m_geometryFiller; std::shared_ptr m_styleFiller; std::map m_geometricRepresentationContext; OdDAIObjectId m_building; OdDAIObjectId m_buildingPlacement; }; #include "TD_PackPop.h" #endif // _IFC_MODEL_OPS_FILLER_H