Open shiwenna opened 7 years ago
Multiselect is not supported in BIMvie.ws (which is using BIMserver 1.0). BIMsurfer V2 will support multiselect (and will at some point be used by BIMvie.ws)
Click this button, how to find an object and highlight it ? Not by clicking on the project tree.
You need to know the gid of the object you want to highlight (object.gid). Then you search the SceneJS scene for the structure with that id, like scene.findNode(gid).
As Ruben said the BimViewer does not support highlighting of multiple objects so you have to implement the generation of additional SceneJS (geometry) layers for the highlight object yourself.
can you provide a demo - a jsfiddle perhaps?
Sorry, no. Whats your problem exactly? You extend BIMview.ws? You need a reference to the BIM objects andalso to the SceneJS scene. The BIM objects to get the gid of the object(s) you want to highlight. Then have a look to the BIM viewer how it handle the selection (tip: look for 'pick'). Thats where you need the access to the SceneJS scene.
Thank you for your answer, I want to know how to get multiple objects and theit gid
And you use standard BIMvie.ws? The project tree and also the 3D viewer downloading the model objects from the BIMserver. This is done via BimServerClient instance which provides a method getModel. The result (via callback) is a object with all the objects part of the project. There you identify your target objects by the object id and there is your gid. The getModel result look somewhat like { 123: { gid: "aabbcc1122", ...}, 324134: {gid: "hh21h2"}, ... } where 123 is the object id and aabbcc1122 the gid of that object. Then you find the SceneJS structure in the scene with scene.findNode("aabbcc1122"). HTH
I get the getModel result like this
the "revisions" is gid?
You're not using the BimServerJS API? I'll call it like instanceBimServerClient.getModel(poid, roid, strSchema, bDeep, function(model) { ... /* model is 'nearly' the JS object as seen in the screenshot */ .. }
model contains a key 'objects' - a list with all the objects of the model. Key is the obejct id (oid). Some of the entries are only structural references, some reference real objects. Real objects will have a key "gid" which is the id you want (to find it in the Scene and modify the SceneJS scene).
I using the BimServerClient.getModel(poid, roid, schema, deep, callback){} , get the result like this
the objects result is empty.I request parameters wrong?
poid : project.oid;
roid : project.lastRevisionId;
schema : project.schema.
Params seem to be okay. Does BIMvie.ws show the model correctly for that project? You should check what BIMvie.ws does - attach the debugger to the functions in the 3dview.html and check parameters/result.
This project is able to load successfully. I found the getModel() in project.html and debugging it ,get the above results. The 3dview.html not found getModel(). Are you sure in 3dview.html?
Of course you are right. Andalso after calling the getModel method you need to init the download of the objects - then you'll get the model.objects. The model of the result above provides you with a query method (it was renamed from queryNew to query), you will find the progress and the parameters for the query in the preloadModel. Sorry for my misleading.
@mansch
you need to init the download of the objects
Can you explain more in detail?
@rubendel I am still using an old release (0.0.75) based on BIMsurfer v1 and I am facing the same issue as I also want to support multi-selection. Does the latest release still use v1 ? Do you have any plan to share in regards of v2 usage ? Thanks
It's still using V1, there are still a few quirks in V2 that I want to be solved before using it in BIMvie.ws
I add a button on the page The expected result is that multiple objects can be highlighted by clicking the button How can I get multiple nodes at the same time when I click the button?![default](https://cloud.githubusercontent.com/assets/13158939/20094002/4fa396cc-a5da-11e6-8bed-28e8681ccdfa.jpg)