xBimTeam / XbimGeometry

XbimGeometry contains the CLR interop libraries and the c++ engine used to compute the 3D geometry of models.
https://xbimteam.github.io/
Other
256 stars 128 forks source link

Missing wall geometry #267

Open WalchAndreas opened 4 years ago

WalchAndreas commented 4 years ago

Hi,

I am working with your latest xBIM libs and encountered a case where the geometry of a wall is completely missing.

The wall is construced by BuildingElementParts (holding detail geometry) and a cutout (window or door).

Assemblies and versions affected:

xBim.Geometry.Engine.Interop 5.1.328 xBim.Essentials 5.1.297

Minimal file to reproduce the issue:

test_wall.zip

Expected behavior:

We tested some ifc-viewer (right side - BIM Vision) and the geometry is correct.

missingGeometry

Actual behavior or exception details:

Your current version of xBim Xplorer 5.1 (left) is able to load the ifc-file, but the wall geometry is not generated.

Thx for the great work!

Regards, Andreas

hyazinthh commented 4 years ago

Hello,

I've found the reason why this happens, but I'm not sure if it's due to a problem with Xbim.Geometry, the XbimXplorer, or just the dataset. The XbimXplorer only renders shape instances which have a representation type of OpeningsAndAdditionsIncluded. However, in this dataset, the shape instance of the wall has a type of OpeningsAndAdditionsExcluded. Looking at the the definitions of the representation types here, I'm not sure if the wall should have this type in the first place.

An easy workaround is to render shape instances of either type, but I can't tell if this leads to potential problems in other datasets.

Can someone with more insight into xBim take a closer look at this?

Thanks!

saltukkos commented 2 years ago

@hyazinthh Hello, did you try to hack the library a bit to render such shapes? If so, didn't you get into troubles? Thinking about doing it myself

hyazinthh commented 2 years ago

@hyazinthh Hello, did you try to hack the library a bit to render such shapes? If so, didn't you get into troubles? Thinking about doing it myself

No, we didn't pursue this any further. It only happens with a few datasets, which are handled properly by other libraries. So the datasets are not totally broken. As far as I remember there are some warnings about not supported operations when loading these datasets in xBim Xplorer.

ehtick commented 1 year ago

It is not the problem in the XBimGeometry.

This is done using the XBimGeometry

Image

if the viewer filters the shapeinstances with RepresentationType using the value OpeningsAndAdditionsIncluded it will skip the geometry for the wall.

Janitum commented 1 year ago

Hi @martin1cerny @ehtick , I've encountered this issue a few times now with IFC 4 models (only?).

My model does load in programs like Solibri: Ruppender Solibri

But using XBimExplorer some walls (not all of them) seem to disappear.

Ruppender XBimXplorer

Yesterday I've made some experiments with XBimWebUI, but the exact same issues occured:

Ruppender XbimWebUI

Ive used Xbim.Essentials v5.1.341 & Xbim.Geometry v5.1.437 to create the wexbim files. And I'm using the latest @xbim/viewer v2.0.1 to display the viewer in my web frontend. I can share the IFC if needed, on a NDA basis.

I guess the problem has to do with the IFCPOLYGONALFACESET. This is a new IFC Class in IFC4. It's a collection of 3D-points. Every Face has a list of Indexes to these points. 

`#113839= IFCCARTESIANPOINTLIST3D(((7.39367503189,0.365,0.),(7.39367503189,0.365,2.325),(6.38367503189,0.365,2.325),(6.38367503189,0.365,0.),(5.59837006748,0.365,0.),(5.59837006748,0.365,2.325),(3.65837006748,0.365,2.325),(3.65837006748,0.365,0.),(2.87587006748,0.365,0.),(2.87587006748,0.365,2.325),(2.87587006748,0.365,2.625),(7.45647858022,0.365,2.625),(8.74000009568,0.365,2.02648408794),(8.74000009568,0.365,0.),(7.39367503189,0.11,0.),(7.39367503189,0.,0.),(7.39367503189,0.,2.325),(6.38367503189,0.,2.325),(6.38367503189,0.11,0.),(6.38367503189,0.,0.),(5.59837006748,0.,0.),(5.59837006748,0.,2.325),(3.65837006748,0.,2.325),(3.65837006748,0.,0.),(2.87587006748,0.,0.),(2.87587006748,0.,2.325),(2.87587006748,0.065,2.325),(2.87587006748,0.065,2.625),(1.86587006748,0.365,2.625),(1.28352184614,0.365,2.625),(1.28352185119,0.,2.625),(7.45647858122,0.,2.625),(1.86587006748,0.065,2.625),(8.74000009568,0.,2.0264840884),(8.74000009568,0.,0.),(0.,0.,2.02648393138),(0.,0.,0.),(1.86587006748,0.,0.),(1.86587006748,0.,2.325),(1.86587006748,0.065,2.325),(1.86587006748,0.365,2.325),(1.86587006748,0.365,0.),(0.,0.365,0.),(0.,0.365,2.02648393374)));

113885= IFCPOLYGONALFACESET(#113839,.T.,(#113887,#113890,#113893,#113896,#113899,#113902,#113905,#113908,#113911,#113914,#113917,#113923,#113926,#113929,#113932,#113935,#113938,#113941,#113947,#113950,#113953,#113959,#113962,#113965),$);

113887= IFCINDEXEDPOLYGONALFACE((1,2,3,4,5,6,7,8,9,10,11,12,13,14));

113890= IFCINDEXEDPOLYGONALFACE((2,1,15,16,17));

113893= IFCINDEXEDPOLYGONALFACE((3,2,17,18));

113896= IFCINDEXEDPOLYGONALFACE((19,4,3,18,20));

113899= IFCINDEXEDPOLYGONALFACE((4,19,20,21,5));

113902= IFCINDEXEDPOLYGONALFACE((5,21,22,6));

113905= IFCINDEXEDPOLYGONALFACE((6,22,23,7));

113908= IFCINDEXEDPOLYGONALFACE((7,23,24,8));

113911= IFCINDEXEDPOLYGONALFACE((25,9,8,24));

113914= IFCINDEXEDPOLYGONALFACE((26,27,10,9,25));

113917= IFCINDEXEDPOLYGONALFACE((10,27,28,11));`

andyward commented 1 year ago

Hi @Janitum - Are you able to share this model, so we can investigate?

Janitum commented 1 year ago

Hi @andyward, I've just send it to your email.

Thanks for the followup!

andyward commented 1 year ago

Confirmed this is a v5.1 regression. It's fine in latest v4, and also our latest v6 Geometry engine. So not a case of a unsupported geometry, more like an issue in XbimGeometry / OpenCascade.

Will try to narrow down when it got introduced

andyward commented 1 year ago

This looks to have been broken forever in v5 geometry. It's not a recent regression. I went all the way back to 5.1.239 GE (03/06/2019) and it was still broken.

@SteveLockley - In our new v6 Geometry branch (which has a runtime switch between v5 and v6 Geometry engines), testing in Xplorer, I was able to repro the issue in Jan's Ruppender.ifc model in XGeometryEngineVersion.V5 mode, while it's correctly handled in V6. In neither engine Version is there any logging to indicate an error.

WalchAndreas commented 1 year ago

is this maybe related with this issue: https://github.com/xBimTeam/XbimGeometry/issues/369 ?