CADmium-Co / CADmium
- суббота, 25 мая 2024 г. в 00:00:05
A CAD program that runs in the browser
This project aims to create a new CAD program from scratch. It is small, it runs in a web browser, and the source code is available for free here on Github.
Legacy CAD programs have taken many thousands of years of collective engineering time to get where they are so this program will never be able to compete on breadth of features. But CADmium is intended to capture 80% of the most common CAD use cases while doing less than 10% of the work. For now I am targetting the home hobbyist who just wants to design a widget for their 3D printer, not a company that wants to design a car or airplane.
If you're looking for:
Then this project may be for you!
Status: Early prototype. This tool is not yet an MVP, but is being developed in the open. Please do not share this to HN or Reddit or things like that.
I am currently racing toward an MVP, which I expect to release as version 0.1 in April, 2024. After that I hope to get a small group of users together to help guide me toward a version 1.0 release which will be more fully featured and which may serve as a solid foundation for hobbyists: all of it free, source available, and local-only.
Beyond that, I will try to monetize by offering a hosted version of the software as a paid product. To achieve this I will introduce a notion of users, accounts, sharing, and a public commons. All of the actual CAD functionality, including the ability to read and modify .cadmium files, will always be available for free here on Github in a local-only form.
The boundary representation engine under the hood is truck, which is written in rust and is not dependent on any legacy b-rep engine.
Leveraging truck, I wrote a small rust library called cadmium which provides structs for projects, workspaces, sketches, extrusions, and constraints. My goal is that this rust library provides all the same functionality as the UI for anyone who prefers code-first CAD. This library is able to save and load projects to disk as json. I have also built a set of javascript bindings so that the whole thing can be compiled to wasm and run in a browser.
The UI is built with SvelteKit and Tailwind. It is hosted here on github pages. I use three.js for rendering, which in this case uses WebGL under the hood. I use Threlte to manage the scene graph decaratively.
This software is offered under the Elastic License 2.0. In summary, you can do whatever you like with this software except offer it as a service to others.
If you're just trying to kick the tires, click here to view the live web demo.
To build locally using pnpm workspace & turbo:
git clone https://github.com/Cadmium-Co/CADmium.git
cd CADmium
pnpm build:wasm
pnpm install
pnpm dev
We use pnpm to manage the monorepo. Please follow the instructions here to install: https://pnpm.io/installation#using-a-standalone-script
If you're new to node you can use pnpm to manage nodejs:
# https://pnpm.io/cli/env#use
pnpm env use --global 20
First install rust using rustup: https://rustup.rs
Then install wasm-pack
cargo install wasm-pack
turbo test
Playwright is used for e2e testing. You may be prompted with a command to install it.
For manjaro/archlinux folks it may report missing dependencies. On manjaro the missing dependencies are solved thanks to this comment:
yay -S aur/enchant1.6 aur/icu66 aur/libwebp052
Watch vitest unit tests only:
cd applications/web
pnpm test:unit -w
I am not currently able to handle contributions. After the 0.1 release in April I will be looking for help in a few areas:
Design: The tool must look and feel good and I am not a designer. I would love contributions in the form of:
Rust: This is my first project in rust. I need an experienced rustacean's help to:
Svelte: This is my first project using Svelte. I'd love an experienced set of eyes to:
Users: I need to gather a small userbase of hobbyists and engineers who can use the tool to design a lot of actual parts to help me find
Business: I have quit my job and I am working on this full time. I'd love your help if you know how to:
If you feel like you would be willing and able to help, please join my discord!