bimvie.ws icon indicating copy to clipboard operation
bimvie.ws copied to clipboard

How to light more than one object

Open shiwenna opened this issue 9 years ago • 16 comments

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

shiwenna avatar Nov 08 '16 09:11 shiwenna

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)

rubendel avatar Nov 08 '16 10:11 rubendel

Click this button, how to find an object and highlight it ? Not by clicking on the project tree.

shiwenna avatar Nov 09 '16 03:11 shiwenna

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.

multiselect

mansch avatar Nov 14 '16 12:11 mansch

can you provide a demo - a jsfiddle perhaps?

shiwenna avatar Nov 15 '16 01:11 shiwenna

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.

mansch avatar Nov 15 '16 06:11 mansch

Thank you for your answer, I want to know how to get multiple objects and theit gid

shiwenna avatar Nov 15 '16 06:11 shiwenna

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

mansch avatar Nov 15 '16 06:11 mansch

I get the getModel result like this qq 20161115194634 the "revisions" is gid?

shiwenna avatar Nov 15 '16 12:11 shiwenna

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 */ .. }

gid

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).

mansch avatar Nov 15 '16 22:11 mansch

I using the BimServerClient.getModel(poid, roid, schema, deep, callback){} , get the result like this qq 20161121101347 the objects result is empty.I request parameters wrong? poid : project.oid; roid : project.lastRevisionId; schema : project.schema.

shiwenna avatar Nov 21 '16 02:11 shiwenna

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.

mansch avatar Nov 21 '16 05:11 mansch

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?

shiwenna avatar Nov 21 '16 06:11 shiwenna

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 avatar Nov 21 '16 07:11 mansch

@mansch

you need to init the download of the objects

Can you explain more in detail?

RicoLiu avatar Dec 08 '16 09:12 RicoLiu

@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

dbarthelemy avatar May 23 '17 15:05 dbarthelemy

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

rubendel avatar May 24 '17 06:05 rubendel