Solved

Learn Cognite Reveal

  • 12 December 2022
  • 31 replies
  • 344 views


Show first post

31 replies

Userlevel 2
Badge +3

Thanks, I will try. 

Userlevel 2

Do do this in your application, you need to:

  1. Detect clicked objects (see https://cognitedata.github.io/reveal-docs/docs/examples/click-reactions-cad)
  1. Map returned “treeIndex” to “nodeId” (https://cognitedata.github.io/reveal-docs/docs/api/classes/cognite_reveal.CogniteCadModel#maptreeindextonodeid)
  2. Use CDF to get metadata about the clicked object using nodeId from step above (https://cognitedata.github.io/cognite-sdk-js/classes/nodes3dapi.html#retrieve)

Does this help?

Userlevel 2
Badge +3

I need object name with right side tree structure data 

 

Userlevel 2

Hi again Karthik. I’m a bit unsure of what you’re asking here - do you want to implement similar functionality as in the Fusion 3D viewer, or are you suggesting a new feature in Fusion? 

 

Regards,

Lars Moastuen

Product manager, 3D

Userlevel 2
Badge +3

Thanks, AxisViewTool is working. and I have another doubts, If mouse hover 3D image show 3d object name and click object highlight name right side show tree structure data . see https://cognite-learn.fusion.cognite.com/learn/3d-models/6310365425503151/revisions/5444434995238807?env=westeurope-1&cluster=westeurope-1.cognitedata.com 

Userlevel 2

Hi Karthik and thank you for reaching out. In Reveal 3.x, tools are imported through “@cognite/reveal/tools”, not “@cognite/reveal”. Note that in Reveal 4 (recently released) it is optional to import from “@cognite/reveal” or “@cognite/reveal/tools” - see https://cognitedata.github.io/reveal-docs/docs/migration-guide for details on migrating from version 3 to 4.

Reply