cad-viewer
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCAD Viewer
CAD Viewer
Use this skill to open existing or newly generated CAD, robot-description, DXF, or plain FDM G-code files in CAD Viewer and hand back live review links. The expected input is one or more explicit file paths.
使用此工具在CAD Viewer中打开现有或新生成的CAD、机器人描述文件、DXF文件或纯FDM G-code文件,并返回实时预览链接。预期输入为一个或多个明确的文件路径。
Start Viewer
Start Viewer
Run from this skill directory:
bash
npm --prefix scripts/viewer run serve:ensure -- --file path/to/model.stepWhen the workspace is known, pass it explicitly:
bash
npm --prefix scripts/viewer run serve:ensure -- \
--workspace-root /path/to/workspace \
--file path/to/model.stepUse only the URL printed by ; do not assume a fixed port. probes registered local Viewer servers, reuses a matching scan root when possible, and otherwise starts the packaged production server. In sandboxed agent environments, local binding/probing failures such as or can be expected; rerun the same command with the needed permission/escalation instead of choosing an arbitrary port.
serve:ensureserve:ensureEPERMEACCESPass exactly one per invocation. For multiple requested files, run the command once per file and return each printed URL.
--fileserve:ensure从该工具所在目录运行:
bash
npm --prefix scripts/viewer run serve:ensure -- --file path/to/model.step当工作区路径已知时,显式传入:
bash
npm --prefix scripts/viewer run serve:ensure -- \
--workspace-root /path/to/workspace \
--file path/to/model.step仅使用输出的URL;不要假设端口固定。会探测已注册的本地Viewer服务器,可能的话复用匹配的扫描根目录,否则启动打包好的生产环境服务器。在沙箱化Agent环境中,可能会遇到或等本地绑定/探测失败问题;此时应使用所需权限/权限提升重新运行相同命令,而非选择任意端口。
serve:ensureserve:ensureEPERMEACCES每次调用时仅传入一个参数。若需处理多个文件,为每个文件运行一次命令并返回各自输出的URL。
serve:ensure--fileLinks
Links
- Return the printed Viewer link for each requested file.
- If a single server is already running for the same scan root, reuse it and vary the query only when that points at the requested file.
?file= - Do not stop an existing Viewer server unless the user asks.
- If Viewer startup fails, report the failure and continue with the owning skill's non-GUI validation or artifacts.
- 为每个请求的文件返回输出的Viewer链接。
- 如果同一扫描根目录下已有单个服务器在运行,复用该服务器,仅当指向请求文件时修改查询参数。
?file= - 除非用户要求,否则不要停止现有Viewer服务器。
- 如果Viewer启动失败,报告失败情况并继续使用所属工具的非GUI验证或工件。
References
References
- Read when the user asks to modify, debug, or iterate on CAD Viewer source.
references/development.md - Read when you need supported file types, Viewer controls, or file-specific feature details.
references/viewer-features.md - Read only when the user specifically needs optional SRDF MoveIt2 IK or path-planning controls.
references/moveit2-server.md
- 当用户要求修改、调试或迭代CAD Viewer源码时,阅读。
references/development.md - 当需要了解支持的文件类型、Viewer控件或特定文件的功能细节时,阅读。
references/viewer-features.md - 仅当用户明确需要可选的SRDF MoveIt2逆运动学(IK)或路径规划控件时,阅读。
references/moveit2-server.md