G'day! I had a peek through the code and notice a number of places which might benefit from util functions, and a number of places which might benefit from adding a util function upstream to IfcOpenShell :)
These take into account the IFC2X3 fallback, as well as the new coordinate operations in IFC4X3. They also handle a few more situations that might be problematic (e.g. I saw a few instances of by_type("IfcGeometricRepresentationContext")[0] which might get a subcontext or non-Model/Plan context).
G'day! I had a peek through the code and notice a number of places which might benefit from util functions, and a number of places which might benefit from adding a util function upstream to IfcOpenShell :)
Have you seen https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.8.0/src/ifcopenshell-python/ifcopenshell/util/geolocation.py ? In particular there are quite a few goodies in the latest version.
Some you might enjoy:
These take into account the IFC2X3 fallback, as well as the new coordinate operations in IFC4X3. They also handle a few more situations that might be problematic (e.g. I saw a few instances of by_type("IfcGeometricRepresentationContext")[0] which might get a subcontext or non-Model/Plan context).