Open DaJansenGit opened 4 years ago
I decided for BIMSurfer2 because of the API, which is not provided in the current release of BIMSurfer3
Yes and no, overall you would see that the APIs are rather similar. But the BIMsurfer3 is not at the stage yet, where we actively publish the API specs and consider it stable.
uncaught (in promise) ReferenceError: exec_statement is not defined
That's odd. What browser are you using? I made some minor tweaks just in case https://github.com/AECgeeks/BIMsurfer2/commit/e815aa24393babb7d75f55d0bcb4d6e27b900c7b
Otherwise it's just the executable API reference that causes this issue, you can probably get rid of it.
For FZK-Haus: model.js:752 Class "IfcRelDecomposes" does not have the field "RelatedObjects"
The BIMServer implementation for the metadata/tree display has been written quite a while ago. My guess is that it will need a little bit of tweaking for IFC4. The aggregation relationships were changed a bit in IFC4. I will keep the issue open to address that.
Edit:
The gltf models are showing without problems.
Yes that's the beauty of that approach, by converting everything to glTF and a uniform XML server-side the client-side logic is simpler. We will release a scalable processing queue for the glTF+XML conversion soon btw.
Thanks for your fast reply Thomas. I added the chanages of e815aa2 and I get no more errors for the exec_statement. Thanks for that! 👍 But even if I don't get any errors the tree at the sidebar loads all products but the model is not displayed. Tested with Firefox and Chrome. Any idea why this is not working?
For the "IfcRelDecomposes"
error I will have a deeper look into the changes that might be required due to IFC4.
1.5.182 is from Feb 2020 https://github.com/opensourceBIM/BIMserver/releases/tag/v1.5.182 But the geometry loader we have in this repo is from Aug 2018 https://github.com/AECgeeks/BIMsurfer2/blob/master/bimsurfer/src/BimServerGeometryLoader.js
Likely some incompatibility has been introduced in the given time frame. You can see the Binary geometry protocols here https://github.com/opensourceBIM/BinarySerializers/blob/7923bf8f9df90ace6385609c07cf0410a334d030/BinarySerializers/src/org/bimserver/serializers/binarygeometry/BinaryGeometryMessagingStreamingSerializer.java#L67 and the currently supported ones here https://github.com/AECgeeks/BIMsurfer2/blob/master/bimsurfer/src/BimServerGeometryLoader.js#L216
You need to either downgrade your BIMServer version (BinarySerializers plug-in to be precise) or we need to upgrade the BIMserverGeometryLoader in this repo. There is actually a good reference implementation in the BIMsurfer v1 (used by bimvie.ws) as you mentioned https://github.com/opensourceBIM/BIMsurfer-before2019/blob/V1/api/GeometryLoader.js So it would not be overly difficult. I will try to allocate time for this since now is probably a good time as the development velocity of BIMServer has decreased a bit lately.
Thanks again for your fast reply. I downgraded the BinarySerializers plugin to 0.0.43 using maven. This uses version 16 of BinarySerializer which should be supported due to code you send. Unfortunately I still get no visualization of the model. I attached a screenshot to show the current state.
When selecting an element in the tree view I get the following error:
[ERROR] [xeogl.CameraFlightAnimation 8]: Can't fly to component 'undefined' - does not have a worldBoundary
Edit: Regarding the Ifc4 you were right. The Ifc2x3 version of FZK-Haus works fine (still not visualization but the IfcRelDeompose
errors are gone). I hope I can fix this on my own, I will create a PR if I manage to fix it.
I just tested and can reproduce the issue. In my BIMServer log stream I see some exceptions. So either BIMserver and this version of the serializer are not compatible (likely) or there is an issue with the JS code (also likely). There are many moving pieces: client-side code, JS API, BIMserver, serializers and other plug-ins that make writing a long-time compatible code base challenging.
java.lang.NullPointerException: null
at org.bimserver.serializers.binarygeometry.BinaryGeometryMessagingStreamingSerializer.writeGeometryData(BinaryGeometryMessagingStreamingSerializer.java:506)
at org.bimserver.serializers.binarygeometry.BinaryGeometryMessagingStreamingSerializer.writeData(BinaryGeometryMessagingStreamingSerializer.java:388)
at org.bimserver.serializers.binarygeometry.BinaryGeometryMessagingStreamingSerializer.writeMessage(BinaryGeometryMessagingStreamingSerializer.java:291)
at org.bimserver.servlets.Streamer$1.run(Streamer.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
The tragic thing is I tried with BIMserver v1.5.108 (which is a version that was known to work at the time), but because of Maven requiring HTTPS now [0] that version cannot install plug-ins anymore. When you use the JAR this is relatively easy to fix when you go in the home directory (after running the launcher before clicking through setup) go to ./home/www/setup.html
and apply fix [1] but installation fails at the following steps.
The most reasonable way forward is to update the JS code in this repo for BIMserver and I will try to allocate time for that. Compatibility with BIMserver is important for us, but we also provide this repository to allow a way out of the deployment and maintenance issues with BIMserver. Using static, standardized files the interface between back-end and front-end is just so much simpler.
[0] https://blog.sonatype.com/central-repository-moving-to-https [1] https://github.com/opensourceBIM/BIMserver/commit/69b4b4d18317a9832159005c0718f74baa3e0461
I just found another error which I don't know how to deal with: What I want to do: My aim is to use the BIMSurfer2 inside an web application to visualize IFC Models from BimServer and show specific elements of the IFC to users. I decided for BIMSurfer2 because of the API, which is not provided in the current release of BIMSurfer3 (which is placed here, right?: https://github.com/opensourceBIM/BIMsurfer).
My Setup: latest BimServer release: 1.5.182 latest BimSurfer2 release: bimsurfer-0.0.64
I integrated the inbuild Schependomlaan buidling and the FZK-Haus IFC4 (http://www.ifcwiki.org/index.php?title=KIT_IFC_Examples). In the BimVie.ws plugin I can load both buildings without errors. When using BimSurfer2 (after dealing with the issues I showed in my other issue) I get the following errors.
For Schependomlaan I get 44 times the error:
raised by the code statement
exec_statement = "eval(document.getElementById(\"code"+i+"\").value)"
For FZK-Haus:
model.js:752 Class "IfcRelDecomposes" does not have the field "RelatedObjects"
The gltf models are showing without problems. Do you have any ideas where these errors are coming from or how I can deal with them? Thanks in advance.