You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have been trying to convert an IFC file into an XKT model and then converting that model into an array buffer using writeXKTModelToArrayBuffer, then turning it into an object url. We use version 1.1.19 of xeokit-convert and 0.0.56 of web-ifc. This is the (typescript) code we use:
exportasyncfunctionconvert(data: ArrayBuffer){returnnewPromise<ArrayBuffer>((resolve,reject)=>{constxktModel=newXKTModel()parseIFCIntoXKTModel({
WebIFC,
data,
xktModel,wasmPath: 'https://cdn.jsdelivr.net/npm/[email protected]/',// ./ in nodeautoNormals: true,log: (msg: unknown)=>{console.log(msg)}}).then(()=>{xktModel.finalize()resolve(writeXKTModelToArrayBuffer(xktModel,null,{},{zip: false})asArrayBuffer)},(e: unknown)=>{reject(einstanceofError ? e : Error(easstring))})})}
If we set the zip option to true it works. If we omit the zip option it works as well (and strangely enough generates a smaller file). However, setting zip explicitly to false gives the following error:
RangeError: offset is out of bounds
at Uint8Array.set (<anonymous>)
at toArrayBuffer (VM1198 @xeokit_xeokit-convert_dist_xeokit-convert__es.js:13046:13)
at createArrayBuffer (VM1198 @xeokit_xeokit-convert_dist_xeokit-convert__es.js:13002:10)
at writeXKTModelToArrayBuffer (VM1198 @xeokit_xeokit-convert_dist_xeokit-convert__es.js:12660:23)
at convert.ts:34:21
(Running a inside a vite/svelte app on Arc Browser, line numbers might not be reliable)
We tried the same code inside a Node script, and it also gives the same error.
The text was updated successfully, but these errors were encountered:
We'd love to be able to disable ZIPping, because it would actually load a lot of models faster and be easier on low-spec devices as well. If you happen to see where that can be fixed, feel free to make a fix though.
Thanks
We have been trying to convert an IFC file into an XKT model and then converting that model into an array buffer using
writeXKTModelToArrayBuffer
, then turning it into an object url. We use version 1.1.19 of xeokit-convert and 0.0.56 of web-ifc. This is the (typescript) code we use:If we set the
zip
option totrue
it works. If we omit thezip
option it works as well (and strangely enough generates a smaller file). However, settingzip
explicitly tofalse
gives the following error:(Running a inside a vite/svelte app on Arc Browser, line numbers might not be reliable)
We tried the same code inside a Node script, and it also gives the same error.
The text was updated successfully, but these errors were encountered: