如何使用SFV2在伪造查看器中仅加载特定对象? [英] How can I load only specifc objects in the forge viewer using SFV2?

查看:54
本文介绍了如何使用SFV2在伪造查看器中仅加载特定对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SVF2与SVF1具有不同的 objectid s/ dbid s.在此 SO-答案中,建议使用 externalId 代替 objectid .但是, viewer.loadModel(svfUrl,{ids:[dbIds ...]})需要 dbId s仅加载指定的对象.如何使用SVF2和 https://developer.api.autodesk.com/modelderivative/v2/regions/eu/designdata/:urn/metadata/:guid/properties 端点仅加载指定的对象?可以在调用 Viewer3d :: loadModel 时在任何地方访问svf2 objectIds 还是可以使用 externalIds ?

SVF2 has different objectids/dbids than SVF1. In this SO-Answer, it was advised to use externalId instead of objectid. However, viewer.loadModel(svfUrl,{ids:[dbIds...]}) takes dbIds to load only specified objects. How can I load only specified objects using SVF2 and the https://developer.api.autodesk.com/modelderivative/v2/regions/eu/designdata/:urn /metadata/:guid/properties endpoint? Can I access the svf2 objectIds anywhere or can I use the externalIds when calling Viewer3d::loadModel?

推荐答案

您是对的,"SVF1 dbID"和"SVF1 dbID"之间有区别以及"SVF2 dbID".-SVF2格式的ID是永久性"的,这意味着在同一设计文件的不同版本中,单个ID将引用相同的设计元素(在SVF1中不是这种情况).

You're right, there's a difference between the "SVF1 dbIDs" and the "SVF2 dbIDs" - the IDs in SVF2 format are "persistent", meaning that in different versions of the same design file, a single ID will reference the same design element (which was not the case in SVF1).

不幸的是,平台的某些部分(例如 loadModel 查看器方法和/modelderivative/v2/regions/eu/designdata/:urn/metadata/:guid/properties 终结点).SVF2还没有.并且,在这些更新可用之前,您将必须在新的dbID和新的dbID之间"映射.手动,这本身又是一项艰巨的任务.

Unfortunately, there are parts of the platform (like the loadModel viewer method and the /modelderivative/v2/regions/eu/designdata/:urn /metadata/:guid/properties endpoint) that have not "caught up" with SVF2 yet. And before those updates are available, you would have to map "between the old and new dbIDs" manually which is itself another, non-trivial task.

这篇关于如何使用SFV2在伪造查看器中仅加载特定对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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