Hello,
Some of the IFC files I convert using IfcOpenShell (for a visualisation tool) contains "small" complex CAD objects like the one in the attached picture.

Triangulating this kind of object generate a lot of errors like this :
...
[Error] {0VSPLTvm14jhquXPeYsp0x} Not enough edges for:
#313361=IfcPolyLoop((#288508,#313299,#288453))
[Error] {0VSPLTvm14jhquXPeYsp0x} Failed to process face boundary loop
#313361=IfcPolyLoop((#288508,#313299,#288453))
...
And the generated mesh has a lot of missing faces.
After tracing in the code, it seems that the problem is that the input IFC has a unit
length set to 0.001 (millimetre) and a lot of points for this kind of objects are removed
by remove_duplicate_points_from_loop(polygon, true, eps); (in IfcGeomWires.cpp).
Tweaking the code, I have managed to better a bit the result by commenting this line :
lowest_precision_encountered *= 10.;
in IfcGeomIterator.h (around line 260).
But then I have another kind of error :
...
[Error] {0VSPLTvm14jhquXPeYsp0x} Flattening face boundary
#301902=IfcFaceOuterBound(#301901,.T.)
[Error] {0VSPLTvm14jhquXPeYsp0x} Triangulating face boundary
#307735=IfcFaceOuterBound(#307734,.T.)
...
Perhaps a good solution would be to treat objects with a different kind of precision
level depending of their global dimension ? Or dimension of their smaller shape ?
regards,
Hello,
Some of the IFC files I convert using IfcOpenShell (for a visualisation tool) contains "small" complex CAD objects like the one in the attached picture.
Triangulating this kind of object generate a lot of errors like this :
...
[Error] {0VSPLTvm14jhquXPeYsp0x} Not enough edges for:
#313361=IfcPolyLoop((#288508,#313299,#288453))
[Error] {0VSPLTvm14jhquXPeYsp0x} Failed to process face boundary loop
#313361=IfcPolyLoop((#288508,#313299,#288453))
...
And the generated mesh has a lot of missing faces.
After tracing in the code, it seems that the problem is that the input IFC has a unit
length set to 0.001 (millimetre) and a lot of points for this kind of objects are removed
by remove_duplicate_points_from_loop(polygon, true, eps); (in IfcGeomWires.cpp).
Tweaking the code, I have managed to better a bit the result by commenting this line :
lowest_precision_encountered *= 10.;
in IfcGeomIterator.h (around line 260).
But then I have another kind of error :
...
[Error] {0VSPLTvm14jhquXPeYsp0x} Flattening face boundary
#301902=IfcFaceOuterBound(#301901,.T.)
[Error] {0VSPLTvm14jhquXPeYsp0x} Triangulating face boundary
#307735=IfcFaceOuterBound(#307734,.T.)
...
Perhaps a good solution would be to treat objects with a different kind of precision
level depending of their global dimension ? Or dimension of their smaller shape ?
regards,