FME Version
Introduction
FME's IFC reader attempts to closely reflect IFC's multi-level hierarchical data structure, with multiple geometry representations and property sets. However, this can make the data difficult to work with, especially when you want to convert to a simpler 3D or GIS dataset.This article will show you an easy method to simplify the IFC data into a more conventional structure, with the property sets stored as attributes and a single geometry representation.
Extracting Property Sets to Attributes
IFC features are often linked to multiple tables, each one containing a separate Property Set for the feature. FME extracts the appropriate row from each table and stores it as a Geometry Instance named after the Property Set, with Null geometry and traits for the properties.We can easily extract all of these traits to attributes with a single GeometryPropertyExtractor. Add the transformer to your workspace, then open its Properties and set Prefix Extracted Trait with Geometry Name to 'Yes'. This will differentiate between properties from different sets with the same property name.
The new attributes will be extracted, but in order to work with them in Workbench, we need to expose them. We can do this quickly using the Feature Caching option in Workbench. Choose Run from the Workbench top menu, then ensure that Enable Feature Caching is selected.
Connect the GeometryPropertyExtractor to a source feature type (if it isn't already connected), then run the workspace. You should see a green magnifying glass icon on the output port of the GeometryPropertyExtractor:
Add an AttributeExposer to the workspace, then connect it to the Extracted port of the GeometryPropertyExtractor. Open the AttributeExposer Properties, then click the Import box at the bottom and pick From Feature Cache.
This will raise a dialog showing the available attributes:
Check the Select All box and click the Import button. This will add all of the attributes to expose list and AttributeExposer output:
All the Property Set attributes are now available for use in the rest of your workspace.
Simplifying the IFC geometry
The IFC geometry still contains all the Property Set geometries as well as any secondary representations like Axis lines and Annotation. Generally, we just need the 3D Body representation to work with, so we will isolate this using the GeometryPartExtractor transformer. Connect the transformer to the output port of the AttributeExposer, the open its Properties:We will need to set the Geometry XQuery to only extract the parts we want. Click the ... button beside the XQuery box to bring up the XQuery dialog. Use the following query to extract the top node of the Body geometry:
This part Geometry Name = 'Body' AND The parent of this part Geometry Name != 'Body'
This can be a little tricky to set in the Test Clauses, since most IFC features have an attribute named 'Body' exposed on them, which the dialog will default to choosing. To make sure you use the text string instead, click on the Right Value box, then click on the down arrow and choose Open Text Editor:
Type 'Body' in the text editor box, then click OK.
And that's it - these three transformers have simplified and exposed the geometry and property sets into a form suitable for conversion into most other formats.
Results in Data Inspector:
Comments
0 comments
Please sign in to leave a comment.