executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
librecadUse when editing 2D DXF/DWG drawings with a lightweight open-source CAD — floor plans, mechanical drawings, laser cutting layouts. LibreCAD: open-source 2D CAD based on Qt/C++, community edition fork of QCAD.
Independent GitHub snapshot · Automated classification · Original documentation governs
name: librecad description: "Use when editing 2D DXF/DWG drawings with a lightweight open-source CAD — floor plans, mechanical drawings, laser cutting layouts. LibreCAD: open-source 2D CAD based on Qt/C++, community edition fork of QCAD." tags:
项目地址: https://github.com/LibreCAD/LibreCAD
Wiki: https://github.com/LibreCAD/LibreCAD/wiki
许可证: GPL-2.0
最新稳定版: v2.2.1.5(2026-05 发布,见 GitHub Releases)
LibreCAD 主要特性:
读写 DWG 原生支持有限,建议先用 LibreDWG 或 ODA 转 DXF。
# Linux
sudo apt install librecad
# macOS
brew install librecad
# Windows / 其它:从官网下载
| 区域 | 用途 |
|---|---|
| 顶部菜单 | File / Edit / View / Plugins / Tools / Drawing / Dimension / Modify / Info |
| 左侧工具栏 | 绘图(CAD Toolbars)、捕捉、修改 |
| 命令行(按 ":" 唤出) | 类 AutoCAD 命令输入 |
| 图层管理 | 右侧 Layer List |
| 块管理 | 右侧 Block List |
| 命令 | 功能 |
|---|---|
li | line 直线 |
ci | circle 圆 |
re | rectangle |
pl | polyline 多段线 |
tr | trim 修剪 |
mi | mirror 镜像 |
co / cp | copy |
mv | move |
ro | rotate |
sc | scale |
os | osnap 对象捕捉 |
di | distance 测距 |
pu | purge |
| 输入 | 含义 |
|---|---|
100,50 | 绝对笛卡尔 |
@100,50 | 相对笛卡尔(相对上一点) |
@100<30 | 相对极坐标(长度<角度) |
Options → Drawing Preferences → DimensionsNoto Sans CJK SC 等# DXF(自带)
File → Open / Save As / Export
# DWG → DXF(需要 ODA File Converter)
ODAFileConverter input.dwg . ACAD2010 DXF 1 0
# 或
dwg2dxf -y input.dwg # LibreDWG
# 导出 PDF
File → Export → Export as PDF
# 仅支持命令行打开文件(无官方 headless / 脚本批处理模式)
librecad drawing.dxf
LibreCAD 自身脚本能力较弱,且不提供无界面批处理模式;批量转换建议结合:
ezdxf(Python 库)做 DXF 解析与生成inkscape 做 DXF → SVG/PDFimport ezdxf
doc = ezdxf.new('R2010')
msp = doc.modelspace()
msp.add_line((0,0), (100,0))
msp.add_circle((50,0), 10)
doc.saveas('out.dxf') # LibreCAD 可直接打开
Tools → Recalculate Dimensions| 问题 | 解决 |
|---|---|
| 中文乱码 | 切换字体到 TTF(SimHei/Noto),SHX 字体文件放入 fonts/ |
| DWG 打不开 | 用 ODA File Converter 或 LibreDWG 转 DXF |
| 标注比例小看不见 | Drawing Preferences → Dimensions → General Scale |
| 打开崩溃 | 删除 ~/.config/LibreCAD/LibreCAD.conf 重置 |
| 无法填充 | 闭合多段线后再 hatch;检查孔/外边界顺序 |
ezdxf(Python 库)配合 CLI 工具完成。Noto Sans CJK SC / SimHei),SHX 需放入 fonts/ 目录;③ 大图应分图层管理、关闭不必要 OSNAP;④ 命令缩写(li/ci/pl/tr/mi)与 AutoCAD 相似但不完全相同。: 唤出命令行 → 输入命令缩写 → 坐标输入(@100,50 相对笛卡尔,@100<30 相对极坐标)。Python 批处理:ezdxf.new('R2010') → msp.add_line/add_circle → doc.saveas('out.dxf')。li 命令绘制轴线,re 绘制矩形墙体,ci 绘制圆形柱tr 修剪交叉线,pl 绘制多段线轮廓dimlinear/dimaligned)dwg2dxf)ODAFileConverter input.dwg . ACAD2010 DXF 1 0 或 dwg2dxf -y input.dwgezdxf Python 脚本修复格式问题