Describe the bug 📝
After streaming an IFC file into the scene, if i try to remove it by calling remove(modelID) in FragmentStreamLoader, an error will be thrown by GeometryCullerRenderer, because the _geometries property has been cleared by the culler's corresponding remove(modelID), but the _foundGeometry property will still have some of the model's geometry data. The "Geometry not found!" error is thrown in this block the next time the culler is automatically updated.
|
if (bboxAmount <= this.bboxThreshold) { |
|
// When too many bounding boxes on sight |
|
// don't hide / destroy geometry to prevent flickering |
|
for (const color of lostGeometries) { |
|
const geometry = this._geometries.get(color); |
|
if (!geometry) { |
|
throw new Error("Geometry not found!"); |
Reproduction ▶️
No response
Steps to reproduce 🔢
- Call FragmentStreamLoader.load() and stream an ifc model into the scene
- Call FragmentStreamLoader.remove(modelID) and remove the previosuly added model
- Check console for the GeometryCullerRendered error the next time the culler is updated
System Info 💻
System:
OS: Windows 10 10.0.19045
CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Memory: 5.85 GB / 15.89 GB
Binaries:
Node: 20.12.0 - C:\Program Files\nodejs\node.EXE
npm: 10.5.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Chromium (123.0.2420.65)
Internet Explorer: 11.0.19041.3636
npmPackages:
openbim-components: 1.4.15 => 1.4.15
Used Package Manager 📦
npm
Error Trace/Logs 📃
No response
Validations ✅
Describe the bug 📝
After streaming an IFC file into the scene, if i try to remove it by calling remove(modelID) in FragmentStreamLoader, an error will be thrown by GeometryCullerRenderer, because the _geometries property has been cleared by the culler's corresponding remove(modelID), but the _foundGeometry property will still have some of the model's geometry data. The "Geometry not found!" error is thrown in this block the next time the culler is automatically updated.
engine_components/src/fragments/FragmentIfcStreamer/src/geometry-culler-renderer.ts
Lines 533 to 539 in 9abb99c
Reproduction▶️
No response
Steps to reproduce 🔢
System Info 💻
System: OS: Windows 10 10.0.19045 CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz Memory: 5.85 GB / 15.89 GB Binaries: Node: 20.12.0 - C:\Program Files\nodejs\node.EXE npm: 10.5.0 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: Chromium (123.0.2420.65) Internet Explorer: 11.0.19041.3636 npmPackages: openbim-components: 1.4.15 => 1.4.15Used Package Manager 📦
npm
Error Trace/Logs 📃
No response
Validations ✅