opensourceBIM / BIMserver

The open source BIMserver platform
GNU Affero General Public License v3.0
1.54k stars 608 forks source link

Geometry not generated correctly IFC2X3 #1022

Closed muren400 closed 3 years ago

muren400 commented 5 years ago

Hi,

the Geometry in this file (Balken_FGG.ifc) is not created correctly only the three cylinders on the bottom are generated.

Its supposed to look like this: image

But in bimvie.ws and BimSurfer its diplayed like this: image

When its exported as IFC4 its generated correctly image

Is this an issue with IfcOpenShell?

Greetings, muren

rubendel commented 5 years ago

I can reproduce this, also tested whether this might be a problem in BIMserver geometry generation code, I don't think it is, so my best guess is also IfcOpenShell. Will send this file to the IfcOpenShell developer and report back here.

hlg commented 3 years ago

The file contains a faceted BREP with 1380 faces, each bounded by a triangular polyloop. According to the geometry report, the IfcOpenShell plugin generates only 940 triangles for the full file.

I have manually removed half of the faces from the BREP and voila, we see a different set of triangles missing from the geometry generation, with the ones previously missing now included. There seems to be an issue with the large set of faces either during extracting the geometry or while passing it to the render engine.

image

hlg commented 3 years ago

This is too weird. Actually, it is enough to remove one single face, for example the first in the set (#140). It must not be a particular one, though it does not work with every face.

hlg commented 3 years ago

There seems to be some issue when IfcOpenShell processes the geometry to calculate the volume. When quantity calculation is disabled, the visualization looks complete. By the numbers, some triangles are still missing, but there are no visible holes.

hlg commented 3 years ago

Turns out that the file has an inconsistent declaration of precision for the geometric representation context. Thus some vertices are close enough to be considered identical (in line with the IFC standard) and subsequently the BREP becomes invalid, which does not matter for visualization purposes, but is a show-stopper for calculation of volume. With quantity calculation enabled, IfcOpenShell tries to repair the geometry and that attempt fails with the result seen above.

Here is the original IFC with corrected precision which does not expose the issue: Balken_FGG_reduced-precision.ifc.txt

muren400 commented 3 years ago

Thanks a lot! That did the trick. Is it possible, to turn off quantity calculation? We dont really need that and I haven't figured out yet, how to turn it off.

hlg commented 3 years ago

You can set the flag in global plugin settings of the IfcOpenShell plugin.

In BIMvie.ws: Server / Installed Plugin Bundles / Plugin Bundle IfcOpenShell-BIMserver-plugin / Plugin IfcOpenShell / Setting Calculate Quantities

Via API: PluginInterface.setPluginSystemSettings