获取不同 ID(子几何)的单独缩略图

Getting individual thumbnal images for different id's(sub geometries)

我需要在 forge 查看器的模型树中获取子部件的缩略图。(显示缩略图和子部件标签)

我已经尝试过 getThumbnails 端点,但它仅适用于整个对象。

默认情况下不支持此功能,但您可以通过多种方式获取模型中特定组件的缩略图:

  1. 如果您使用的是 AutoCAD 或 Inventor 文件,则可以使用新的 Design Automation APIs to generate the thumbnail yourself, using the corresponding application's API/scripting. For example, this blog post shows how to generate thumbnails of Inventor models: https://forge.autodesk.com/blog/simple-introduction-design-automation-inventor.

  2. 或者,如果您不介意更手动的方法,您可以在 Forge Viewer 中打开您的模型,隐藏您不想看到的组件,设置您的相机和视口大小, 并使用 getScreenshot 方法。