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
714 stars 286 forks source link

XKT positioning issue (compared to IFC) #980

Open HarpaceasDevelopment opened 1 year ago

HarpaceasDevelopment commented 1 year ago

Hello everyone! I noticed if I load multiple XKT files (converted from ifc), starting from the second model uploaded, the position seems to be not relative to the IFC origin, but seems to be relative to all models already uploaded in the viewer, in the center of the bounding box. IMO this could be useful for some usecase, but not for conglomerate of models of some real building project, it happens often to have separate models (e.g. Architectural, Structural. MEP)

Am i missing something in order to locate correctly the models? I tried to set the same origin for multiple files (of the same project) but nothing different happened, everytime is uploaded in the center.

Thank you in advance

xeolabs commented 1 year ago

Hmmm it should be possible to load multiple IFC models like this and have them aligned properly. We have some users who are viewing federated models at their original site placement, so it should be possible.

Maybe there's an IFC placement/transform case we're not handling right in our IFC->XKT converters - sounds like I'd better check.

I think we'd need to investigate this with a bunch of test files, ie. reproduce what you're experiencing - would you be able to share these files? If it's possible to get some publicly-shareable files, that's ideal, because then we can use them in an example and maybe a tutorial.

HarpaceasDevelopment commented 1 year ago

Hello! Thank you for the response, I appreciate! Maybe is an error by my side, or I am missing some parameters, or maybe is due to the modeling software.

Yes I can share 2 Ifc files with you, 1 is basically a bridge, and the other one contains just some sensors on top of the bridge.

Loading these files converted in XKTs into the viewer, I find the sensors separated by the bridge. apparently in the middle of the bounding box of the model previously loaded.

While Loading these files on another viewer I see the sensors correctly positioned. here is the link to download these files: https://we.tl/t-S3BDBur6vc

Actually we bypassed this issue by creating only one IFC file containing everything, but this way has some cons. If you need more information please do not hesitate to ask. Have a good day :)