Fork of HakanSeven12/OpenCADStudio (GPL-3.0), patched for embedded job-scoped load/save integration with the CMMS.
  • Rust 71.9%
  • Fluent 26.7%
  • WGSL 0.7%
  • Max 0.3%
  • HTML 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hakan Seven 50281c6a05 fix(ui): per-tab Layer/Color/Linetype/Lineweight defaults
The Home-ribbon Color / Linetype / Lineweight chips live on the
global `self.ribbon` and were never re-seeded from the active tab's
header, so opening a fresh file, creating a new tab, or switching
between tabs kept showing whatever the prior tab had picked. Layer
worked already because `self.tabs[i].active_layer` is per-tab.

Two halves of the fix:

1. When the user picks a new value from the ribbon with no entity
   selection, persist it into that tab's `document.header`
   (CLAYER + handle, CECOLOR, CELTYPE + handle, CELWEIGHT) and
   mark the tab dirty. Switching back later reads the saved value
   back out.

2. After every event that changes the active tab — `FileOpened`,
   `TabNew`, `TabSwitch`, `TabClose` (including the
   close-last-and-reset path) and `UnsavedDialogDiscard` — call
   `sync_ribbon_from_selection()` so the chips track the new
   tab's defaults (or its current selection).

Closes #21

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 21:00:13 +03:00
.claude feat: add local settings for Bash permissions 2026-04-30 10:01:17 +03:00
.github ci: include version, OS and arch in release asset filenames 2026-04-24 10:13:11 +03:00
assets feat: add new screenshot for documentation 2026-05-19 00:20:32 +03:00
examples fix(scene): rescale dash pattern when projecting wires to paper space 2026-05-19 08:27:05 +03:00
flatpak chore: release v0.2.9 2026-05-16 13:04:58 +03:00
src fix(ui): per-tab Layer/Color/Linetype/Lineweight defaults 2026-05-20 21:00:13 +03:00
.gitignore docs: add file-open and render performance roadmap 2026-05-17 21:34:12 +03:00
build.rs feat: redesign View tab and fix Annotate/tab order 2026-04-09 12:25:15 +03:00
Cargo.lock chore: bump to 0.3.4 and patch acadrust to fix/hatch-boundary-handle-cap 2026-05-20 07:02:44 +03:00
Cargo.toml chore: bump to 0.3.4 and patch acadrust to fix/hatch-boundary-handle-cap 2026-05-20 07:02:44 +03:00
COMMANDS.md docs: add COMMANDS.md and update ROADMAP.md in English 2026-04-09 20:06:35 +03:00
HEADER_AUDIT.md feat: add HeaderVariables audit documentation 2026-05-20 05:57:16 +03:00
LICENSE Initial commit 2026-03-22 14:53:51 +03:00
README.md Update image in README.md 2026-05-12 22:26:34 +03:00
ROADMAP.md docs: add file-open and render performance roadmap 2026-05-17 21:34:12 +03:00

H7CAD

resim

A CAD application for 2D drafting and 3D modeling, built with Rust. Reads and writes DWG and DXF files natively.

Features

File Formats

  • DWG read/write (R13 through R2018)
  • DXF read/write (R13 through R2018)
  • STL export (STLOUT / EXPORTSTL)
  • STEP AP203 export (STEPOUT)
  • OBJ import (IMPORTOBJ)
  • PDF export (plot layouts to PDF)
  • WBLOCK — write selected entities or a block to an external file
  • XREF — attach, reload, and auto-resolve external references

2D Drafting

Command Description
LINE, PLINE, RECTANG, POLYGON Basic geometry
CIRCLE, ARC, ELLIPSE, SPLINE Curves
HATCH, HATCHEDIT Hatch fills with pattern, scale, angle editing
OFFSET, TRIM, EXTEND, FILLET Modify geometry (supports lines, arcs, ellipses, polylines, splines)
BREAK, STRETCH, LENGTHEN Shape editing
ARRAY, MIRROR, MOVE, COPY, ROTATE, SCALE Transformations
EXPLODE Explode blocks, dimensions, polylines, mlines
DDEDIT Double-click text editing
MASSPROP Area, perimeter, centroid of selected entities

3D Modeling

Command Description
BOX, SPHERE, CYLINDER Solid primitives
EXTRUDE, REVOLVE Profile-based solids
LOFT Ruled-surface loft through cross-sections
SWEEP Sweep a profile along a path
ARRAY3D 3D array
ACIS tessellation Renders 3DSOLID, REGION, and BODY entities

Annotations & Dimensions

  • Dimensions: Linear, Aligned, Angular, Radial, Diameter, Ordinate — with full DIMSTYLE support (DIMASZ, DIMSCALE, DIMEXO, DIMEXE, and more)
  • Text: MTEXT, TEXT, DTEXT with font browser (STYLE DIALOG)
  • Leaders: MLEADER with straight and spline path types; MLEADERSTYLE manager
  • Tolerances: GD&T feature control frames
  • Tables: TABLE entity render; TABLESTYLE manager
  • MLine: MLINE entity with MLSTYLE manager and EXPLODE support

Paper Space & Layouts

  • Multi-tab layout system with model space and unlimited paper space tabs
  • Viewport projection: Model content correctly projected into paper-space viewport rectangles
  • Camera persistence: View position and zoom saved per layout; restored on file open and tab switch
  • Correct paper size: Physical paper dimensions read from embedded PlotSettings (not drawing limits)
  • Inline MSPACE overlay — enter a viewport with double-click; edit model entities in place
  • VPORTS — preset viewport configurations (single, 2H, 2V, 4-way)
  • LAYOUTMANAGER / LAYOUTPANEL — GUI layout manager
  • PLOTSTYLEPANEL / STYLESMANAGER — plot style table editor (CTB/STB)
  • PRINT — send layout to system printer

Blocks & References

  • INSERT with attribute prompting (ATTREQ)
  • ATTEDIT — edit block attribute values interactively
  • REFEDIT / REFCLOSE — in-place block reference editing
  • XREF — attach, reload, and resolve external DWG/DXF references
  • DATAEXTRACTION — export entity property data to CSV

Snapping & Precision

  • Object snaps: Endpoint, Midpoint, Center, Node, Quadrant, Intersection, Perpendicular, Tangent, Nearest, Insertion, and more
  • Ellipse arc endpoints, LWPolyline arc midpoints, Hatch boundary points
  • Object Snap Tracking (OTRACK / F11)
  • Polar Tracking with configurable angle increment
  • Dynamic Input overlay (DYNMODE / F12)
  • Grid snap with adaptive spacing
  • Command history navigation (↑ / ↓)

Rendering

  • GPU-accelerated via WebGPU (wgpu)
  • 4× MSAA anti-aliasing
  • Orthographic and perspective camera
  • ViewCube with face/edge/corner snapping
  • Wide polylines: LWPolyline and Polyline2D filled strokes
  • Raster images: GPU-textured quad pipeline (IMAGE command)
  • Wipeout: Solid fill masking
  • Complex linetypes: Text and shape elements rendered in linetype patterns
  • White/black entity colors adapt to background luminance
  • Per-viewport background color (BACKGROUND)
  • Visual style selector (Wireframe, Shaded, etc.)
  • X-ray ghost pass for selected wires occluded by geometry

UI

  • Modular ribbon interface — Home, Insert, Annotate, View, Manage, Layout
  • Command line with autocomplete and history
  • Layer Manager with per-viewport freeze columns
  • Properties panel
  • COLORSCHEME — runtime theme switching
  • SHORTCUTS — keyboard shortcuts panel
  • SPLINEDIT — close, open, reverse spline control points
  • UCS icon with 3D foreshortening and axis labels

Installation

Linux (AppImage)

Download H7CAD-*-linux-x86_64.AppImage from the latest release, then:

chmod +x H7CAD-*-linux-x86_64.AppImage
./H7CAD-*-linux-x86_64.AppImage

No installation required — runs directly on any modern Linux distribution.

Windows

Download H7CAD.exe from the latest release and run it directly.

Build from Source

Requirements: Rust 1.75+

git clone https://github.com/HakanSeven12/H7CAD.git
cd H7CAD
cargo build --release --bin H7CAD
./target/release/H7CAD

License

GPL-3.0-only — see LICENSE