cad-viewer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

CAD 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.step
When the workspace is known, pass it explicitly:
bash
npm --prefix scripts/viewer run serve:ensure -- \
  --workspace-root /path/to/workspace \
  --file path/to/model.step
Use only the URL printed by
serve:ensure
; do not assume a fixed port.
serve:ensure
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
EPERM
or
EACCES
can be expected; rerun the same command with the needed permission/escalation instead of choosing an arbitrary port.
Pass exactly one
--file
per
serve:ensure
invocation. For multiple requested files, run the command once per file and return each printed URL.
从该工具所在目录运行:
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
仅使用
serve:ensure
输出的URL;不要假设端口固定。
serve:ensure
会探测已注册的本地Viewer服务器,可能的话复用匹配的扫描根目录,否则启动打包好的生产环境服务器。在沙箱化Agent环境中,可能会遇到
EPERM
EACCES
等本地绑定/探测失败问题;此时应使用所需权限/权限提升重新运行相同命令,而非选择任意端口。
每次调用
serve:ensure
时仅传入一个
--file
参数。若需处理多个文件,为每个文件运行一次命令并返回各自输出的URL。

Links

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
    ?file=
    query only when that points at the requested 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
    references/development.md
    when the user asks to modify, debug, or iterate on CAD Viewer source.
  • Read
    references/viewer-features.md
    when you need supported file types, Viewer controls, or file-specific feature details.
  • Read
    references/moveit2-server.md
    only when the user specifically needs optional SRDF MoveIt2 IK or path-planning controls.
  • 当用户要求修改、调试或迭代CAD Viewer源码时,阅读
    references/development.md
  • 当需要了解支持的文件类型、Viewer控件或特定文件的功能细节时,阅读
    references/viewer-features.md
  • 仅当用户明确需要可选的SRDF MoveIt2逆运动学(IK)或路径规划控件时,阅读
    references/moveit2-server.md