Skip to content

Mazchoo/CAD-Designer-Web

Repository files navigation

Recording 2025-05-25 154926

Description

Basic 2D cad editing functionality fully in a web browser with high performance. Uses rust web assembly for underlying data manipulation and web-gpu for visualisation.

Currently supports:

  • Can select multiple objects
  • Can rotate, flip, scale and offset blocks
  • Can make edits on model level or on block level

Could be extended to support 3D visualisation or to accept dxf files. An example dxf in json form is given.

Basic Usage

image

Click select and then block to enable to select tool to select blocks. The arrow keys can be used to move around. Selecting pan (the default command) will panning by clicking on the mouse.

Once an object is selected it can be roated by selecting the square at the top of the bounding box, dragging and dropping the box moves the object around and dragging the edges of the box changes the scale.

Set-up for local hosting

Run

npm install
cargo install wasm-pack
npm run build-rust
npm run server-release

Web Gpu Requirements

The browser must support web-gpu else an error pop-up will be displayed. All chromium browsers should support web-gpu https://en.wikipedia.org/wiki/WebGPU#:~:text=Both%20Google%20Chrome%20and%20Firefox,of%20both%20WebGPU%20and%20WGSL. and in each case it should use native hardware for rendering.

Development Information

Use npm run server-debug to run the server on local host with un-mininified javascript.

About

Web app for a CAD editor

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors