Open Sim3d opened 3 years ago
Confirmed this is an issue, but it is caused by invalid IFC. This definition is invalid: #79=IFCAXIS2PLACEMENT3D(#80,$,#81);
.
IFC documentation states:
Either both, Axis and RefDirection are not given and therefore defaulted, or both shall be given.
But #79
only defines RefDirection
without Axis
direction (second attribute). This is incomplete definition of placement. We could assume that Axis
is simply [0,0,1], but that might be wrong in many cases.
Here is the minimal file: roof_and_wall.zip Here is the file fixed: roof_and_wall_fixed.zip
Thanks for the quick answer Martin!
When I look the definition of the IfcAxis2Placement3D, the RefDirection parameter is optional and the "Attribute definitions" documentation says:
If Axis and/or RefDirection is omitted, these directions are taken from the geometric coordinate system.
So in that case, you can probably fallback on the IfcDirection of the WorldCoordinateSystem (IfcAxis2Placement) given by the IfcGeometricRepresentationContext
#18 = IFCGEOMETRICREPRESENTATIONCONTEXT($, 'Model', 3, 1.E-5, #19, #23);
#19 = IFCAXIS2PLACEMENT3D(#20, #21, #22);
#21 = IFCDIRECTION((0., 0., 1.)); <====
But maybe i'm wrong?
There is a WHERE
rule AxisAndRefDirProvision
which says:
Either both, Axis and RefDirection are not given and therefore defaulted, or both shall be given.
And your file is breaking this rule. Therefore it would fail in IFC schema validation.
Oh! I see! The IFC documentation is tricky sometimes, sorry.
I tried to load the file into Solibri, Navisworks 2019 and SimpleBIM and all softwares displays the roof element correctly, a rotation is applied as expected... So, would you have any idea of a workaround to apply a rotation on the element like other BIM software?
Thanks!
Yes, this is a simple fallback. We will address it when we get to do some work on geometry engine.
Did you have the time to add the simple fallback?
Hi!
When I load a IFC file (RotatedRoofElements.zip) in the xbim Xplorer (built from source) two roof elements are not rotated as supposed to be. You can see the roof element below:
Do you have an idea of what can cause the problem?
Thanks!
Simon
Note:
Xbim.Common 5.1.0.0 5.1.323.0 Xbim.Geometry.Engine.Interop 5.1.0.0 5.1.403.0 Xbim.Ifc 5.1.0.0 5.1.323.0 Xbim.Ifc2x3 5.1.0.0 5.1.323.0 Xbim.Ifc4 5.1.0.0 5.1.323.0 Xbim.IO.Esent 5.1.0.0 5.1.0.322 Xbim.IO.MemoryModel 5.1.0.0 5.1.323.0 Xbim.ModelGeometry.Scene 5.1.0.1 5.1.403.0 Xbim.Presentation 5.1.0.0 5.1.0.0 Xbim.Tessellator 5.1.0.0 5.1.323.0