xeokit / xeokit-sdk

Open source JavaScript SDK for viewing high-detail, full-precision 3D BIM and AEC models in the Web browser.
https://xeokit.io
Other
715 stars 286 forks source link

[xeokit plugin ifcLoader]: getXKT error : null #1048

Open Jongonzale opened 1 year ago

Jongonzale commented 1 year ago

Hi,

I'm starting with the SDK, and when I execute one of the examples it has, or a code done by me following the documentation, I always receive the message of that error, and the page it charges doesn`t have any model in it, only the blue page. Why is that happening? What's the solution? Thanks

xeolabs commented 5 months ago

Sorry, we're not able to reproduce this issue. If it's still happening, if you can some steps to reproduce we'll re-open a take a look.

Nxito commented 1 month ago

Hi, i reproduce this issue when loading a IFC file.

image

I just check when u load a Blob file using axios or fetch, and you try to use it as an URL ( using URL.createObjectURL ) the loader do something... weird to me

When the ifcLoader try to request the src url, it add a queryParameter

image

When i paused the script at that point and i delete the query param, it works image

Update:

I found the line that adds this params is the function _cacheBusterURL

Package: @xeokit_xeokit-sdk.js function:

getIFC(src, ok, error2) { 
 src = this._cacheBusterURL(src);

Solution:

When i create the loader this fix the problem to me

myLoader.dataSource.cacheBuster = false
xeolabs commented 1 month ago

Thanks for digging into this - we'll make that cacheBuster option false by default