CAD Viewer

by 栗子仁儿
5
4
3
2
1
Score: 30/100

Description

Preview and render DXF / DWG CAD drawings directly inside Obsidian notes. Built on mlightcad/cad-viewer with Three.js WebGL rendering. Desktop only (requires Electron Web Worker support).

Reviews

No reviews yet.

Stats

2
stars
302
downloads
0
forks
70
days
69
days
69
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
1
total issues
1
open issues
0
closed issues
6
commits

Latest Version

2 months ago

Changelog

V1.0.2 — Core release:

In-note DXF/DWG preview — double-click a .dxf / .dwg file and it opens inside the note, not in AutoCAD / your OS default app Self-contained 3-file release — the ~14 MB of parser workers (including the LibreDWG WASM) are inlined into main.js, so a plain community release (manifest.json + main.js + styles.css) works with zero extra downloads Fast parse — larger worker chunk size reduces round-trips for big DWG files

README file from

Github

CAD Viewer

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:

  • In-note DXF/DWG preview — double-click a .dxf / .dwg file and it opens inside the note, not in AutoCAD / your OS default app
  • Self-contained 3-file release — the ~14 MB of parser workers (including the LibreDWG WASM) are inlined into main.js, so a plain community release (manifest.json + main.js + styles.css) works with zero extra downloads
  • Fast parse — larger worker chunk size reduces round-trips for big DWG files

Features

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).


Installation

From GitHub (Manual)

  1. Go to Releases and download the latest main.js, manifest.json, and styles.css
  2. Create a folder named cad-viewer in your vault's .obsidian/plugins/ directory
  3. Copy all 3 files in:
    .obsidian/plugins/cad-viewer/
    ├── main.js
    ├── manifest.json
    └── styles.css
    
  4. Restart Obsidian or reload plugins
  5. Go to Settings → Community Plugins → Enable "CAD Viewer"

⚠️ The folder must be named cad-viewer (matching the plugin id). A differently named folder will not be recognized by Obsidian.

From Community Plugins

  1. Open Settings → Community Plugins → Browse
  2. Search for "CAD Viewer"
  3. Click Install, then Enable

Usage

  • Open a drawing — Double-click any .dxf or .dwg file in the file explorer; it opens inside the note instead of handing off to your OS default app
  • Navigate — Scroll / drag to pan, pinch or wheel to zoom
  • Close — Switch to another note or file as usual

Requirements

  • Obsidian 1.4.0 or later (desktop app)
  • Desktop only — the plugin depends on Electron's Web Worker and file-system adapter; it will not load on mobile or the web client

License

GPL-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.


Author

栗子仁儿 (liamzy2021) · GitHub


☕ Support

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 预览 — 双击 .dxf / .dwg 文件,直接在笔记内打开,而不是用 AutoCAD / 系统默认软件打开
  • 自包含三文件发布 — 约 14MB 的解析 Worker(含 LibreDWG WASM)已内联进 main.js,标准社区发布包(manifest.json + main.js + styles.css)无需任何额外下载即可使用
  • 解析加速 — 更大的 Worker 分块,减少大 DWG 文件的往返次数

功能特性

功能 说明
📐 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 发布(见许可证)。


安装

从 GitHub 手动安装

  1. 前往 Releases 下载最新的 main.jsmanifest.jsonstyles.css
  2. 在 Obsidian 仓库的 .obsidian/plugins/ 目录下新建 cad-viewer 文件夹
  3. 将 3 个文件复制进去:
    .obsidian/plugins/cad-viewer/
    ├── main.js
    ├── manifest.json
    └── styles.css
    
  4. 重启 Obsidian 或重新加载插件
  5. 设置 → 社区插件 → 启用 "CAD Viewer"

⚠️ 文件夹必须命名为 cad-viewer(与插件 id 一致)。名字不对 Obsidian 不会识别。

从社区插件商店安装

  1. 打开 设置 → 社区插件 → 浏览
  2. 搜索 "CAD Viewer"
  3. 点击 安装,然后 启用

使用说明

  • 打开图纸 — 在文件浏览器中双击任意 .dxf.dwg 文件,会在笔记内打开,而不是交给系统默认软件
  • 浏览 — 滚动 / 拖拽平移,滚轮或双指缩放
  • 关闭 — 像平时一样切换到其他笔记或文件即可

系统要求

  • Obsidian 1.4.0 或更高版本(桌面端)
  • 仅桌面端 — 插件依赖 Electron 的 Web Worker 与文件系统适配器,移动端 / 网页端无法加载

许可证

GPL-3.0

本插件集成了基于 LibreDWG 的 DWG 转换器(@mlightcad/libredwg-*),其许可证为 GPL-3.0。根据 GPL 条款,本插件整体同样以 GPL-3.0 发布。你可以自由使用、修改和再分发,但需以相同许可证保持源码开放。


作者

栗子仁儿 (liamzy2021) · GitHub


💰 打赏

如果这个插件帮你省去了切来切去开 CAD 软件的麻烦,欢迎打赏支持!