CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions
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_RC4 = 3 }
 
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 <link OdIfc::OdIfcCoreModule, OdIfcCoreModule> object.

Definition at line 149 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_RC4 

Default database content has the Ifc4x3 Release Candidate 4 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 54 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, which will be converted in the 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 <link , OdIfcModel> class that represents the current model of the file.
shapeId[out] A placeholder for the identifier of the created shape representation object.
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 GiDrawable 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 <link OdIfcModel, OdIfcModel> object that represents the current model of the file.
shapeId[out] The object identifier of the created 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
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]Modeler type which will be used to create geometry.
Returns
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
The function 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
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.