{"slug": "cadrs-native-open-source-onshape-clone-in-rust-and-occt", "title": "CADrs – native open source onshape clone in Rust and occt", "summary": "Developer rvdende released cadrs, an open-source parametric CAD application written in Rust with a Bevy UI and the OpenCASCADE modeling kernel, following Onshape's sketch-part-assembly-drawing workflow. The project is described as early and moving fast, with file formats that may still change, and it includes an MCP server that lets AI assistants such as Claude Code, Claude Desktop and Cursor drive the running app over Streamable HTTP at http://127.0.0.1:7680/mcp on loopback only. The app covers sketching with a least-squares constraint solver, part features including fillet, shell, draft and ISO/ANSI hole tables, assemblies with mates and bills of materials, drawings, linear static FEA, PCB Studio with IDF import and export, and STEP, IGES and STL import and export.", "body_md": "**A parametric, feature-based CAD app written in Rust**, with a Bevy UI and an OpenCASCADE\nmodeling kernel. Its workflow follows Onshape's: sketch on a plane, constrain and dimension,\nbuild parts from features, put them together in assemblies, and make drawings from them.\n\n**Status: early and moving fast.** cadrs works through the Onshape Learning Center's CAD\nBasics courses exercise by exercise, but it is not yet a finished tool. Expect rough edges,\nand file formats that may still change.\n\n- **Sketching** : lines, rectangles, circles, arcs, splines, Bézier curves, ellipses, polygons,\nslots, points and text. Snapping and inference to points, midpoints, centres, intersections,\nalignments and part edges. Geometric constraints and driving dimensions, with a\nleast-squares solver that keeps the sketch consistent while you drag. Trim, extend, split,\noffset, mirror, patterns, and Use (project) of part edges.\n- **Part Studios** : extrude, revolve, sweep, loft, fillet, chamfer, shell, draft, hole\n(counterbore, countersink, tapped; ISO and ANSI tables), linear and circular patterns,\nmirror, booleans, Transform, planes, mate connectors, thicken, fill and helix. Every feature\ncan be edited later, and the part rebuilds.\n- **Assemblies** : instances, fastened, revolute, slider, cylindrical, planar and other mates,\na triad to move parts, mate connectors, exploded views and a bill of materials.\n- **Drawings** : standard and projected views, sections, dimensions, annotations, callouts\nand BOM tables.\n- **More** : versions and history, derived parts and linked documents, a variable table and\nexpressions, measurement and mass properties, linear static simulation (FEA), a path-traced\nrenderer, PCB Studio with IDF import and export, and STEP, IGES and STL import and export.\n- **Drag and drop** : drop SVG, EPS, PDF, DXF or DWG drawings onto a Part Studio or an open\nsketch to get editable sketch curves, pictures to place them, and STEP, IGES or STL models to\nimport them (EPS and PDF need Ghostscript and Poppler installed).\n- **Onshape import** : bring your own Onshape documents across with their feature history\ninstead of dead STEP geometry ([tools/onshape](https://github.com/rvdende/cadrs/blob/main/tools/onshape/README.md) ).\n\n*From sketch to part to PCB, in one document. [Watch the 90-second demo](https://youtu.be/qT1FKZqUAxA).*\n\nYou need a stable Rust toolchain ([rustup](https://rustup.rs)), CMake and a C++ compiler.\nThe first build compiles OpenCASCADE from source, which takes several minutes; later builds\nare incremental.\n\nOn Debian or Ubuntu, Bevy also needs these:\n\n```\nsudo apt install cmake g++ pkg-config libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev\n```\n\nThen:\n\n```\ngit clone https://github.com/rvdende/cadrs\ncd cadrs\ncargo run --release\n```\n\nOn macOS, CMake from Homebrew (`brew install cmake`) and the Xcode command line tools\n(`xcode-select --install`) are enough; it builds and runs natively on Apple Silicon (Metal).\n\nDocuments are stored in your platform's data folder (on Linux, `~/.local/share/cadrs/`).\n\nA Windows build can be cross-compiled from Linux with MinGW:\n`cargo build --release --target x86_64-pc-windows-gnu`.\n\nThe mouse and keys follow Onshape's: right-drag orbits, middle-drag pans, and the wheel zooms\ntoward the cursor. **Shift+S** starts a sketch, **Shift+E** an extrude, **N** views normal to\nthe sketch plane, **Shift+7** gives the isometric view, and **F** zooms to fit. **Shift+/**\n(or Help › Keyboard shortcuts) lists the rest.\n\ncadrs has an MCP server (Model Context Protocol), so an AI assistant on your machine (Claude\nCode, Claude Desktop, Cursor, …) can drive the running app: create documents, draw sketches,\nadd and edit features, read back faces and edges, export STEP and take screenshots. Turn it on\nin **Preferences › AI assistants (MCP)**; the app then serves Streamable HTTP on\n`http://127.0.0.1:7680/mcp` (loopback only; the port is a preference). Every tool call runs\nthrough the command layer, so the assistant's steps show in the feature list and undo like\nyour own.\n\nThe repository's `.mcp.json` registers the server with Claude Code for this project (approve\nit with `/mcp` the first time; `claude mcp list` shows whether it is connected). Elsewhere,\n`claude mcp add --transport http cadrs http://127.0.0.1:7680/mcp` does the same, and other\nclients take the URL in their MCP settings.\n\nThe tools: `create_document`, `open_document` and `get_document`; `add_part_studio`;\n`add_sketch` (rectangles, circles, polygons, lines and arcs on a default plane, a part face or\na Plane feature); `extrude`; `add_feature`, `edit_feature`, `get_feature` and `delete_feature`\nfor any feature type from JSON; `list_faces` and `list_edges` for the references fillets,\nchamfers and sketches take; `import_step` and `export_step`; `screenshot`; `run_scenario` for\nscripted UI steps; and `undo`. `crates/cadrs_mcp` is the server and the tools' schemas;\n`crates/cadrs_app/src/mcp.rs` runs the calls on the app.\n\n```\ncargo test --workspace                    # all tests\ncargo clippy --workspace --all-targets    # lints\ncargo run -- --headless --scenario <name> # run a scripted scenario, saving screenshots\n```\n\nScenarios (`scenarios/*.ron`) drive the real app with synthetic input and write PNGs to\n`target/scenarios/<name>/`. The golden tests in `crates/cadrs/tests/golden.rs` compare them\nwith baselines kept on your machine (`tests/golden/`, not committed); the first run records\nthem, and `CADRS_BLESS=1` saves new ones.\n\n| Crate | What it is | \n|---|---|\n| `cadrs` | The binary: command-line flags, windowed or headless | \n| `cadrs_app` | The app's Bevy plugins: documents page, tabs, viewport, tools and dialogs | \n| `cadrs_ui` | A reusable Bevy widget library (theme, buttons, inputs, menus, dialogs, lists) | \n| `cadrs_core` | The document model, features, rebuild, commands and undo, persistence (no Bevy) | \n| `cadrs_sketch` | Sketch geometry, constraints, the solver, snapping and hit testing (no Bevy) | \n| `cadrs_kernel` | Our solid-modeling API over OpenCASCADE, with persistent face and edge names | \n| `cadrs_drawing` | Drawing views, projection and annotations | \n| `cadrs_fea` | Linear static finite-element analysis | \n| `cadrs_render` | A CPU path tracer for photorealistic renders | \n| `cadrs_idf` ,`cadrs_pcb` | IDF files and PCB boards | \n| `cadrs_onshape` | The Onshape document importer | \n| `cadrs_harness` | Scripted scenarios, synthetic input and screenshots | \n| `cadrs_mcp` | The MCP server through which AI assistants drive the app | \n\n[crates/cadrs_kernel/README.md](https://github.com/rvdende/cadrs/blob/main/crates/cadrs_kernel/README.md) describes the modeling layer:\nthe kernel API, persistent face and edge naming, and the OpenCASCADE backend. The notes in\n`reference/onshape/` record how Onshape behaves, which is what cadrs is measured against.\n\nLicensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](https://github.com/rvdende/cadrs/blob/main/LICENSE-APACHE) or[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) )\n- MIT license ([LICENSE-MIT](https://github.com/rvdende/cadrs/blob/main/LICENSE-MIT) or[http://opensource.org/licenses/MIT](http://opensource.org/licenses/MIT) )\n\nat your option.\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n\nThird-party parts keep their own licenses: the [Inter](https://rsms.me/inter/) font is under\nthe SIL Open Font License ([assets/fonts/OFL.txt](https://github.com/rvdende/cadrs/blob/main/assets/fonts/OFL.txt)), and\n[OpenCASCADE](https://dev.opencascade.org/) under the LGPL 2.1 with the OCCT exception.\n\ncadrs is an independent project. It is not affiliated with, endorsed by or sponsored by PTC or Onshape. Onshape is a trademark of PTC Inc. cadrs uses its own icons, font and branding.", "url": "https://wpnews.pro/news/cadrs-native-open-source-onshape-clone-in-rust-and-occt", "canonical_source": "https://github.com/rvdende/cadrs", "published_at": "2026-10-17 08:28:50+00:00", "updated_at": "2026-10-17 08:30:16.517280+00:00", "lang": "en", "topics": ["developer-tools", "ai-agents", "agent-protocols", "artificial-intelligence"], "entities": ["cadrs", "rvdende", "Rust", "Bevy", "OpenCASCADE", "Onshape", "Claude Code", "Cursor"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/cadrs-native-open-source-onshape-clone-in-rust-and-occt", "markdown": "https://wpnews.pro/news/cadrs-native-open-source-onshape-clone-in-rust-and-occt.md", "text": "https://wpnews.pro/news/cadrs-native-open-source-onshape-clone-in-rust-and-occt.txt", "jsonld": "https://wpnews.pro/news/cadrs-native-open-source-onshape-clone-in-rust-and-occt.jsonld"}}