Getting Started
Core concepts and your first model.
box 40 30 10 | fillet 2 | faces top | hole 5
Pipe | simple shapes together and refine. That’s all.
PolyScript is a parametric CAD language for describing 3D models in concise code. Built on the OpenCascade kernel, it is designed for easier and safer 3D modeling.
box 80 60 10| – Chain operations left to right. Reading order = execution order# Create a case, round the edges, and cut a hole in the side
box 100 60 40
| faces >Z | shell 2
| edges =Z | fillet 3
| faces right | circle 4 | cut
PolyScript is ideal for:
Use PolyScript Playground right in your browser. No installation needed.
Parametric CAD tools that describe 3D models with code are gaining attention alongside advances in AI. Among them, CadQuery is an excellent CAD framework that lets you program any shape in Python.
However, being a general-purpose programming language is itself a weakness. You cannot safely execute 3D models created by others. To share our work safely, a DSL is essential.
Easy enough for children with no programming experience to use – that is the design concept behind PolyScript.
An LLM can write PolyScript. Where it stumbles is judging whether what it wrote is what was asked for. Both the language and the tools are designed around that step.
selector.empty), an operation that changed nothing (check.no-effect)
and a result split into several solids (check.multiple-solids) are reported with a code and a line number instead of
passing through as a plausible-looking shape.poly explain <code> gives
the reason and the remedy. Every subcommand accepts --json.poly verify runs the syntax check, the build, a per-step trace, the
measurements, a fingerprint and the post-build checks in one call. It is strict by default, so exit code 0 already
means “nothing silent was reported”.where column gives the centroid, normal and area of each
selection, so confusing faces >Z (the top) with faces =Z (the sides) is visible without an image.poly section returns the outline of a cut as a loop table in millimetres (area, length, bbox),
so “is it hollow” and “is the wall 2 mm” can be answered without reading a picture.poly build -o x.png puts front, top, right and isometric line drawings on one sheet, the
same drawing as the SVG, for models that take raster input only.poly diff say whether a refactor changed the geometry, and by how much.@param declares a dimension, and -D name=value overrides are checked against its type, range
and choices.poly skill install installs the modelling workflow (dimension table first, verify
with numbers before looking at pixels, the common mistakes, a reference of real-world dimensions) as an agent skill.The design starts from three things that are hard for an AI: images are expensive and stay in the context, mental simulation of 3D space is unreliable, and remembered numbers are not to be trusted. Hence numbers first, and one picture last.
PolyScript is built on top of many outstanding open-source projects.
Our deep gratitude goes to these projects and their communities.
Core concepts and your first model.
Build 3 models hands-on.
Full details on every operation.
Every subcommand and option of the poly command.
Quick reference to keep at hand.