diff --git a/package-lock.json b/package-lock.json index 732b3a6..501c62f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -58,7 +58,7 @@ "tailwindcss-animate": "^1.0.7", "three": "^0.186.0", "three-stdlib": "^2.36.1", - "web-ifc": "0.0.57", + "web-ifc": "^0.0.74", "xlsx": "^0.18.5", "zod": "^3.25.76" }, @@ -7188,9 +7188,10 @@ } }, "node_modules/web-ifc": { - "version": "0.0.57", - "resolved": "https://registry.npmjs.org/web-ifc/-/web-ifc-0.0.57.tgz", - "integrity": "sha512-ozzfxiCNT4+VqIhm93QdTozOmkMSPRZzf1RoRMMQIQLqoidYdExnAmY1OLoq1emnbvHPqFNQJ5HnQoqxvYZeFA==" + "version": "0.0.74", + "resolved": "https://registry.npmjs.org/web-ifc/-/web-ifc-0.0.74.tgz", + "integrity": "sha512-WFVxKrt81koT0mA1I5gVChc9/xsnqGZ1KzVxLhy+h43cs6z2hy8tuTtXuA/BPVUkzEzWn+EwNOozF+HHo6G6RA==", + "license": "MPL-2.0" }, "node_modules/which": { "version": "2.0.2", diff --git a/package.json b/package.json index b47d4ed..63552fb 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "tailwindcss-animate": "^1.0.7", "three": "^0.186.0", "three-stdlib": "^2.36.1", - "web-ifc": "0.0.57", + "web-ifc": "^0.0.74", "xlsx": "^0.18.5", "zod": "^3.25.76" }, diff --git a/public/wasm/web-ifc-mt.wasm b/public/wasm/web-ifc-mt.wasm index ccab27c..618b116 100755 Binary files a/public/wasm/web-ifc-mt.wasm and b/public/wasm/web-ifc-mt.wasm differ diff --git a/public/wasm/web-ifc-node.wasm b/public/wasm/web-ifc-node.wasm index fa38fef..af67745 100755 Binary files a/public/wasm/web-ifc-node.wasm and b/public/wasm/web-ifc-node.wasm differ diff --git a/public/wasm/web-ifc.wasm b/public/wasm/web-ifc.wasm index fa38fef..af67745 100755 Binary files a/public/wasm/web-ifc.wasm and b/public/wasm/web-ifc.wasm differ diff --git a/src/lib/ifc/ifcLoaderService.ts b/src/lib/ifc/ifcLoaderService.ts index e80c190..9a0e15e 100644 --- a/src/lib/ifc/ifcLoaderService.ts +++ b/src/lib/ifc/ifcLoaderService.ts @@ -75,7 +75,7 @@ export async function loadAndAuditIFC( if (onProgress) onProgress(10, 'Carregando motor Web-IFC (WASM)...'); const LOCAL_WASM_PATH = '/wasm/'; - const CDN_WASM_PATH = 'https://unpkg.com/web-ifc@0.0.57/'; + const CDN_WASM_PATH = 'https://unpkg.com/web-ifc@0.0.74/'; // Intercepta logs do console temporariamente para filtrar avisos internos da engine C++ const originalConsoleError = console.error; @@ -132,7 +132,9 @@ export async function loadAndAuditIFC( // 3. Open Model if (onProgress) onProgress(40, 'Decodificando entidades IFC...'); - const modelID = ifcApi.OpenModel(data); + const modelID = ifcApi.OpenModel(data, { + COORDINATE_TO_ORIGIN: true + }); if (modelID < 0) { throw new Error('Falha ao decodificar a estrutura do arquivo IFC.'); }