Closed RyugaRyuzaki closed 4 months ago
@RyugaRyuzaki I think you are mixing things up. The original bug (changing the version of the serializer) is the problem. I'll change the name of the issue.
@RyugaRyuzaki I think you are mixing things up. The original bug (changing the version of the serializer) is the problem. I'll change the name of the issue.
@agviegas i also mean when we change @web-ifc version the output also change as i show the results.
@RyugaRyuzaki you have to create one issue per problem. Otherwise it's really hard to track things down. I've solved the serializer error in @thatopen/fragments@2.0.8
. If you have an issue with web-ifc versioning in the libraries, please create a separate issue.
Describe the bug 📝
I'm looking for a version that runs most stably without conflicts.
Normally I declare a variable as follows
When i do
It thrown error
I did something for tiler
private excludedCategories = new Set([ WEBIFC.IFCSPACE, WEBIFC.IFCREINFORCINGBAR, WEBIFC.IFCOPENINGELEMENT, ]); async streamIfc(buffer: Uint8Array) { / ========== IfcGeometryTiler ========== / const tiler = this.components.get(OBC.IfcGeometryTiler); tiler.settings.wasm = this.wasm; tiler.settings.autoSetWasm = false; tiler.settings.webIfc = this.webIfc; tiler.settings.excludedCategories = this.excludedCategories; tiler.settings.minGeometrySize = 10; tiler.settings.minAssetsSize = 1000; tiler.onAssetStreamed.reset(); tiler.onGeometryStreamed.reset(); tiler.onIfcLoaded.reset();
let assets: OBC.StreamedAsset[] = []; let geometries: OBC.StreamedGeometries; let groupBuffer: Uint8Array; let geometryFilesCount = 0; const onSuccess = async () => { const customIfcStreamer = this.components.get(CustomIfcStreamer); if (!customIfcStreamer) return;
if ( assets.length === 0 || geometries === undefined || groupBuffer === undefined ) return; const settings = {assets, geometries} as OBF.StreamLoaderSettings; await customIfcStreamer.load(settings, groupBuffer, true); };
const streamGeometry = ( data: OBC.StreamedGeometries, buffer: Uint8Array ) => { const geometryFile =
small.ifc-processed-geometries-${geometryFilesCount}
; if (geometries === undefined) geometries = {}; if (!this.streamedBufferFiles) this.streamedBufferFiles = {}; for (const id in data) { if (!geometries[id]) geometries[id] = {...data[id], geometryFile}; } if (!this.streamedBufferFiles[geometryFile]) this.streamedBufferFiles[geometryFile] = buffer; geometryFilesCount++; };tiler.onAssetStreamed.add(async (assetItems: OBC.StreamedAsset[]) => { assets = [...assets, ...assetItems]; await onSuccess(); });
tiler.onGeometryStreamed.add( async ({ data, buffer, }: { data: OBC.StreamedGeometries; buffer: Uint8Array; }) => { streamGeometry(data, buffer); await onSuccess(); } );
tiler.onIfcLoaded.add(async (group: Uint8Array) => { groupBuffer = group; await onSuccess(); }); await tiler.streamFromBuffer(buffer); }
/**
const {opaque, transparent} = group.geometryIDs; console.log(group.geometryIDs);
After that i tried to change for wasmmodule url :
this result for web-ifc@0.0.53 this result for web-ifc@0.0.54 this result for web-ifc@0.0.55
Every thing worked. this file for testing.
Reproduction ▶️
No response
Steps to reproduce 🔢
No response
System Info 💻
Used Package Manager 📦
npm
Error Trace/Logs 📃
No response
Validations ✅