ThatOpen / web-ifc-three

The official IFC Loader for Three.js.
https://ifcjs.github.io/info/
MIT License
506 stars 133 forks source link

three-mesh-bvh error from SubsetManager.createSubset() #53

Closed harrycollin closed 2 years ago

harrycollin commented 2 years ago

three-mesh-bvh sometimes throws error 'TypeError: Cannot read properties of undefined (reading 'count')' when using geometry subsets. This is reproducible by passing an empty selection array to SubsetManager.createSubset. I believe this also occurs when the selection contains an item that doesn't have a geometric representation.

image

agviegas commented 2 years ago

Solved from 0.0.72 and up! Passing an empty array to createSubsets throws an error (the user has to check that the ids array is not empty), but passing elements without representation doesn't stop the app from working and doesn't throw and error. It just returns a null object.