CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
IfcCore.h File Reference
#include <daiModule.h>
#include "daiHostModule.h"
#include "IfcBuildOptions.h"
#include "IfcValueTypes.h"
#include "IfcUtils.h"

Go to the source code of this file.

Classes

class  OdIfcCoreModule
 

Typedefs

typedef OdSmartPtr< OdIfcCoreModuleOdIfcCoreModulePtr
 

Enumerations

enum  IfcSchema {
  kScmUndefined = 0 , kScmIfc2x3 = 1 , kScmIfc4 = 2 , kScmIfc4x3 = 3 ,
  kScmIfc4x4 = 4
}
 
enum  ModelerType { kFacetModeler , kSpaModeler , kBrepModeler , kDefaultModeler = kFacetModeler }
 

Functions

IFCCORE_EXPORT OdResult odIfcInitialize (bool initCDA=true, bool initIfcGeomResource=true, ModelerType modelerType=kDefaultModeler)
 
IFCCORE_EXPORT bool odIfcIsInitialized ()
 
IFCCORE_EXPORT OdResult odIfcUninitialize ()
 
IFCCORE_EXPORT OdResult odIfcInitModelerGeometry (ModelerType modelerType=kDefaultModeler)
 
IFCCORE_EXPORT bool odIfcIsGeomResourceInitialized ()
 
IFCCORE_EXPORT bool odIfcIsCDAInitialized ()
 
IFCCORE_EXPORT OdResult getDrawableShapeRepresentation (OdGiDrawablePtr pEnt, const OdDAIObjectId &subContextId, OdDAI::Model *pModel, OdDAIObjectId &shapeId, int shapeType)
 
IFCCORE_EXPORT OdResult getDrawableShapeRepresentation (const OdArray< OdGiDrawablePtr > &entities, const OdDAIObjectId &subContextId, OdDAI::Model *pModel, OdDAIObjectId &shapeId, int shapeType)
 
IFCCORE_EXPORT void setIfcFormatter (class OdUnitsFormatter *pFormatter)
 
IFCCORE_EXPORT OdUnitsFormattergetIfcFormatter ()
 

Typedef Documentation

◆ OdIfcCoreModulePtr

A data type that represents a smart pointer to an <exref target="https://docs.opendesign.com/tifc_api_cpp/OdIfcCoreModule.html>OdIfcCoreModule</exref> object.

Definition at line 151 of file IfcCore.h.

Enumeration Type Documentation

◆ IfcSchema

enum IfcSchema

Enumeration for default database content initialization modes.

Enumerator
kScmUndefined 

Database content is not initialized (undefined schema).

kScmIfc2x3 

Default database content has the Ifc2x3 version.

kScmIfc4 

Default database content has the Ifc4 version.

kScmIfc4x3 

Default database content has the Ifc4x3 version.

kScmIfc4x4 

Default database content has the Ifc4x4 current version.

Definition at line 39 of file IfcCore.h.

◆ ModelerType

Defines available modeler types.

Enumerator
kFacetModeler 

ODA Facet Modeler.

kSpaModeler 

Spatial ACIS Modeler.

kBrepModeler 

ODA Brep Modeler.

kDefaultModeler 

Default type of the modeler.

Definition at line 56 of file IfcCore.h.

Function Documentation

◆ getDrawableShapeRepresentation() [1/2]

IFCCORE_EXPORT OdResult getDrawableShapeRepresentation ( const OdArray< OdGiDrawablePtr > & entities,
const OdDAIObjectId & subContextId,
OdDAI::Model * pModel,
OdDAIObjectId & shapeId,
int shapeType )

Creates shape representations for each provided GiDrawable entity and returns the array of identifiers for every newly created shape representation to the calling subroutine. Every newly created shape representation is assigned to a specified representation context.

Parameters
entities[in] An array of entities that should be converted into an OdIfcShapeRepresentation object.
subContextId[in] An identifier of the sub-context object to which the shape representation will be added.
pModel[in] A raw pointer to the instance of the <exref target="https://docs.opendesign.com/tifc_api_cpp/OdIfcModel.html>OdIfcModel</exref> class that represents the current model of the file.
shapeId[out] A placeholder for the identifier of the created shape representation object.
shapeType[in] A type of the shape representation.
Returns
eOk if the shape representation object was successfully created; otherwise, the function returns an appropriate error code.
Remarks
The method sets identifier values of created shape representations, adds them into the provided identifiers array, and returns it to a calling subroutine.

◆ getDrawableShapeRepresentation() [2/2]

IFCCORE_EXPORT OdResult getDrawableShapeRepresentation ( OdGiDrawablePtr pEnt,
const OdDAIObjectId & subContextId,
OdDAI::Model * pModel,
OdDAIObjectId & shapeId,
int shapeType )

Creates a shape representation of a specified <exref target="https://docs.opendesign.com/tv_api_cpp/OdGiDrawable.html">GiDrawable</exref> entity inside a specified model and associates it with a specified representation context.

Parameters
pEnt[in] A smart pointer to an entity, that should be converted into a shape representation.
subContextId[in] An identifier of the sub-context object to which the shape representation should be added.
pModel[in] A smart pointer to an <exref target="https://docs.opendesign.com/tifc_api_cpp/OdIfcModel.html>OdIfcModel</exref> object that represents the current model of the file.
shapeId[out] The object identifier of the created shape representation.
shapeType[in] A type of the shape representation.
Returns
eOk if the shape representation was successfully created; otherwise, the function returns an appropriate error code.
Remarks
The method sets the value of the created shape representation's identifier and returns it to a calling subroutine.

◆ getIfcFormatter()

IFCCORE_EXPORT OdUnitsFormatter * getIfcFormatter ( )

For internal use only.

◆ odIfcInitialize()

IFCCORE_EXPORT OdResult odIfcInitialize ( bool initCDA = true,
bool initIfcGeomResource = true,
ModelerType modelerType = kDefaultModeler )

Initializes IFC SDK functionality.

Parameters
initCDA[in] A flag that determines whether Common Data Access (CDA) functionality should be provided for IFC data.
initIfcGeomResource[in] A flag that determines whether geometry resources are initialized as well (if equal to true) or not (if equal to false).
modelerType[in] A type of modeler that should be used for geometry creation.
Returns
eOk if IFC SDK was successfully initialized; otherwise, the function returns an appropriate error code.
Remarks
The function checks whether all needed modules are loaded and loads them if they are not. If at least one of the necessary modules is not loaded, the function returns the eNullPtr error code. It the bInitIfcGeomResource parameter value is equal to false, the IFC geometry library is unavailable, therefore the model cannot be visualized. In this mode only data management functionality is available.

◆ odIfcInitModelerGeometry()

IFCCORE_EXPORT OdResult odIfcInitModelerGeometry ( ModelerType modelerType = kDefaultModeler)

Initializes IFC SDK Modeler functionality.

Parameters
modelerType[in]A type of the modeler that is used to create the geometry.
Returns
eOk if IFC SDK Modeler was successfully initialized; otherwise, the function returns an appropriate error code.

◆ odIfcIsCDAInitialized()

IFCCORE_EXPORT bool odIfcIsCDAInitialized ( )

Retrieves whether the Common Data Access functionality is initialized for ODA IFC SDK.

Returns
The function returns true if the CDA is initialized and can be used for IFC data.

◆ odIfcIsGeomResourceInitialized()

IFCCORE_EXPORT bool odIfcIsGeomResourceInitialized ( )

Retrieves whether the IFC geometry module is loaded and initialized.

Returns
true if the IFC geometry module is initialized; otherwise, the function returns false.

◆ odIfcIsInitialized()

IFCCORE_EXPORT bool odIfcIsInitialized ( )

Retrieves whether IFC SDK functionality has already been initialized.

Returns
true if IFC SDK has already been initialized; otherwise, the function returns false.

◆ odIfcUninitialize()

IFCCORE_EXPORT OdResult odIfcUninitialize ( )

De-initializes IFC SDK functionality.

Returns
eOk if IFC SDK was successfully de-initialized; otherwise, the function returns an appropriate error code.
Remarks
The function checks whether the needed modules are loaded and decreases the reference counters for them. If a reference counter for any appropriate module becomes equal to zero, the function unloads the module. If no IFC-related modules are loaded, the function returns the eNullPtr error code.

◆ setIfcFormatter()

IFCCORE_EXPORT void setIfcFormatter ( class OdUnitsFormatter * pFormatter)

For internal use only.