Autodesk伪造高亮子对象 [英] Autodesk forge highlight child object

查看:30
本文介绍了Autodesk伪造高亮子对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我一直在研究这个存储库 https://github.com/xiaodongliang/forgeviewer_embed_in_powerbi_report 在 Power BI 中构建自定义视觉对象,以可视化从 Bim track 的 API 中提取的问题.

Recently i've been working on this repository https://github.com/xiaodongliang/forgeviewer_embed_in_powerbi_report to build a custom visual in Power BI to visualize the issues extracted from Bim track'S API.

这个想法是将它们与模型的房间关联起来.为了做到这一点,我使用了 NWC 文件,因此我将房间导出为几何体.

The idea was visualizing them in associaton to the model's ROOMS. In order to do that I worked with a NWC file, so i cuold export rooms as a geometry.

如果从表格中选择了相关问题,我现在想做的是突出显示房间.问题是当我从表中选择一个问题时,在选择树中我可以看到突出显示的父对象名称(ROOM)而不是子对象(实心),我认为这就是为什么我无法实现我的目的(如果不要请纠正我).

What i would like to do now is to highligt the rooms if a connected issue is selected from a table. The problem is When i select an issue from a table, in the selection tree i can see highlighted the parent object name (ROOM) instead of the child (solid), and i think that is why i can't achieve my purpose (if not please correct me).

我有什么

我想做的事情

有人知道这样做的方法吗?

Does anyone know a way to do that?

推荐答案

如果我很好理解,您想突出显示子项(包含网格)而不是父项.

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

对象高亮(隔离)在/forgePowerbiView/src/visual.ts中完成,代码如下:

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

查看此链接在查看器上枚举叶节点.这将帮助您获得要隔离的 dbIds.

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

这篇关于Autodesk伪造高亮子对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆