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
procedure Load(const Ifc: TIfcFile; const ABaseUrl: String); |
|
procedure Update(const Ifc: TIfcFile); |
|
function NodeToProduct(const Node: TShapeNode): TIfcProduct; |
Properties
property RootNode: TX3DRootNode read FRootNode; |
Description
Methods
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: TShapeNode): TIfcProduct; |
|
For a shape node (TShapeNode), return the corresponding IFC product (TIfcProduct descendant, like a TIfcWall, TIfcWindow, TIfcDoor). Returns |
Properties
property RootNode: TX3DRootNode read FRootNode; |
|
Latest X3D root node, built from the latest IFC instance. |
Generated by PasDoc 0.16.0-snapshot.