栗子仁儿121 downloadsPreview DXF/DWG CAD drawings directly in Obsidian (based on mlightcad/cad-viewer). Supports both DXF and DWG formats with full rendering.
Preview .dxf and .dwg CAD drawings directly inside your Obsidian notes — no external CAD software, no leaving the app.
A lightweight Obsidian desktop plugin that embeds the mlightcad/cad-viewer viewer into your vault. Open any supported drawing file and it renders in-place with WebGL, pan/zoom, and layer-aware rendering.
V1.0.0 — Core release:
.dxf / .dwg file and it opens inside the note, not in AutoCAD / your OS default appmain.js, so a plain community release (manifest.json + main.js + styles.css) works with zero extra downloads| Feature | Detail |
|---|---|
| 📐 DXF preview | Open AutoCAD / compatible DXF drawings directly in reading view |
| 🏗️ DWG preview | Full .dwg support via the LibreDWG converter (runs in a Web Worker) |
| 🖱️ Interactive canvas | Pan, zoom, and inspect drawings with the built-in Three.js / WebGL viewer |
| 🖥️ Desktop only | Uses Electron's Web Worker + file APIs; not available on Obsidian mobile / web |
Note on DWG: DWG parsing relies on LibreDWG, which is distributed under GPL-3.0. Because of this dependency, the whole plugin is released under GPL-3.0 (see License).
main.js, manifest.json, and styles.csscad-viewer in your vault's .obsidian/plugins/ directory.obsidian/plugins/cad-viewer/
├── main.js
├── manifest.json
└── styles.css
⚠️ The folder must be named
cad-viewer(matching the pluginid). A differently named folder will not be recognized by Obsidian.
.dxf or .dwg file in the file explorer; it opens inside the note instead of handing off to your OS default appGPL-3.0
This plugin bundles the LibreDWG-based DWG converter (@mlightcad/libredwg-*), which is licensed under GPL-3.0. Under the terms of the GPL, this plugin as a whole is also GPL-3.0. You are free to use, modify, and redistribute it, provided you keep the source available under the same license.
栗子仁儿 (liamzy2021) · GitHub
If this plugin saves you from alt-tabbing into a CAD app, feel free to support its development:
|
在 Obsidian 笔记内直接预览 .dxf 和 .dwg 图纸——无需安装 CAD 软件,无需离开应用。
一款轻量级的 Obsidian 桌面插件,把 mlightcad/cad-viewer 查看器嵌入你的仓库。打开任意支持的图纸文件,即可用 WebGL 在原地渲染,支持平移、缩放与图层感知显示。
V1.0.0 — 首个正式版:
.dxf / .dwg 文件,直接在笔记内打开,而不是用 AutoCAD / 系统默认软件打开main.js,标准社区发布包(manifest.json + main.js + styles.css)无需任何额外下载即可使用| 功能 | 说明 |
|---|---|
| 📐 DXF 预览 | 在阅读视图中直接打开 AutoCAD / 兼容的 DXF 图纸 |
| 🏗️ DWG 预览 | 通过 LibreDWG 转换器(运行于 Web Worker)完整支持 .dwg |
| 🖱️ 交互画布 | 用内置的 Three.js / WebGL 查看器平移、缩放、查看图纸 |
| 🖥️ 仅桌面端 | 依赖 Electron 的 Web Worker 与文件系统 API,Obsidian 移动端 / 网页端不可用 |
关于 DWG 的说明: DWG 解析依赖 LibreDWG,其许可证为 GPL-3.0。正因如此,本插件整体以 GPL-3.0 发布(见许可证)。
main.js、manifest.json 和 styles.css.obsidian/plugins/ 目录下新建 cad-viewer 文件夹.obsidian/plugins/cad-viewer/
├── main.js
├── manifest.json
└── styles.css
⚠️ 文件夹必须命名为
cad-viewer(与插件id一致)。名字不对 Obsidian 不会识别。
.dxf 或 .dwg 文件,会在笔记内打开,而不是交给系统默认软件GPL-3.0
本插件集成了基于 LibreDWG 的 DWG 转换器(@mlightcad/libredwg-*),其许可证为 GPL-3.0。根据 GPL 条款,本插件整体同样以 GPL-3.0 发布。你可以自由使用、修改和再分发,但需以相同许可证保持源码开放。
栗子仁儿 (liamzy2021) · GitHub
如果这个插件帮你省去了切来切去开 CAD 软件的麻烦,欢迎打赏支持!