Forma
$ forma 社区开源 低风险Forma(wrong-nebula/forma)是面向 AI Agent 设计的超轻量纯 Rust 无头 3D 多面体/B-rep 建模引擎、CLI 与 MCP 服务,旨在替代笨重的无头 Blender。提供 forma spec 输出供大模型参考的语法规范、forma eval --strict 导出 GLB/STEP/STL、forma render 生成四视图 PNG 及 forma draw 绘制带标注的 SVG 工程蓝图。
npx -y forma-3d 脚本化 CAD 流水线最适合直接调用 CLI(forma spec、forma eval --strict、forma render),而内置 MCP 服务适合需要交互式视觉反馈的闭环。
核心事实概览
- 命令名
- $ forma
- FCRS-1.0 总分
- 88/100 (良好 (Good))
- 证据置信度
- 中置信度 (源码/文档)
- CLI vs MCP 建议
- CLI + MCP 搭配
- 评测日期
Agent 友好度体检单
当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。
FCRS-1.0 六维评分拆解
内置 forma spec 自描述大模型语法参考、--strict 严格校验及无头 eval/render/draw 输出。
forma spec,eval --strict, headless PNGrender, and SVGdraw
纯离线确定性几何内核,无任何网络请求,且通过 --strict 保障求值边界。
- 100% offline execution; writes only explicit
--outartifacts
既可通过 npx -y forma-3d 跨平台零安装运行 WASM,也可通过 Cargo 编译 1.2 MB 原生二进制。
- Runs via
npx -y forma-3d(WASM) or native Cargo build
用 1.2 MB 极速引擎取代数百 MB 的无头 Blender 环境,亚秒级完成 CAD 求值与四视图校验。
- 1.2 MB B-rep engine generating GLB/STEP/STL, PNG, and SVG
快速成长的社区 Rust CAD 项目(wrong-nebula/forma,8.6k+ stars),GPL-3.0 协议。
wrong-nebula/formarepository
内置自包含的 forma spec 输出,并在 GitHub README 提供完整 CLI 与 MCP 示例。
- Built-in
forma specand GitHub README
安全边界、鉴权与放权指南
零凭证、零云端依赖;完全离线处理本地几何脚本。
GPL-3.0 开源免费;提供 1.2 MB 原生二进制或通过 npx -y forma-3d 零安装 WASM 运行。
# forma Agent Rules - Run `forma spec` first so `.forma` scripts strictly match supported B-rep grammar. - Always pass `--strict` to `forma eval` to catch invalid manifold/boolean geometry early. - Inspect `forma render` PNGs visually before finalizing multi-part CAD assemblies.
Agent 高频安全命令配方
只读查询(安全推荐)
forma spec
在编写 .forma 脚本前打印精简的语言语法与内置几何原语参考。
受控写入与预演
.forma 模型并导出 GLB forma eval --strict --out part.glb model.forma
以事务方式校验几何拓扑并生成三维 part.glb 网格文件。
forma render --out preview.png model.forma && forma draw --out blueprint.svg model.forma
同步生成多视角预览 PNG 渲染图与带尺寸标注的矢量 SVG 工程图。
核心优势
- + 一条
forma spec命令即可向大模型提供完整的建模语法规范。 - + 支持 1.2 MB 原生 Rust 二进制及
npx -y forma-3d零安装 WASM 执行。 - + 支持导出 GLB/STEP/STL,并配套输出四视图 PNG 渲染与标注级 SVG 蓝图。
注意事项与踩坑点
- ! 专注于程序化 B-rep/CAD 实体建模,并非写实光线追踪动画渲染器。
- ! 采用 GPL-3.0 协议,闭源商业分发时需注意合规要求。
已验证兼容的 Agent 宿主
Follow 家族生态联动
同分类相关 CLI: 设计与文档排版
进入分类页 →W3C 官方 EPUB 规范校验器:`epubcheck book.epub --json report.json` 检查 EPUB 2/3 合规性。
检查、子集化与 XML 转换 OpenType/TrueType 字体(`fonttools`、`ttx`、`pyftsubset`):`fonttools subset font.ttf --unicodes=U+0020-007E`。
从 OpenAPI 3.0/3.1 Schema 生成零运行时开销的 TypeScript 类型:`openapi-typescript schema.yaml -o schema.d.ts`。
架构即代码 C4 图表 CLI:`likec4 validate` 校验语法,`likec4 export json` 与 `likec4 export png|drawio` 导出图表。
OpenAPI 差异与破坏性变更检测器:`oasdiff breaking base.yaml rev.yaml` 与 `oasdiff changelog`。