Result of BIM codesprint 2011
This project started at openBIMweek 2011. Now maintained by the community.
ThreeJs viewer consists of a server side part (serializer plugin) and a clientside part (ThreeJs based javascript scenegraph).
In order to add the serzializer plugin to your BimServer instance, just grab the plugin jar file from the list below and drop it into the BimServer plugin folder. Make sure to use the plugin version matching your BimServer version.
Binary releases can be found on Github.
threejs-20150924-0.5.jar | Serializer plugin for Bimserver 1.4 final with bug fix |
threejs-serializer-0.4.jar | Serializer plugin for Bimserver 1.2 RC7 |
threejs-serializer-0.3.jar | Serializer plugin for Bimserver 1.2 beta |
threejs-serializer-0.2.jar | Serializer plugin for Bimserver 1.1 final |
threejs-serializer-0.1.jar | Serializer plugin for Bimserver 1.1 beta |
Use this method, if you need the full-blown Bimserver under your fingertips for debugging.
checkout the BimServer source code and setup your IDE for BimServer development, e.g. for Eclipse as explained here
create a new project (Eclipse) or module (other IDEs) and checkout the ServerPlugin
Add the following line to org.bimserver.LocalDevPluginLoader.java: pluginManager.loadPluginsFromEclipseProject(new File("../JsonModelFormat2Serializer"));
Use this method, if you don't want to poke around the full Bimserver sources and are brave enough to mess around with the Bimserver starter.
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
.
Because the Bimserver starter spawns another JVM for the actual Bimserver (including the plugin you want
to debug), you have to pass these options to the child JVM. You can do so by appending them to one of
the memory settings in the Bimserver starter form separated by a space, because there is no sanity check.
Alternatively run the Bimserver starter from the command line and copy the child JVM spawning command
which is printed there.Because the communication between client and server through the JSON API relies on CORS you have to serve the client files from an origin different from the Bimserver location. For local development fire up a simple Webserver exposing the client html and javascript files. Some options:
python -m SimpleHTTPServer <port>
groovy -l <port> SimpleWebServer.groovy
Open index_served.html
and fill in the fields in the upper part in order to load models from the server.
The functionality is very simple at present:
Embedding is not yet streamlined, you'd have to fiddle with the html/javascript on your own currently.