跳到正文
DEV Community· WEI LIU·· 4 小時前AI 評分45

CADCraft:面向自動化的開源 Rust 2D CAD 工作流程

CADCraft: an open-source Rust 2D CAD workflow for automation

AI 導讀

CADCraft 是以 Rust 開發的免費開源 2D CAD 應用程式,提供可腳本化的繪圖工作流程,無需訂閲或帳戶。它支援 DWG、DXF,以及匯出 PDF、SVG 和 PNG,並提供 MCP、JSON 控制及無頭 CLI,讓用戶和 Agent 建立圖紙、檢視圖元、轉換檔案及驗證結果。

正文

When a project needs precise technical drawings and a workflow that can be scripted, CADCraft is a free, open-source 2D CAD application built in Rust. It is designed for architects, engineers, students, educators, makers, and technical designers who want a familiar drafting workflow without a subscription or account requirement.

A practical drafting core

CADCraft includes command-line tools for common drafting operations such as LINE, PLINE, CIRCLE, ARC, RECTANG, OFFSET, TRIM, FILLET, HATCH, and DIMLINEAR. Users can work with absolute or relative coordinates, distances, and angles. Object snaps, polar tracking, orthographic drawing, autocomplete, command history, aliases, and repeated commands help keep repetitive drafting work precise.

Drawings can be organized with layers and extended with associative dimensions, multileaders, tables, hatches, paper-space layouts, and plotting features. The application supports DWG and DXF workflows and can export designs to PDF, SVG, and PNG.

Built for automation

The interesting part for developer workflows is the built-in automation surface. CADCraft exposes MCP, JSON control, and a headless CLI so users and agents can create drawings, inspect entities, render screenshots, convert files, and verify results. That makes it possible to keep technical drawing steps closer to scripts, repeatable build jobs, and agent-assisted workflows instead of relying only on manual UI actions.

CADCraft runs on Windows, macOS, Linux, FreeBSD, and the web through WebAssembly. It is released under the MIT or Apache-2.0 licenses and is still in active development, so it is a project to evaluate, inspect, and contribute to as it evolves.

For anyone exploring open-source CAD with a programmable edge, the CADCraft project is worth a look.

來源:DEV Community · dev.to