Show HN: Aircad – 浏览器中的专业绘图与三维建模
Show HN: Aircad – Professional drafting and 3D modeling in the browser

原始链接: https://aircad.com

创建一个环面命令,提示选择中心点,让用户通过实时圆预览设置主半径,然后询问管半径,并将生成的环面添加到文档。

Aircad 是一款基于浏览器的专业 CAD 工具,具备 NURBS 实体建模、制图/文档、脚本 API,以及对 DXF、DWG、STEP 和 3DM 的支持。它强调快速几何工具、内置协作(版本历史、图纸比较、分支、实时编辑)和深度集成 AI 的暂存与提交工作流。创建者表示,它解决了昂贵、缓慢的传统 CAD 以及功能受限或依赖服务器的 Web CAD 问题。评论询问其几何内核,并对依赖低成本 Web 工具进行业务关键 CAD 表示怀疑,警告法律风险可能超过节省的成本。
相关文章

原文
Make a Torus command: pick the center, drag the ring's radius with a preview, then set the tube radius.
import { BRep, Curve, Plane } from "aircad";

export const manifest = {
  name: "Torus",
  kind: "command",
  capabilities: ["document:read", "document:write"],
  inputs: {
    center: { type: "point", prompt: "Pick the center" },
    radius: { type: "length", prompt: "Major radius" },
    tube: { type: "length", prompt: "Tube radius" },
  },
  api: 1,
};

export default async function main(cad) {
  const center = await cad.input.point("center");
  // Draw the ring while the pointer moves.
  const ring = cad.display.show();
  const radius = await cad.input.length("radius", {
    from: center,
    onChange: (r) => ring.set(Curve.circle(Plane.at(center), r)),
  });
  const tube = await cad.input.length("tube");
  return cad.doc.add(BRep.torus(Plane.at(center), radius, tube));
}
Saved Torus as a draft in the Scripts panel: asks for center, radius, tube
联系我们 contact @ memedata.com