CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
OdIfc::ModelOps Namespace Reference

Classes

class  IfcModelProcessor
 

Enumerations

enum class  MergeLevel { Storey , Building , Site }
 

Functions

OdResult IFCCORE_EXPORT removeRepresentationFrom (const OdDAIObjectId &product)
 
OdResult IFCCORE_EXPORT removePlacementFrom (const OdDAIObjectId &product)
 
OdResult IFCCORE_EXPORT removeFromSpatialStructure (const OdDAIObjectId &productToRemove)
 
OdResult IFCCORE_EXPORT removeFromRelAggregates (const OdDAIObjectId &ifcSpatialStructureElement)
 
OdDAIObjectId IFCCORE_EXPORT cloneProductRepresentation (const OdDAIObjectId &product)
 
OdDAIObjectId cloneIfcProduct (const OdDAIObjectId &productToClone)
 
OdDAIObjectId IFCCORE_EXPORT cloneWithRelAggregates (const OdDAIObjectId &ifcSpatialStructureElement)
 
OdDAIObjectId IFCCORE_EXPORT cloneWithSpatialStructure (const OdDAIObjectId &productToClone, bool toExistingSpatialStructure=false)
 
OdDAIObjectId cloneContainedInSpatialStructure (const OdDAIObjectId &sourceProduct, const OdDAIObjectId &targetProduct, const OdDAI::ModelPtr targetModel=OdDAI::ModelPtr())
 
OdDAIObjectId cloneContainedInRelAggregate (const OdDAIObjectId &sourceProduct, const OdDAIObjectId &targetProduct, const OdDAI::ModelPtr targetModel=OdDAI::ModelPtr())
 
OdDAIObjectId cloneProduct (const OdDAIObjectId &sourceProduct, const OdDAI::ModelPtr targetModel=OdDAI::ModelPtr())
 
OdDAIObjectId cloneProductShallow (const OdDAIObjectId &sourceProduct, const OdDAI::ModelPtr targetModel=OdDAI::ModelPtr())
 
void prepareContext (const OdDAI::ModelPtr sourceModel, const OdDAI::ModelPtr targetModel, const OdDAI::ModelOps::ModelCtxPtr ctx)
 
void prepareUnits (const OdDAI::ModelPtr sourceModel, const OdDAI::ModelPtr targetModel, const OdDAI::ModelOps::ModelCtxPtr ctx)
 
void IFCCORE_EXPORT preparePathsSpatial (const OdDAIObjectId &targetProduct, const OdDAI::ModelOps::ModelCtxPtr ctx)
 
void IFCCORE_EXPORT preparePathsAggregates (const OdDAIObjectId &targetProduct, const OdDAI::ModelOps::ModelCtxPtr ctx)
 
void IFCCORE_EXPORT preparePaths (const OdDAIObjectId &targetProduct, const OdDAI::ModelOps::ModelCtxPtr ctx)
 
OdDAIObjectId IFCCORE_EXPORT ifcCloneTo (const OdDAIObjectId &sourceProduct, const OdDAIObjectId &targetProduct, const OdDAI::ModelPtr targetModel=OdDAI::ModelPtr())
 
OdDAIObjectId IFCCORE_EXPORT ifcClone (const OdDAIObjectId &sourceProduct, const OdDAI::ModelPtr targetModel=OdDAI::ModelPtr())
 
OdDAIObjectId IFCCORE_EXPORT ifcCombineModels (const OdDAI::ModelPtr sourceModel, const OdDAI::ModelPtr targetModel, MergeLevel level=MergeLevel::Building)
 
void IFCCORE_EXPORT extractUnits (const OdDAI::ModelPtr model, const OdAnsiStringArray &unitTypes, std::map< OdAnsiString, OdAnsiString > &unitPrefixes)
 

Detailed Description

Contains declarations to provide high-level operations with IFC model content.

Enumeration Type Documentation

◆ MergeLevel

enum class OdIfc::ModelOps::MergeLevel
strong

Level of entities merging for the <exref target="https://docs.opendesign.com/tifc_api_cpp/OdIfc__ModelOps__ifcCombineModels@const_OdDAI__ModelPtr@const_OdDAI__ModelPtr@MergeLevel.html>ModelOps::ifcCombineModels()</exref> function.

Enumerator
Storey 

Merge on the store level.

Building 

Merge on the building level.

Site 

Merge on the site level.

Definition at line 191 of file IfcModelOps.h.

Function Documentation

◆ cloneContainedInRelAggregate()

OdDAIObjectId OdIfc::ModelOps::cloneContainedInRelAggregate ( const OdDAIObjectId & sourceProduct,
const OdDAIObjectId & targetProduct,
const OdDAI::ModelPtr targetModel = OdDAI::ModelPtr() )

Clones an IFC entity of IfcBuildingElement type and its nested content to the model.

Parameters
sourceProduct[in] An <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the entity (the STEP ID is stored in the <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdDbHandle.html">OdDbHandle</exref>). @param targetProduct [in] An <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the target entity.
targetModel[in] A smart pointer to the <<exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAI__Model.html>Model</exref> model> that is the target for processed entities. \returns The <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the cloned entity or the <<exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId__kNullHandle.html>kNullHandle</exref> kNullHandle> value otherwise.

◆ cloneContainedInSpatialStructure()

OdDAIObjectId OdIfc::ModelOps::cloneContainedInSpatialStructure ( const OdDAIObjectId & sourceProduct,
const OdDAIObjectId & targetProduct,
const OdDAI::ModelPtr targetModel = OdDAI::ModelPtr() )

Clones an IFC entity of IfcSpatialStructureElement type and its nested content to the model.

Parameters
sourceProduct[in] An <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the entity (the STEP ID is stored in the <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdDbHandle.html">OdDbHandle</exref>). @param targetProduct [in] An <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the target entity.
targetModel[in] A smart pointer to the <<exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAI__Model.html>Model</exref> model> that is the target for processed entities. \returns The <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the cloned entity or the <<exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId__kNullHandle.html>kNullHandle</exref> kNullHandle> value otherwise.

◆ cloneIfcProduct()

OdDAIObjectId OdIfc::ModelOps::cloneIfcProduct ( const OdDAIObjectId & productToClone)

Clones an IFC product within the same model.

Parameters
productToClone[in] An <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the entity (the STEP ID is stored in the <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdDbHandle.html">OdDbHandle</exref>). \returns The <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the cloned entity or the source entity identifier otherwise.

◆ cloneProduct()

OdDAIObjectId OdIfc::ModelOps::cloneProduct ( const OdDAIObjectId & sourceProduct,
const OdDAI::ModelPtr targetModel = OdDAI::ModelPtr() )

Clones an IFC entity of IfcProfuct subtype and its nested content to the model.

Parameters
sourceProduct[in] An <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the entity (the STEP ID is stored in the <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdDbHandle.html">OdDbHandle</exref>). @param targetModel [in] A smart pointer to the <<exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAI__Model.html>Model</exref> model> that is the target for processed entities.
Returns
The <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the cloned entity or the <<exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId__kNullHandle.html>kNullHandle</exref> kNullHandle> value otherwise.

◆ cloneProductRepresentation()

OdDAIObjectId IFCCORE_EXPORT OdIfc::ModelOps::cloneProductRepresentation ( const OdDAIObjectId & product)

Clones an IFC entity shape representation to the model.

Parameters
product[in] An <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the entity (the STEP ID is stored in the <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdDbHandle.html">OdDbHandle</exref>). \returns The <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the cloned entity or the source entity identifier otherwise.

◆ cloneProductShallow()

OdDAIObjectId OdIfc::ModelOps::cloneProductShallow ( const OdDAIObjectId & sourceProduct,
const OdDAI::ModelPtr targetModel = OdDAI::ModelPtr() )

Clones an IFC entity of IfcProfuct subtype without nested content (any decompose relationship) to the model.

Parameters
sourceProduct[in] An <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the entity (the STEP ID is stored in the <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdDbHandle.html">OdDbHandle</exref>). @param targetModel [in] A smart pointer to the <<exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAI__Model.html>Model</exref> model> that is the target for processed entities.
Returns
The <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the cloned entity or the <<exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId__kNullHandle.html>kNullHandle</exref> kNullHandle> value otherwise.

◆ cloneWithRelAggregates()

OdDAIObjectId IFCCORE_EXPORT OdIfc::ModelOps::cloneWithRelAggregates ( const OdDAIObjectId & ifcSpatialStructureElement)

Clones an IFC entity of IfcSpatialStructureElement type and its nested content to the model.

Parameters
ifcSpatialStructureElement[in] An <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the entity (the STEP ID is stored in the <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdDbHandle.html">OdDbHandle</exref>). \returns The <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the cloned entity or the source entity identifier otherwise.

◆ cloneWithSpatialStructure()

OdDAIObjectId IFCCORE_EXPORT OdIfc::ModelOps::cloneWithSpatialStructure ( const OdDAIObjectId & productToClone,
bool toExistingSpatialStructure = false )

Clones an IFC entity of IfcBuildingElement type and its nested content to the model.

Parameters
productToClone[in] An <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the entity (the STEP ID is stored in the <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdDbHandle.html">OdDbHandle</exref>). @param toExistingSpatialStructure [in] A value of the flag that defines whether the cloned entity is appended to the existing structure (true) or is cloned with its structure (false). \returns The <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the cloned entity or the source entity identifier otherwise.

◆ extractUnits()

void IFCCORE_EXPORT OdIfc::ModelOps::extractUnits ( const OdDAI::ModelPtr model,
const OdAnsiStringArray & unitTypes,
std::map< OdAnsiString, OdAnsiString > & unitPrefixes )

Extracts units from a specified <<exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAI__Model.html>Model</exref> model>. @param model [in] A smart pointer to the <<exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAI__Model.html>Model</exref> model> that contains units to be extracted.

Parameters
unitTypes[in] An array that contains types of extracted units.
unitPrefixes[out] An STL map that contains prefixes of extracted units according their types.

◆ ifcClone()

OdDAIObjectId IFCCORE_EXPORT OdIfc::ModelOps::ifcClone ( const OdDAIObjectId & sourceProduct,
const OdDAI::ModelPtr targetModel = OdDAI::ModelPtr() )

Clones IFC entity of IfcProduct subtype and its nested content to the model.

Parameters
sourceProduct[in] An <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the entity (the STEP ID is stored in the <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdDbHandle.html">OdDbHandle</exref>). @param targetModel [in] A smart pointer to the <<exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAI__Model.html>Model</exref> model> that is the target for processed entities.
Returns
The <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the cloned entity or the <<exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId__kNullHandle.html>kNullHandle</exref> kNullHandle> value otherwise.

◆ ifcCloneTo()

OdDAIObjectId IFCCORE_EXPORT OdIfc::ModelOps::ifcCloneTo ( const OdDAIObjectId & sourceProduct,
const OdDAIObjectId & targetProduct,
const OdDAI::ModelPtr targetModel = OdDAI::ModelPtr() )

Clones an IFC entity of IfcProduct subtype and its nested content to the model.

Parameters
sourceProduct[in] An <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the entity (the STEP ID is stored in the <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdDbHandle.html">OdDbHandle</exref>). @param targetProduct [in] An <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the target entity.
targetModel[in] A smart pointer to the <<exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAI__Model.html>Model</exref> model> that is the target for processed entities. \returns The <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the cloned entity or the <<exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId__kNullHandle.html>kNullHandle</exref> kNullHandle> value otherwise.

◆ ifcCombineModels()

OdDAIObjectId IFCCORE_EXPORT OdIfc::ModelOps::ifcCombineModels ( const OdDAI::ModelPtr sourceModel,
const OdDAI::ModelPtr targetModel,
MergeLevel level = MergeLevel::Building )

Merges the content of two IFC models with a specified merge level.

Parameters
sourceModel[in] A smart pointer to the source <<exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAI__Model.html>Model</exref> model> that contains entities to be extracted. @param targetModel [in] A smart pointer to the <<exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAI__Model.html>Model</exref> model> that is the target for processed entities.
level[in] The <exref target="https://docs.opendesign.com/tifc_api_cpp/OdIfc__ModelOps__MergeLevel.html">merging level</exref> value.
Returns
The <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the target entity that contains merged content, or the <<exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId__kNullHandle.html>kNullHandle</exref> kNullHandle> value otherwise.

◆ prepareContext()

void OdIfc::ModelOps::prepareContext ( const OdDAI::ModelPtr sourceModel,
const OdDAI::ModelPtr targetModel,
const OdDAI::ModelOps::ModelCtxPtr ctx )

Extracts IFC geometric context items to make other model IFC entities valid.

Parameters
sourceModel[in] A smart pointer to the <<exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAI__Model.html>Model</exref> model> that is the source of data. @param targetModel [in] A smart pointer to the <<exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAI__Model.html>Model</exref> model> that is the target for processed entities.
ctx[in] A smart pointer to the <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAI__ModelOps__ModelOpCtx.html">model context</exref> that represents shared data for entities processing.

◆ preparePaths()

void IFCCORE_EXPORT OdIfc::ModelOps::preparePaths ( const OdDAIObjectId & targetProduct,
const OdDAI::ModelOps::ModelCtxPtr ctx )

Fills OdDAI::ModelOps inner structures for processing target entity without decompose relationships of its nested content.

Parameters
targetProduct[in] Object id of the target entity.
ctx[in] A smart pointer to the <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAI__ModelOps__ModelOpCtx.html">model context</exref> that represents shared data for entities processing.

◆ preparePathsAggregates()

void IFCCORE_EXPORT OdIfc::ModelOps::preparePathsAggregates ( const OdDAIObjectId & targetProduct,
const OdDAI::ModelOps::ModelCtxPtr ctx )

Fills OdDAI::ModelOps inner structures for processing target entity that belongs to IfcRelAggregates and its nested content to the model.

Parameters
targetProduct[in] Object id of the target entity.
ctx[in] A smart pointer to the <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAI__ModelOps__ModelOpCtx.html">model context</exref> that represents shared data for entities processing.

◆ preparePathsSpatial()

void IFCCORE_EXPORT OdIfc::ModelOps::preparePathsSpatial ( const OdDAIObjectId & targetProduct,
const OdDAI::ModelOps::ModelCtxPtr ctx )

Fills OdDAI::ModelOps inner structures for processing target entity that belongs to IfcRelContainedInSpatialStructure.

Parameters
targetProduct[in] Object id of the target entity.
ctx[in] A smart pointer to the <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAI__ModelOps__ModelOpCtx.html">model context</exref> that represents shared data for entities processing.

◆ prepareUnits()

void OdIfc::ModelOps::prepareUnits ( const OdDAI::ModelPtr sourceModel,
const OdDAI::ModelPtr targetModel,
const OdDAI::ModelOps::ModelCtxPtr ctx )

Creates units conversion calculation between 2 models according to target values and modifies context properties.

Parameters
sourceModel[in] A smart pointer to the <<exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAI__Model.html>Model</exref> model> that is the source of data. @param targetModel [in] A smart pointer to the <<exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAI__Model.html>Model</exref> model> that is the target for processed entities.
ctx[in] A smart pointer to the <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAI__ModelOps__ModelOpCtx.html">model context</exref> that represents shared data for entities processing.

◆ removeFromRelAggregates()

OdResult IFCCORE_EXPORT OdIfc::ModelOps::removeFromRelAggregates ( const OdDAIObjectId & ifcSpatialStructureElement)

Removes an IFC entity of IfcSpatialStructureElement type and its nested content from the model.

Parameters
ifcSpatialStructureElement[in] An <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the entity (the STEP ID is stored in the <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdDbHandle.html">OdDbHandle</exref>).
Returns
eOk if the operation has been finished successfully, or an appropriate error code otherwise.

◆ removeFromSpatialStructure()

OdResult IFCCORE_EXPORT OdIfc::ModelOps::removeFromSpatialStructure ( const OdDAIObjectId & productToRemove)

Removes an IFC entity of IfcBuildingElement type and its nested content from the model.

Parameters
productToRemove[in] An <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the entity (the STEP ID is stored in the <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdDbHandle.html">OdDbHandle</exref>).
Returns
eOk if the operation has been finished successfully, or an appropriate error code otherwise.

◆ removePlacementFrom()

OdResult IFCCORE_EXPORT OdIfc::ModelOps::removePlacementFrom ( const OdDAIObjectId & product)

Removes an IFC entity placement components from the model, if they are not shared.

Parameters
product[in] An <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the entity (the STEP ID is stored in the <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdDbHandle.html">OdDbHandle</exref>).

◆ removeRepresentationFrom()

OdResult IFCCORE_EXPORT OdIfc::ModelOps::removeRepresentationFrom ( const OdDAIObjectId & product)

Removes an IFC entity shape representation from the model.

Parameters
product[in] An <exref target="https://docs.opendesign.com/tifc_api_cpp/OdDAIObjectId.html>object identifier</exref> of the entity (the STEP ID is stored in the <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdDbHandle.html">OdDbHandle</exref>).