IfcConvert – how to control the resulting STEP model's scale?
Hello,
I am having trouble with the following, I would appreciate your thoughts:
I wish to export the IFC geometry as STEP in order to run simulations in COMSOL Multiphysics.
I thought, that using IfcConvert from the terminal (I'm currently on macOS, but I had no luck either on Windows or Ubuntu 24.04) with the following syntax: ifcconvert (--length-unit x)* <input.ifc> <output.stp>
No matter what I set for x (0.001, 1, 1000) in the --length-unit
argument, the resulting model will be 1000x larger than it should be.
Example, I created a very simple scene with Bonsai 0.8.1 and Blender 4.2.5 (two walls with a wall type with vertical layers, a single layer is configured to be 30cm thick):
I saved this model (simple-wall.ifc) onto my Desktop. In the terminal I navigated to the folder, and used the following :
ifcconvert ./simple-wall.ifc simple-wall-test.stp
ifcconvert --length-unit 0.001 ./simple-wall.ifc simple-wall-test.stp
When I open the STEP file in Rhino, it is much larger – COMSOL won't even import:
What am I doing wrong, how can I make sure that the model size remains exactly as it should be?
Previously I tried the --scale argument, but then I realised that is for drawings:
--scale arg
"Interprets SVG bounds in mm, centers layout and draw elements to scale. Only used when converting to SVG. Example 1:100."
(Ideally I would run the conversion within Blender, so I can create separate objects for each building material, but first I would like to have at least the geometry right.)
I've attached the file in question.
Thanks!
Comments
Any ideas on this one?:)
I've did some further exports: if the IFC file has it's length unit set to METRE, then it is imported as a STEP file to either Rhino and Comsol if the receiving program is set to MILLIMETRE. However, if I want to use the mentioned programs in METRE, then the IFC file's length unit should be set to MM in order to keep the element's size as is.
In summary, this is how it behaves as far as I can observe:
IFC (mm) -> IfcConvert -> STEP -> import (m) = scaling is ok
IFC (m) -> IfcConvert -> STEP -> import (mm) = scaling is ok
IFC (m) -> IfcConvert -> STEP -> import (m) = scaling is wrong
IFC (mm) -> IfcConvert -> STEP -> import (mm) = scaling is wrong
Am I missing something with the units? This is what I would expect:
IFC (m) -> IfcConvert -> STEP -> import (m) = scaling is ok
IFC (mm) -> IfcConvert -> STEP -> import (mm) = scaling is ok
This is probably something that needs reporting as a bug for IfcConvert.