Home > Software design >  Autodesk forge highlight child object
Autodesk forge highlight child object

Time:09-18

Recently i've been working on this repository enter image description here

If you would like to achieve this programmatically :

Viewer.setSelectionMode();

could help you as well.

CodePudding user response:

If I well understood, you want to highlight the child (which contain the mesh) instead of the parent.

The object highlight (isolate) is done in /forgePowerbiView/src/visual.ts with this code:

const dbIds = options.dataViews[0].table.rows.map(r => 
                <number>r[0].valueOf());
console.log('dbIds: '   dbIds)
        
this.forge_viewer.showAll();
this.forge_viewer.impl.setGhostingBrightness(true); //for isolate effect 
this.forge_viewer.isolate(dbIds);

Take a look at this link Enumerating leaf nodes on Viewer. This will help you to get the dbIds you want to isolate.

  • Related