Skip to main content

Hello,

I created a model view definition for IFC files. I exported it as XML and would like to apply the rules that I defined in the model view definition to an IFC file. I would like to filter an IFC file to include only the information that i described in my XML. What would be the best way to approach this topic?

Best regards

Tobias

By what do you intend to filter the IFC features? For example, should compare an attribute of each IFC feature to a value read from the XML?


Thank you for this question.

First I want to filter the IFC to only include the classes that I include in my XML.

Secondly, some IFC can have for example several geometric representations. I want to filter them to only include the geometric representation I included in my XML (e.g. surface geometry)

I attach two pictures showing an example model view definition for IFC wall, maybe this is helpful.

Thank you very much


Firstly you have to parse the XML document to retrieve required IFC class name and geometry type name as feature attributes. The XML reader and/or some XML transformers such as the XMLFlattener etc. would help you to do that. A concrete solution depends on the XML schema and which element/attribute value should be retrieved.

Then, in order to read only IFC features belonging to a specific class, the FeatureReader might help you. You can set an attribute storing an IFC class name (e.g. IfcWall) read from the XML to the Feature Types to Read parameter in the FeatureReader.

This workflow is a possible way to filter the IFC features by its geometry type according to an attribute value read from the XML. Assuming that the initiator feature contains attributes storing an IFC class name and geometry type name which have been read from the XML.

 

Hope this helps.


Firstly you have to parse the XML document to retrieve required IFC class name and geometry type name as feature attributes. The XML reader and/or some XML transformers such as the XMLFlattener etc. would help you to do that. A concrete solution depends on the XML schema and which element/attribute value should be retrieved.

Then, in order to read only IFC features belonging to a specific class, the FeatureReader might help you. You can set an attribute storing an IFC class name (e.g. IfcWall) read from the XML to the Feature Types to Read parameter in the FeatureReader.

This workflow is a possible way to filter the IFC features by its geometry type according to an attribute value read from the XML. Assuming that the initiator feature contains attributes storing an IFC class name and geometry type name which have been read from the XML.

 

Hope this helps.

Thank you very much, this has been very helpful.


Firstly you have to parse the XML document to retrieve required IFC class name and geometry type name as feature attributes. The XML reader and/or some XML transformers such as the XMLFlattener etc. would help you to do that. A concrete solution depends on the XML schema and which element/attribute value should be retrieved.

Then, in order to read only IFC features belonging to a specific class, the FeatureReader might help you. You can set an attribute storing an IFC class name (e.g. IfcWall) read from the XML to the Feature Types to Read parameter in the FeatureReader.

This workflow is a possible way to filter the IFC features by its geometry type according to an attribute value read from the XML. Assuming that the initiator feature contains attributes storing an IFC class name and geometry type name which have been read from the XML.

 

Hope this helps.

@takashi I have a follow up question. I build a workbench in a very similar way:

The filtering is working as intended (i needed some extra steps before merging). When I take a look at my inspector I can see that the Ifc has been filtered to only include a single wall and the wall only includes surface geometries:

The problem I encounter now is that when i write the filtered Ifc back to Ifc, it does for some reason not include Min and Max Extents and all coordinates:

Can the write maybe not write surface geometries? I tried to work with the GeometryCoercer and different geometries but this did not fix the problem. Do you have an idea how to fix this issue or what might be causing it? The inspector after the FeatureMerger includes all previsios Ifc information.

Thank you and best regards

Tobias

 


Firstly you have to parse the XML document to retrieve required IFC class name and geometry type name as feature attributes. The XML reader and/or some XML transformers such as the XMLFlattener etc. would help you to do that. A concrete solution depends on the XML schema and which element/attribute value should be retrieved.

Then, in order to read only IFC features belonging to a specific class, the FeatureReader might help you. You can set an attribute storing an IFC class name (e.g. IfcWall) read from the XML to the Feature Types to Read parameter in the FeatureReader.

This workflow is a possible way to filter the IFC features by its geometry type according to an attribute value read from the XML. Assuming that the initiator feature contains attributes storing an IFC class name and geometry type name which have been read from the XML.

 

Hope this helps.

Try setting geometry name to 'Body' before writing with the GeometryPropertySetter.


Try setting geometry name to 'Body' before writing with the GeometryPropertySetter.

Now it is working, thank you very much again!


Reply