Refactor the per-viewport blit so a content viewport whose screen rect extends off the canvas composites the correct slice of its MSAA target to the visible portion of the surface, instead of being slammed against the canvas corner by an `(f32 as u32)` saturation on the negative offset. - blit.wgsl + Pipeline gain a small uniform buffer (`uv_offset` / `uv_scale`). `Primitive::prepare` computes the per-viewport crop from `screen_rect`'s on-canvas fraction and writes it via the new `upload_blit_uv` helper while it still has the `Queue`. - `Pipeline::render` now takes `vp_size` (full vp — MSAA / camera size) and `surface_dest` (visible intersection — blit destination) and reads the crop from the uniform; passes that don't have a non-empty surface intersection are skipped. - `Primitive::render` clips the full vp rect against the surface clip in `i32` and skips empty intersections. The earlier "skip GPU for inactive off-canvas viewports" workaround in `active_viewports` is no longer needed. - ViewCube draws only when its hosting vp is fully on-canvas (its own pipeline writes directly to the surface and would distort under a clamped `set_viewport`). With the GPU path correct for every vp position, drop `viewport_content_wires` from `paper_canvas_wires` — the inactive viewport CPU projection was only there to mask the blit bug and was duplicating the unified shader's output. The hit-test / snap path (`entity_wires_arc`, `wires_for_block`) still calls `viewport_content_wires` directly, so picking through inactive viewports keeps working. Co-Authored-By: Claude Opus 4.7 <[email protected]>
Open CAD Studio
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
DIMSTYLEsupport (DIMASZ,DIMSCALE,DIMEXO,DIMEXE, and more) - Text:
MTEXT,TEXT,DTEXTwith font browser (STYLE DIALOG) - Leaders:
MLEADERwith straight and spline path types;MLEADERSTYLEmanager - Tolerances: GD&T feature control frames
- Tables:
TABLEentity render;TABLESTYLEmanager - MLine:
MLINEentity withMLSTYLEmanager andEXPLODEsupport
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 managerPLOTSTYLEPANEL/STYLESMANAGER— plot style table editor (CTB/STB)PRINT— send layout to system printer
Blocks & References
INSERTwith attribute prompting (ATTREQ)ATTEDIT— edit block attribute values interactivelyREFEDIT/REFCLOSE— in-place block reference editingXREF— attach, reload, and resolve external DWG/DXF referencesDATAEXTRACTION— 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 (
IMAGEcommand) - 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 switchingSHORTCUTS— keyboard shortcuts panelSPLINEDIT— close, open, reverse spline control points- UCS icon with 3D foreshortening and axis labels
Installation
Linux (AppImage)
Download OpenCADStudio-*-linux-x86_64.AppImage from the latest release, then:
chmod +x OpenCADStudio-*-linux-x86_64.AppImage
./OpenCADStudio-*-linux-x86_64.AppImage
No installation required — runs directly on any modern Linux distribution.
Windows
Download OpenCADStudio-*-windows-x86_64.exe from the latest release and run it directly. Windows SmartScreen may show "Windows protected your PC" because the binary is not yet code-signed — click More info → Run anyway.
macOS (Apple Silicon)
Download OpenCADStudio-*-macos-arm64.dmg from the latest release — Apple Silicon (M-series) only; Intel macOS isn't built.
Open the .dmg and drag OpenCADStudio.app to /Applications. The first launch may be blocked by Gatekeeper because the app is not notarised — right-click OpenCADStudio.app → Open and confirm, or run once via xattr -dr com.apple.quarantine /Applications/OpenCADStudio.app.
Build from Source
Requirements: Rust 1.75+
git clone https://github.com/HakanSeven12/OpenCADStudio.git
cd OpenCADStudio
cargo build --release --bin OpenCADStudio
./target/release/OpenCADStudio
License
GPL-3.0-only — see LICENSE