Open editor
Guide

How to draw a 2D CAD drawing online

CADCraft gives you the command line, snaps and editing tools of desktop drafting in a browser tab. This walkthrough draws a small plate with holes, dimensions it and saves a DXF, and shows the habits that make command-line drafting fast.

Start a drawing

  1. Open the editor at cadcraft.run/editor.
  2. Start a drawing. Use File › New Drawing… (Ctrl/⌘+N), or type new {"metric": true} at the command line for metric defaults. Draw at full size: 1 unit = 1 mm.
  3. Find the command line at the bottom of the window. Click in the drawing area, then just start typing; AutoComplete shows matching commands and aliases.

How do you type coordinates?

Draw a plate with holes

  1. rectang 0,0 120,80 draws the 120 × 80 outline. (line 0,0 @120,0 @0,80 @-120,0 c does the same with lines; c closes the shape.)
  2. circle 60,40 15 adds a Ø30 bore at the centre; circle 15,15 4 adds the first Ø8 hole.
  3. copy the small hole: select it, press Enter, type 15,15 as the base point, then 105,15, 105,65 and 15,65 for the other three, and Enter to finish. (After the first copy, @ points count from the last point, not the base.)
  4. fillet, then r and 10 for a 10 mm radius; run fillet again, choose the Polyline option (p) and pick the outline to round all four corners at once.
  5. zoom e fits everything on screen.

offset makes parallel copies (walls, borders), trim and extend cut and stretch to other objects, mirror and array repeat geometry, and chamfer bevels corners. Each prompts for what it needs.

Layers and dimensions

A mounting bracket drawing in CADCraft with centre lines, dimensions, a hatched section and a title block
CADCraft’s mounting bracket sample, the kind of part drawing these commands build. Screenshot from the CADCraft project.

Save your drawing

File › Save (Ctrl/⌘+S) downloads it as a DXF file that other CAD and CAM programs open. For a PDF, SVG or PNG of the drawing, type saveas {"path":"plate.pdf"} with the extension you want. To continue later, open the DXF again; the guide to opening DXF files online covers the details.

Tips

FAQ

Do I need to know AutoCAD to use CADCraft?

It helps, because CADCraft follows the same command-line workflow, but the Tool Sets on the left and the menus reach the same commands with a click. Start typing a command name and AutoComplete shows the matches.

Millimetres or inches?

Drawing units are just numbers until you decide what they mean. For a metric drawing, type new {"metric": true} at the command line to start one with metric defaults, and draw 1 unit = 1 mm. Format › Units sets how numbers are shown.

Can I undo?

Yes. Ctrl/⌘+Z undoes and the u command steps back one command at a time. Undo works on every drawing command and edit.

How do I get a PDF of my drawing?

Type saveas {"path":"part.pdf"} at the command line. It downloads a PDF of model space fitted to the drawing. The Print dialog doesn’t produce a file in the browser build yet; the desktop app plots layouts to PDF.

Start drafting

Type your first line in the browser. Nothing to install.

Open the editor