cad_gltf
Export CAD entities to self-contained glTF 2.0, import glTF files as mesh entities, or preview glTF mesh counts and bounding boxes.
Instructions
Export, import or preview glTF 2.0 geometry.
聚合 glTF 工具。按 ``action`` 派发:
- ``export``: 将当前文档的实体(实体几何)导出为自包含 glTF 2.0 文件,
颜色属性映射为 PBR ``baseColorFactor``。
- ``import``: 读取 glTF 文件并把每个 mesh 作为 ``mesh`` 实体导入当前文档。
- ``preview``: 返回当前文档 glTF 表示的概要(mesh 数 / 包围盒)。
When not to use: 需要 STEP/DXF/STL 等工程格式互操作时用 ``cad_file``
(import/export);本工具专注 glTF 网格资产。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gltf | Yes | glTF action, discriminated by `action`: export, import or preview. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | File path written / read | |
| action | Yes | Action executed | |
| status | Yes | Operation status | |
| message | No | Status description | |
| mesh_count | No | Number of meshes exported / imported | |
| object_ids | No | Imported object ids |