I have multiple standard formed bricks in an IFC file of the type IfcBuildingElementProxy. While I already managed to extract their positions from the IFC file, I now struggle to get the geometry (lenght, height, width) from the file. I know that there are 2 ways to get the geometry:
parse trough the representation attributes of the bricks and try to write a code, that calculates the geometry. This method is really exhausting, as IFC files tend to work with a lot of references. I won't go this path.
get the geometry using a engine like ifcopenshell and opencascade. I know how to cast the bricks into a TopoDS object, but struggle to find the right methods to get the geometry.
Yes ultimately then you're doing some form of geometric reconstruction since the geometric input parameters are not preserved. Coincedently I just wrote something similar in C++, you can reproduce that using PythonOCC if you wish.
I have multiple standard formed bricks in an IFC file of the type IfcBuildingElementProxy. While I already managed to extract their positions from the IFC file, I now struggle to get the geometry (lenght, height, width) from the file. I know that there are 2 ways to get the geometry:
parse trough the representation attributes of the bricks and try to write a code, that calculates the geometry. This method is really exhausting, as IFC files tend to work with a lot of references. I won't go this path.
get the geometry using a engine like ifcopenshell and opencascade. I know how to cast the bricks into a TopoDS object, but struggle to find the right methods to get the geometry.
Yes ultimately then you're doing some form of geometric reconstruction since the geometric input parameters are not preserved. Coincedently I just wrote something similar in C++, you can reproduce that using PythonOCC if you wish.
https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.6.0/src/serializers/SvgSerializer.cpp#L381
Note that this assumes an axis aligned box (but you can also pick reference axes from the edges).