Forge Viewer - 加载第二个 SVF 并更换零件

Forge Viewer - Load second SVF and replace parts

是否可以加载第二个(或多个)SVFfile/s,然后用加载的部分替换旧模型的某些部分?

例如:假设我们有一把默认装饰如红色靠背的椅子,我想加载仅带绿色靠背(不是整把椅子)的 .SVF 文件并替换它。

是的,这是可以做到的。

本博客中解释了多个模型的聚合 post 例如:https://forge.autodesk.com/blog/multi-model-refresher

如果您只想从模型中加载一组特定的对象,您可以通过将它们的 ID 指定给 loadDocumentNode 方法来实现:https://forge.autodesk.com/blog/minimizing-viewer-workloads-loading-models-partially-selected-components-and-features-only.

要从已加载的模型中隐藏对象,例如,您可以使用 viewer.hide method (this would require disabling the "show ghosted elements" option in the viewer though). Alternatively, you could modify the fragments of this object to hide them or move them out of the camera view: https://forge.autodesk.com/blog/working-2d-and-3d-scenes-and-geometry-forge-viewer.