Skip to main content
Practitioner ⭐️
Dec 12, 2022 10:49 AM UTC
Solved

Learn Cognite Reveal

I work cognite reveal 3d images  in angular v12.1.1.  I using NPM  npm i @cognite/reveal@3.3.0 ,  @cognite/sdk@7.14.0 and  @cognite/potree-core@1.5.2,  Cognite reveal AxisViewTool is not working. 

error: (Module '"@cognite/reveal"' has no exported member 'AxisViewTool'.)

 

Practitioner ⭐️
Dec 16, 2022 7:17 AM UTC

Click Object enable blue color with outline, How do this ?

 

31 replies

Lars Moastuen
Expert ⭐️⭐️⭐️⭐️
Expert ⭐️⭐️⭐️⭐️
Jan 10, 2023 8:18 AM UTC

This is outside the scope of Reveal and I’m not sure what the problem is. As for overlays not being interactable it’s because events is disabled in CSS in the example (https://cognitedata.github.io/reveal-docs/docs/examples/cad-2doverlay) using:

pointer-events: none;
touch-action: none;

 

Lars Moastuen (Software Engineer, Atlas AI)
Lars Moastuen
Expert ⭐️⭐️⭐️⭐️
Expert ⭐️⭐️⭐️⭐️
Feb 1, 2023 11:12 AM UTC
  1. The Filter 3D Nodes supports two types of filters, one “properties filter” and one “node name” filter. Use the latter to filter by names.
  2. Not sure what you are referring to here - can you elaborate?
Lars Moastuen (Software Engineer, Atlas AI)
Lars Moastuen
Expert ⭐️⭐️⭐️⭐️
Expert ⭐️⭐️⭐️⭐️
Dec 15, 2022 1:21 PM UTC

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?

Lars Moastuen (Software Engineer, Atlas AI)
Lars Moastuen
Expert ⭐️⭐️⭐️⭐️
Expert ⭐️⭐️⭐️⭐️
Dec 14, 2022 7:30 AM UTC

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.

Lars Moastuen (Software Engineer, Atlas AI)
Practitioner ⭐️
Dec 15, 2022 5:11 AM UTC

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 

Lars Moastuen
Expert ⭐️⭐️⭐️⭐️
Expert ⭐️⭐️⭐️⭐️
Dec 15, 2022 9:16 AM UTC

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

Lars Moastuen (Software Engineer, Atlas AI)
Practitioner ⭐️
Dec 15, 2022 12:38 PM UTC

I need object name with right side tree structure data 

 

Practitioner ⭐️
Dec 15, 2022 1:25 PM UTC

Thanks, I will try. 

Practitioner ⭐️
Dec 16, 2022 5:51 AM UTC

how to use Nodes3DAPI Class, What are parameters passing?  If any javascript example please share me. 

Practitioner ⭐️
Dec 16, 2022 7:17 AM UTC

Click Object enable blue color with outline, How do this ?