How to design 3D-printable parts with AI using Nurb
By Flavio
Tagged: AI
Nurb turns a coding agent into a CAD partner. Learn how Python parts, OCCT solids, live checks, measurements, and 3MF export fit together.
I found Nurb through a post by Scott Tolinski. Nurb wasn’t the main topic, but the name sent me down a rabbit hole.
Josh Pigford created it.
You describe a physical part, and your coding agent models it. Nurb checks it, shows it in a live viewer, and gives you a file to print.
Unlike a text-to-3D generator, Nurb doesn’t ask a model to produce a mysterious mesh. It gives an existing coding agent a complete CAD workflow. The agent writes a parametric part as Python code, and Nurb builds it with a real CAD kernel, runs checks against the solid, and keeps you in the loop through a browser viewer.
What makes Nurb interesting is that the whole CAD workflow stays visible instead of getting hidden behind generated output.
What Nurb is
Nurb describes itself as agentic CAD for 3D printing.
You keep using the AI agent you already have. Nurb adds the specialized tools and instructions that let the agent design printable parts.
The workflow looks like this:
You still make the decisions while the agent handles the CAD operations. Nurb gives it a vocabulary, a design doctrine, measurements, tests, and feedback.
The viewer lets you orbit the part, cut it open with a section plane, and change dimensions with sliders. When the result looks right and the checks are clean, you export it.
A part is a Python function
Nurb parts are Python functions decorated with @part.
Here’s the shape of a part:
from nurb import *
@part
def hose_adapter(vac_end=57.6, tool_end=35.0, wall=2.4):
...
The function body uses build123d to create the geometry, and the keyword defaults act as the part parameters.
Nurb reads those defaults to build the viewer controls. A floating-point value becomes a continuous dimension, an integer becomes a stepped control, and a boolean becomes a switch.
There’s no second settings schema to maintain. Change wall=2.4 in the function and the default in the viewer changes too. Move the slider in the viewer and click write, and Nurb writes the chosen value back to the function.
It’s a small design decision, but it keeps the code, viewer, command line, variants, and tests pointing at the same parameters.
Nurb creates real CAD solids
Many AI 3D tools generate meshes. A mesh is a surface made of triangles. It can look right at a glance, but editing a single dimension later is painful because a hole isn’t stored as a diameter you can tweak, just a collection of triangles arranged in a ring.
Nurb’s Python function builds a B-rep solid instead, using build123d and the Open CASCADE Technology kernel. A B-rep keeps the mathematical boundaries of the part, so faces, edges, holes, fillets, and chamfers stay real CAD geometry.
That gives you a few practical advantages:
- dimensions remain parameters
- chamfers and fillets are real operations
- checks can inspect the exact solid
- STEP export keeps editable CAD geometry
- the same part can produce several variants
Nurb still generates triangles for the browser viewer and printer formats, but only as an output step after the solid is built.
The live viewer closes the loop
CAD work is visual, and valid Python can still produce the wrong shape. Both you and the agent need feedback while iterating.
nurb dev starts a long-running process that watches the project files. The first build can be slow while the CAD kernel loads, and after that most edits show up in the browser in under a second.
Whenever a file changes, the server rebuilds the part, turns it into a GLB scene, and pushes it to the viewer over a WebSocket. The camera doesn’t reset between updates, so you can keep looking at the same corner while the agent edits it. Alongside the 3D view, the viewer shows parameters, dimensions, check findings, variants, and export controls.
That means you can watch the part evolve instead of waiting ten minutes for a finished model. If the basic shape is off, you catch it before the agent spends time polishing the wrong design.
The agent skill is part of the product
The interesting part of Nurb isn’t just the CAD library. It also ships with an Agent Skill that teaches a coding agent how to use the tool.
The skill tells the agent to:
- start the live viewer early
- read Nurb’s design doctrine
- ask for missing measurements
- build a rough shape first
- inspect the exact faces behind a warning
- run printability checks after changes
- verify the result before export
- keep the user looking at the current part
That’s a great example of what an Agent Skill should do. Instead of cramming all of CAD into a giant prompt, it gives the agent a repeatable workflow and pulls detailed knowledge from the tool when needed.
If you want to build something like this for your own tools, my guide on how to write an Agent Skill covers discovery, instructions, scripts, safety boundaries, and evaluations.
Measurements are treated as data
With a one-off printed adapter, getting the real-world dimensions right is usually harder than building the geometry.
An agent can easily invent a plausible hose diameter, and the part will build, pass every geometry check, and still fail to fit the hose.
Nurb avoids that by storing real-world measurements in measurements.toml:
[shop_vac_hose]
value = 57.6
unit = "mm"
how = "measured with calipers"
The part reads that value with measured('shop_vac_hose'). If a measurement is missing, Nurb raises an error instead of letting the agent guess.
When you have to estimate a number, you can mark it as provisional. The part still builds, and nurb check keeps flagging that the measurement needs confirmation.
That’s one of my favorite ideas in the project: guesses stay visibly flagged until you measure and confirm them.
Cards give the next agent context
Each part can have a Markdown card sitting next to its Python file. It records what the part is, why it exists, key design decisions, and what was tried and rejected.
Nurb also writes an automatic block with facts measured from the build:
- dimensions
- volume
- solid and face counts
- check results
- variant results
That gives the agent memory across sessions. The ## Don't section is especially useful: if a chamfer was removed because it broke a mating surface, the next agent sees why instead of adding it right back.
nurb diff compares the current solid against the facts saved on the card, so a change that quietly drops faces or shifts the volume stands out even if the model still looks fine from one angle.
The checks turn print physics into feedback
nurb check runs printability rules directly against the built solid, catching issues like:
- multiple loose solids
- unsupported overhangs and floating regions
- blind-hole ceilings
- walls that are too thin
- tiny sliver faces
- unstable parts
- large first layers that may warp
- pins that are too thin
- parts outside the printer’s build volume
Each finding includes coordinates and points right at the problem geometry in the viewer.
By default, nurb check reports findings without blocking your iteration loop. When you want a clean run to be required, including in CI, run it in strict mode:
nurb check --strict
Keep in mind how some of these checks work under the hood. The minimum-wall rule, for example, samples the solid with probes, so it can miss a narrow pinch that falls between sample points. A clean run catches obvious mistakes fast, and you’ll still want to inspect tight spots yourself before slicing.
Nurb goes beyond geometry
Nurb connects the 3D model to the rest of the printing workflow.
In printer.toml, you can set your printer and material so the checks know your build volume, nozzle size, and how much that material tends to warp.
nurb slice hooks into a local OrcaSlicer or Bambu Studio install to estimate print time and filament weight.
nurb stress runs an approximate voxel simulation that shows where load concentrates, how much a part might sag, and the margin before failure. It’s best used to compare two candidate designs side by side rather than for structural certification on load-bearing or safety-critical parts.
Nurb can also inspect phone scans and downloaded meshes. You bring in a scan as reference geometry, and the agent rebuilds the useful shape as a parametric part instead of trying to edit triangles directly.
For multi-part designs, assemblies let you position pieces together and sweep a hinge through its range of motion. A box and lid can each print fine on their own and still collide when you open them, so assembly checks catch problems single-part checks miss.
Install Nurb
The easiest way to get started on macOS is the Nurb app, which puts the project, agent chat, and viewer in one window. Downloads are available for both Apple silicon and Intel Macs.
If you’d rather use the command-line tool, run the installer:
curl -fsSL https://nurb.dev/install.sh | sh
That adds uv if needed, installs Nurb, and sets up the Agent Skill.
If you prefer to manage each step yourself, install the Python package first:
uv tool install nurb
Then install the skill separately:
npx skills add shpigford/nurb --skill nurb
Any directory with a parts/ folder works as a Nurb project, so there’s no special initialization format to learn.
Open your agent in that directory and describe a small part:
Make an adapter that connects my shop vac hose to the dust port on my table saw.
From there, the agent sets up the project, starts nurb dev, gives you the viewer URL, and puts together a rough part you can review.
How I would use Nurb
Start with a boring physical problem: a cable guide, a small bracket, a holder, or an adapter. The dimensions are easy to measure, the filament cost is tiny, and a bad print just means trying again.
A solid loop looks like this:
- Measure every surface that needs to fit.
- Ask the agent for a rough parametric part.
- Inspect it in the live viewer.
- Tweak the free dimensions with sliders.
- Print a small fit coupon if a mating profile is uncertain.
- Run the strict checks.
- Compare print time and material use.
- Export the 3MF and run one test print.
Keep the first design simple. When a part needs multiple moving pieces, tight tolerances, or a complex load path, dial in one interface at a time instead of trying to nail the whole assembly in one shot.
Skip Nurb for character models, organic sculpture, or anything where a mesh sculpting tool makes more sense, and don’t rely on it as your only check for parts where failure could hurt someone. It fits best when you’re printing functional FDM parts, like a bracket, clip, or adapter built to solve one specific problem.
The current limits
Nurb is moving fast, and the package is still marked as alpha. Commands, checks, and the app itself can change between when I write this and when you try it.
The project also lists a few missing pieces:
- there’s no hosted configurator
- the viewer doesn’t have measurement tools yet
- some checks use sampling and can miss a problem
- real-world fit still depends on real measurements
The modeling, checks, viewer, and exports all run locally. Your AI agent might still use an online model, depending on the agent and subscription you choose.
The source is public on GitHub, though it isn’t a standard open source license from day one. Nurb uses the FSL-1.1-MIT license, which is source-available and blocks competing products for two years before each release converts to MIT.
Why I find Nurb interesting
Nurb puts a conversational interface on top of CAD while keeping the source of truth in the Python function, the measurements file, the card, and the checks.
Because those constraints live outside the agent’s memory, it can iterate quickly without hiding the CAD system underneath. I like that I’m still judging the part and deciding when it’s ready to print, stepping in whenever the design drifts from what I meant, while the agent works directly on the real CAD files and checks.
Want me to talk about your product? You can sponsor this site.
Related posts about ai: