-
Notifications
You must be signed in to change notification settings - Fork 237
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug 📝
While testing more ifc files i failed to display a successfully parsed ifc file. The IFC is provided by ifcinfra.de and should display a Suspension Footbridge. I attached the resulting fragment file that failed to load.
Uncaught Error: Fragments: no indices provided to create the mesh.
Converted IFC to Fragement result:
model.zip
The IFC can be downloaded here (ifcinfra.de):
https://ifcinfra.de/wp-content/uploads/2019/07/ifcbridge-model05.zip
Versions used:
"@thatopen/components": "^3.1.0"
"@thatopen/components-front": "^3.1.0"
"@thatopen/fragments": "^3.1.1",
"@thatopen/ui": "^3.1.0"
web-ifc.wasm: 0.0.69
Reproduction ▶️
No response
Steps to reproduce 🔢
-
Download the example Suspension Footbridge model from ifcinfra.de (or see the attached .frag file):
model.zip -
Parse the IFC file to Fragment 3.0
const serializer = new FRAGS.IfcImporter();
serializer.wasm = {
path: "./wasm/0.0.69/",
absolute: false,
};
// A convenient variable to hold the ArrayBuffer data loaded into memory
let fragmentBytes: ArrayBuffer | null = null;
fragmentBytes = await serializer.process({bytes: buffer,});
if (!fragmentBytes) {
throw new Error("Failed to convert IFC to fragments, no data returned.");
}
- Try to load the resulting frag file in the viewer
const workerUrl = "./webworker/worker.mjs";
const fragments = this.components.get(OBC.FragmentsManager);
fragments.init(workerUrl);
fragments.core.models.list.onItemSet.add(({ value: model }) => {
model.useCamera(this.world.camera.three);
this.world.scene.three.add(model.object);
fragments.core.update(true);
});
const loadFragmentFile = async (fileName: string, id: string) => {
const file = await fetch(_____MODEL___URL_____)
const buffer = await file.arrayBuffer();
await fragments.core.load(buffer, { modelId: id });
};
await loadFragmentFile('model.frag', 'model');
System Info 💻
System:
OS: Windows 11 10.0.22631
CPU: (8) x64 Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz
Memory: 29.24 GB / 63.92 GB
Binaries:
Node: 23.4.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.22 - C:\Program Files\nodejs\yarn.CMD
npm: 11.4.2 - C:\Program Files\nodejs\npm.CMD
pnpm: 10.12.4 - C:\Program Files\nodejs\pnpm.CMD
Browsers:
Edge: Chromium (137.0.3296.68)
Internet Explorer: 11.0.22621.3527
Used Package Manager 📦
npm
Error Trace/Logs 📃
Uncaught Error: Fragments: no indices provided to create the mesh.
at yi.setIndex (index.mjs:1:184861)
at yi.createMesh (index.mjs:1:183712)
at yi.create (index.mjs:1:184067)
at yi.processTileRequest (index.mjs:1:183389)
at yi.update (index.mjs:1:183042)
at index.mjs:1:182866
Validations ✅
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a repository issue and not a framework-specific issue. For example, if it's a THREE.js related bug, it should likely be reported to mrdoob/threejs instead.
- Check that this is a concrete bug. For Q&A join our Community.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working