IFCPatch tool now available

I problem I usually face is that IFCs exported from proprietary applications have various issues in them. I want to fix them, but most IFC authoring programs do an import-export process that results in a huge amount of data being lost in-between.

To solve this, I usually run a quick Python script which uses IfcOpenShell to modify the IFC file. However this is usually something only I can do but others cannot do in the office. For this reason I made IFCPatch.

Basically, it's a CLI app which you can feed in an IFC file, and apply a "recipe" which will modify the IFC in some predefined manner. For example:

$ ifcpatch -i foo.ifc -r ResetAbsoluteCoordinates

This will detect any IfcCartesianPoint which are placed in absolute coordinates (i.e. very far away) and correct them - which is a common problem in incorrectly geolocated IFCs produced from 12D.

Recipes can also allow arguments to be passed, such as:

$ ifcpatch -i foo.ifc -r OffsetStoreyLocations -a 1000

That will shift up all building stories by 1000 units.

I hope its useful to someone. Being a CLI app, I have integrated it into a Git hook when consultants submit their files.

Sign In or Register to comment.