简体   繁体   English

在 Autodesk Forge Viewer 中渲染 model 个元素的子集

[英]Render a subset of model elements in Autodesk Forge Viewer

We need to be able to render a subset of BIM model elements and also dynamically color some elements.我们需要能够渲染 BIM model 元素的子集,并动态地为一些元素着色。 Based on this article it looks like it's possible to render a subset of elements given you can provide a list of their dbIds.根据这篇文章,如果您可以提供元素的 dbId 列表,则似乎可以呈现元素的子集。 It also looks like Forge viewer API uses dbIds to interact with rendered elements.看起来 Forge 查看器 API 使用 dbIds 与渲染元素交互。

Before converting the BIM model to SVF2, we assign our own ids to model elements.在将 BIM model 转换为 SVF2 之前,我们将自己的 id 分配给 model 元素。 I can see our own ids as properties of model objects when accessing the properties database of the model in the browser.在浏览器中访问 model 的属性数据库时,我可以看到我们自己的 id 作为 model 对象的属性。 It would be great if we could generate a list of associations between our ids and forge dbIds.如果我们可以生成我们的 ID 和伪造 dbId 之间的关联列表,那就太好了。

Does autodesk provide an API to fetch custom properties or is there a way to correlate the dbId at upload time? Autodesk 是否提供 API 来获取自定义属性,或者有没有办法在上传时关联 dbId?

You can use this endpoint GET Properties from the ModelDerivative API and search for your own id in properties.您可以使用此端点从ModelDerivative API 获取属性并在属性中搜索您自己的 ID。 You will get the dbid of your object and then build your collection of associations.您将获得您的 object 的dbid ,然后构建您的关联集合。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM