opensourceBIM / BIMsurfer

The latest version of the BIM Surfer WebGL viewer for IFC
MIT License
382 stars 132 forks source link

How can I use bimsuffer to load data from bimserver and show the 3D model in web? #112

Closed victor-freedom closed 1 year ago

victor-freedom commented 1 year ago

I have three issues;

First: I used bimserver v1.5.184. when I start server,it has an error like 'Required dependency org.opensourcebim:bimserverapi is installed, but it's version (0.0.9) does not comply to the required version (0.0.83)', I install the BIMServer JavaScript API plugin by version 0.0.176.How can i resolve this problem?

Second: BIMsurfer-before2019-master,I use this project or https://github.com/AECgeeks/BIMsurfer2/ to get data from bimserver and then use xeoViewer(bimserver.html can only use the xeoViewer,because at the BimServerModelLoader.loadFullModel-> loadOids call a method : viewer.taskStarted(),only xeoViewer has the method) to show the data.But, in the BimServerGeometryLoader,i can only get the new serializer "org.bimserver.serializers.binarygeometry.BinaryGeometryMessagingStreamingSerializerPlugin"( the BinaryGeometryMessagingStreamingSerializerPlugin3 is not exist at the version 1.5.184) and call the method o.bimServerApi.call("ServiceInterface", "download") to download the data,after this,there is an error shows in the bimserver like "17:23:28 ERROR [pool-1-thread-22]: (BimServer.java:240) java.lang.NullPointerException: null at org.bimserver.serializers.binarygeometry.BinaryGeometryMessagingStreamingSerializer.writeGeometryData(BinaryGeometryMessagingStreamingSerializer.java:974) at org.bimserver.serializers.binarygeometry.BinaryGeometryMessagingStreamingSerializer.writeData(BinaryGeometryMessagingStreamingSerializer.java:771) at org.bimserver.serializers.binarygeometry.BinaryGeometryMessagingStreamingSerializer.writeMessage(BinaryGeometryMessagingStreamingSerializer.java:275) at org.bimserver.servlets.Streamer$1.run(Streamer.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) "。 I think this is the reason i can‘t show the data on the web。 if I choose the bimserver in viesion 1.5.88 ,there is no problem and can show the data successful。 So, how can I do to solve this problem? I just want to use bimserver in version 1.5.184 to show the IFC2X3 file on the web.

Third: If the project BIMsurfer-before2019-master could match the bimserver v1.5.184?If it is not ,which project I can use to load the IFC2X3 data from bimserver v1.5.184 and show the data to the web or which bimserver version I can use to load the IFC2X3 data from bimserver and show the data to the web

aothms commented 1 year ago

'Recent' releases of bimserver only support opensourceBIM/BIMsurfer (i.e this repository). You can run it as a webplugin from within bimserver or standalone (try [0]). For the first issue maybe @hlg has ideas?

[0] https://github.com/opensourceBIM/BIMsurfer/blob/master/apps/dev.js

hlg commented 1 year ago

Required dependency org.opensourcebim:bimserverapi is installed, but it's version (0.0.9) does not comply to the required version (0.0.83)

This error message most likely stems from the BIMsurfer v1 webplugin being installed. It required the Javascript API to be installed as a separate plugin and the correct plugin version is checked during startup. With BIMsurfer v3 (in this repository) this is not required anymore. If you use BIMsurfer v3 as webplugin in BIMserver, the JS API (aka BIMserver client library, bimserverclient.js) should be included. If you use it standalone, you have to load the it yourself, either from a location relative to your project (like in the examples) or from a remote location.