Class TCastleIfcMapping
Unit
Declaration
type TCastleIfcMapping = class(TObject)
Description
Maintains mapping between IFC concepts and X3D nodes. Allows to comfortably load IFC file and convert it to X3D multple times (using Load, Update, RootNode). Allows also to resolve X3D nodes back to IFC concepts (using NodeToProduct).
Hierarchy
- TObject
- TCastleIfcMapping
Overview
Methods
![]() |
constructor Create; |
![]() |
destructor Destroy; override; |
![]() |
procedure Load(const Ifc: TIfcFile; const ABaseUrl: String); |
![]() |
procedure Update(const Ifc: TIfcFile); |
![]() |
function NodeToProduct(const Node: TAbstractShapeNode): TIfcProduct; |
![]() |
function ProductToNodes(const Product: TIfcProduct): TX3DNodeList; |
Properties
![]() |
property RootNode: TX3DRootNode read FRootNode; |
Description
Methods
![]() |
constructor Create; |
This item has no description. |
![]() |
destructor Destroy; override; |
This item has no description. |
![]() |
procedure Load(const Ifc: TIfcFile; const ABaseUrl: String); |
Load IFC instance (TIfcFile) converting it to a new X3D node (available in RootNode). The BaseUrl will be used to resolve relative URLs, e.g. texture URLs mentioned in IFC information. After calling this (and before destroying this class or calling Load again) remember to free the resulting RootNode, it is not freed automatically by this class (because in all practical use-cases, you want to keep the X3D node around, e.g. to be owned by TCastleScene or freed manually later). |
![]() |
procedure Update(const Ifc: TIfcFile); |
Update the nodes in RootNode based on the new IFC contents. Call this only after calling Load once. Tries to be efficient and do as little work as possible and update X3D graph in RootNode to reflect the new IFC contents. For example, changing a translation in IFC will just change the corresponding TTransformNode.Translation, without recreating any X3D nodes. |
![]() |
function NodeToProduct(const Node: TAbstractShapeNode): TIfcProduct; |
For a shape node (TAbstractShapeNode), return the corresponding IFC product (TIfcProduct descendant, like a TIfcWall, TIfcWindow, TIfcDoor). Returns See also
|
![]() |
function ProductToNodes(const Product: TIfcProduct): TX3DNodeList; |
For IFC product, return the corresponding shape nodes. Assumes that the nodes have been updated to reflect the latest state of the IFC classes using Update. All the nodes returned are of TAbstractShapeNode class and map back (using NodeToProduct) to the given product. It is the caller's responsibility to free the resulting list. The TX3DNodeList does not own the children. See also
|
Properties
![]() |
property RootNode: TX3DRootNode read FRootNode; |
Latest X3D root node, built from the latest IFC instance. |
Generated by PasDoc 0.16.0-snapshot.