ifcplusplus icon indicating copy to clipboard operation
ifcplusplus copied to clipboard

Import IFC -> carve::triangulate::incorporateHolesIntoPolygon failed

Open schoeller opened this issue 4 years ago • 1 comments

Dear all,

thanks for this OSS product. I downloaded and compiled from Source. When importing an IFC geometry file from an alternative ACAD vendor I receive errors when opening the file in SimpleViewerExample as follows:

Detected IFC version: IFC4
Warning: createTriangulated3DFace, carve::triangulate::incorporateHolesIntoPolygon failed , IFC entity: #9436=IfcFace
Warning: createTriangulated3DFace, carve::triangulate::incorporateHolesIntoPolygon failed , IFC entity: #9441=IfcFace
Warning: createTriangulated3DFace, carve::triangulate::incorporateHolesIntoPolygon failed , IFC entity: #12743=IfcFace
Warning: createTriangulated3DFace, carve::triangulate::incorporateHolesIntoPolygon failed , IFC entity: #12748=IfcFace
Warning: createTriangulated3DFace, carve::triangulate::incorporateHolesIntoPolygon failed , IFC entity: #17556=IfcFace
Warning: createTriangulated3DFace, carve::triangulate::incorporateHolesIntoPolygon failed , IFC entity: #17561=IfcFace
File loaded: 17581 entities in 184.95 sec.

The visuals are as follows

Original grafik

SimpleViewerExample grafik

Similar behaviour is reproducible for IFC 2x3. The drawing file has been attached.

Kind regards

Sebastian

test_4.zip

schoeller avatar Jun 06 '21 13:06 schoeller

This is a visual artifact because this model has coordinates too far of the origin (e.g. x=3472627.73 y=5546741.47 z=110.72), probably because is a terrain related model expressed in UTM coordinates. The problem is that OpenGL use float precision (about 7 or 8 significative digits) for the coordinates and the big numbers are expending all precision in the offset. If the model is translated near the 0,0,0 it is drawn as expected.

escolano avatar Nov 24 '22 17:11 escolano