Best for · AI tools
How to use VS Code, OpenSCAD and Claude together to design 3D models
- Last checked
- 5 sources, linked below
- By the vectaai team
We read every plan page. Paid links are labelled. Money never changes a ranking. How we pick.
Verdict Our pick
The bar guide has a call.

- this setup if you design parametric parts for 3D printing and want an assistant that writes and edits the code while you watch the shape.
Compared here
- 01Claude Code extension for VS Code
- 02OpenSCAD extension for VS Code
- 03OpenSCAD command line export
Short answer
Install OpenSCAD, then in VS Code install two extensions: the OpenSCAD extension (syntax highlighting, Preview and Export buttons) and Claude Code (Anthropic's assistant panel). In OpenSCAD, turn on Design, Automatic Reload and Preview, so every time Claude edits and you save the .scad file, the preview updates. Then ask Claude in the side panel to write or change the model in small steps, and let it run OpenSCAD's command line to export a PNG or STL, such as openscad -o part.stl part.scad, so you can check the result.
Pick this setup if you design parametric parts for 3D printing and want an assistant that writes and edits the code while you watch the shape. You need VS Code 1.94.0 or later and a paid Claude plan (Pro is $20 a month, or $17 a month billed yearly) or a Claude Console account. Keep prompts small, give real dimensions in millimetres, and always check the render before you print.
Sponsored links. We may earn a commission; it never changes the pick.
At a glance
| Piece | What it does | Cost | Where it comes from |
|---|---|---|---|
| OpenSCAD | Renders .scad code into 3D models; exports STL and PNG | Free, open source | openscad.org downloads |
| OpenSCAD extension for VS Code | Syntax highlighting, snippets, Preview and Export buttons, cheatsheet | Free | VS Code Marketplace (Antyos) |
| Claude Code extension | Chat panel that edits files with diffs, plan mode, @-mentions | Needs Pro ($20/mo or $17/mo yearly), Max, Ultra, Team, Enterprise or Console | VS Code Marketplace (Anthropic) |
| VS Code | The editor that holds it together | Free | Version 1.94.0 or later for Claude Code |
Money talk first. Anthropic has no affiliate deal with us that we know of; our Claude link goes to its plan page. OpenSCAD and both VS Code extensions are free. So nobody pays us for this setup, which suits us fine: the best part of it costs nothing.
The honest part: we did not print parts with this exact setup for this page. Every install step, setting and command is quoted from the official docs listed in the sources, read on 3 December 2026. The workflow tips are plain practice, and we flag them as tips.
What each piece does
- OpenSCAD turns code into 3D models. You write
cube([20,10,5]);and get a box. Because the model is code, an AI that writes code can write it. - VS Code is where you edit the code.
- The OpenSCAD extension makes VS Code understand
.scadfiles and adds Preview and Export buttons. - Claude Code sits in a side panel in VS Code, reads your files, proposes edits as diffs, and can run commands with your permission.
Together: you describe a part, Claude writes the code, OpenSCAD shows it, you correct, repeat.
Step 1: install OpenSCAD
Download it from openscad.org. Stable releases are offered for macOS, Windows and Linux, plus BSD, Docker and WebAssembly. The page also offers nightly development snapshots and suggests enabling the Manifold geometry engine in Preferences for a "huge performance boost". Nightlies are fine for hobby work; use stable if you want fewer surprises.
Step 2: install the OpenSCAD extension in VS Code
The community vscode-openscad extension adds:
- Syntax highlighting, including customizer syntax for drop-downs, sliders and tabs.
- Preview and Export buttons in the editor title bar.
- Snippets and a built-in OpenSCAD cheatsheet.
Setup notes from its README:
- If OpenSCAD is in the default location, the extension should find it. If not, set Settings > Extensions > OpenSCAD > Launch Path (
openscad.launchPath). - On Windows, point it at
openscad.exeso it can manage previews and exports properly. - The README says it works with OpenSCAD v2019.05; newer versions may behave differently, so test.
Step 3: turn on auto-reload in OpenSCAD
This is the step that makes the whole thing feel live. In OpenSCAD, enable Design > Automatic Reload and Preview. Per the extension README, once enabled, "When you save your file in VSCode, OpenSCAD will automatically reload and preview the updated file."
Open your .scad file in VS Code, click Preview in OpenSCAD, and put the two windows side by side.
Step 4: install Claude Code in VS Code
From Anthropic's VS Code docs:
- Requirements: VS Code 1.94.0 or later, and an Anthropic account with any paid Claude subscription (Pro, Max, Ultra, Team or Enterprise) or a Claude Console account. No API key needed.
- Install: open Extensions (
Cmd+Shift+Xon Mac,Ctrl+Shift+Xon Windows and Linux), search "Claude Code", click Install. If it does not show up, run "Developer: Reload Window". - Open it: click the Spark icon in the editor toolbar (top right; it only appears when a file is open), or use the Activity Bar, the Command Palette, or the Claude Code item in the status bar.
Plans, from Claude's pricing page: Pro is $20 a month or $17 a month billed yearly ($200 up front), Max $100, Ultra $200. The Free plan does not include Claude Code. For hobby CAD, Pro is plenty; our Claude Pro vs Max page explains when it is not.
Step 5: set Claude's permission mode
The docs list four modes:
- Manual: Claude asks before file edits and most shell commands, and shows a side-by-side diff. Start here.
- Plan: Claude describes what it will do and waits for approval; VS Code opens the plan as a Markdown document you can comment on. Great for a new part.
- Auto: a classifier reviews most actions instead of asking you.
- Edit automatically: Claude edits without asking.
For CAD, Manual or Plan keeps you in control of every dimension.
Step 6: let Claude render and export from the command line
OpenSCAD can export without opening its window. From the OpenSCAD manual:
openscad -o part.stl part.scad
openscad -o part.png --imgsize 1024,1024 part.scad
openscad -o part.png --render --imgsize 1024,1024 part.scad
-osets the output; the file extension picks the format.- PNG export uses preview mode by default;
--rendergives the full CGAL render. -Doverrides a variable, for example-D 'width=40'in bash. The manual notes the variable must be initialized in the file first.- The CLI defaults to ASCII STL; add
--export-format asciistlto be explicit in scripts.
Ask Claude to run the PNG export after a change, then @-mention the PNG in the chat (the docs describe @-mentions for files and folders, and Option+K or Alt+K inserts one). Now the picture is in the conversation as well as the code.
A prompt loop that works
These are practice tips, not official docs:
- Start with a plan. "In plan mode: design a wall bracket for a 25 mm pipe, 4 mm walls, two M4 screw holes 40 mm apart. Use variables for every dimension at the top of the file."
- Ask for parameters, not magic numbers. Variables make the model easy to tweak, and
-Dcan override them from the command line. - One change at a time. "Add a 2 mm chamfer to the outer edges." Then look. Then the next change.
- Name modules. "Put the screw hole in a module called screw_hole()." Easier for you and for Claude to edit later.
- Check printability yourself. Overhangs, wall thickness and tolerances need a human eye and your slicer.
- Save a CLAUDE.md-style note in the project with your printer, nozzle size and preferred tolerances, so you do not repeat them every session. (Claude Code reads project instruction files; check its docs for the current file name and behaviour.)
Common problems
- Preview not updating: Automatic Reload and Preview is off in OpenSCAD, or you did not save after accepting the diff.
- Extension cannot find OpenSCAD: set the Launch Path; on Windows, point it at
openscad.exe. claudenot found in the terminal: the docs note that installing the extension does not putclaudeon your shell PATH; the panel works without it, or install the standalone CLI.- Usage limits: prompt suggestions and long sessions count toward your plan; run
/usageto check, per the docs. - Geometry errors: ask Claude to simplify, or render with
--renderto see the real result rather than the fast preview.
Pick this if
- Pick this setup if you design parametric parts, enclosures or jigs and like seeing code and shape side by side.
- Pick OpenSCAD alone if you enjoy writing the code and only want AI for the occasional question in a browser.
- Pick a regular CAD tool if your parts are organic shapes, sculpted forms or assemblies with complex constraints. OpenSCAD shines on geometry you can describe with numbers.
For picking a model for code work in general, see our best AI model for coding guide.
How we checked
We read Anthropic's Claude Code VS Code docs, Claude's pricing page, the vscode-openscad README, OpenSCAD's downloads page and the OpenSCAD manual's command line chapter on 3 December 2026. Prices were shown in US dollars. We did not print parts with this exact setup; the prompt loop is practice advice, labeled as such. When the official docs change, they win. More on our method on how we pick, and more AI tools live in the AI tools hub.
Questions people ask
Can Claude write OpenSCAD code?
Yes. OpenSCAD models are plain text code, and Claude can write and edit .scad files like any other code. Results are best for parametric, geometric parts: brackets, boxes, enclosures, spacers. Give exact dimensions, wall thickness and which features matter, and build in small steps. Always check the preview before printing.
How do I get the OpenSCAD preview to update when Claude edits the file?
In OpenSCAD, turn on Design, Automatic Reload and Preview. The OpenSCAD extension's README says that once this is on, saving your file in VS Code makes OpenSCAD reload and preview it. Open the preview with the extension's Preview in OpenSCAD command, then accept Claude's edit and save.
Do I need a paid Claude plan for this?
For Claude Code in VS Code, yes. Anthropic's docs say you need any paid Claude subscription (Pro, Max, Ultra, Team or Enterprise) or a Claude Console account; no API key is required. Claude's pricing page lists Pro at $20 a month, or $17 a month billed yearly, and says the Free plan does not include Claude Code.
How can Claude check what the model looks like?
Ask Claude to export a picture with OpenSCAD's command line, for example openscad -o part.png --imgsize 1024,1024 part.scad, then @-mention the PNG in the chat so it is part of the context. You still need to look yourself: a picture does not show wall thickness or tolerances.
Is there a better AI for OpenSCAD than Claude?
We did not run a head-to-head test across models, so we will not crown one. Any strong coding assistant can write OpenSCAD. What makes the workflow good is the setup on this page: live preview, small steps, real dimensions and command-line renders. Claude Code's diffs and plan mode just make it comfortable inside VS Code.
Sources
Every fact above comes from these pages. Prices change, so each one carries the date we read it.
- Claude Code docs: VS Code, checked 3 Dec 2026
- Claude pricing, checked 3 Dec 2026
- vscode-openscad extension (GitHub README), checked 3 Dec 2026
- OpenSCAD downloads, checked 3 Dec 2026
- OpenSCAD User Manual: Using OpenSCAD in a command line environment, checked 3 Dec 2026