<!-- Markdown copy of https://popkern.dev/ -->

# A CAD kernel for everyone who makes things.

popkern is a parametric boundary-representation geometry engine for solid CAD. It lets anyone build complex parts with simple code, backed by research-class CAGD algorithms, with interactive script editing and MCP support. It's open source, free forever, and aiming to be one of the best kernels available.

[Try it now](https://popkern.dev/live/) [Install](https://popkern.dev/install/) [Support popkern](https://popkern.dev/support/)

[Read the launch post](https://popkern.dev/blog/announcing-popkern.html)

![A six-axis robot arm: a white base and shoulder, grey tube links, finned cycloidal joint housings at every axis, and an orange-jawed gripper on the tool flange.](https://popkern.dev/assets/img/six-axis-arm.png)

A six-axis arm in [popkern live](https://popkern.dev/live/), having 1,198 features and 57 parts

## Made with popkern

Every one of these is an example in [popkern live](https://popkern.dev/live/), rendered there. Open one and the same script builds the same model in your browser. Each had to be proven watertight to ship.

![Three cycloidal joint modules of decreasing size, each a finned grey housing with a blue output flange.](https://popkern.dev/assets/img/cycloidal-joints.png)

**Cycloidal joints** The arm's three joint sizes, each a motor driving a cycloidal reducer, including discs, ring pins, output pins and a cross-roller bearing.

![A planetary gear set seen from above: an orange ring gear, green planets, a blue sun and a purple carrier.](https://popkern.dev/assets/img/planetary-gearbox.png)

**Planetary gearbox** A 4:1 set as an assembly. Every involute tooth is computed in the script.

![A hex bolt with its nut threaded on, a socket-head cap screw and a countersunk screw, each in its own color, all with modeled threads.](https://popkern.dev/assets/img/fastener-kit.png)

**Real threads** An M6 bolt and nut, a cap screw and a countersunk screw. Threads are modelled to ISO spec rather than applied as mere textures.

![A centrifugal impeller: seven curved blades inside a round shroud, around a central bore.](https://popkern.dev/assets/img/impeller.png)

**Centrifugal impeller** Seven backswept blades carved by one star-shaped cut whose spiral walls the script computes.

![A rounded block corner in black and white zebra stripes that bend smoothly through the corner.](https://popkern.dev/assets/img/zebra-corner.png)

**Smooth where rounds meet** Three different radii closing on one corner. The stripes of the zebra view flow through unbroken, thanks to a certified curvature-continuous cap.

![Three coil springs: a compression spring, a tapered spring and a left-hand spring.](https://popkern.dev/assets/img/coil-springs.png)

**Three springs from one verb** Compression, tapered and left-hand springs, each swept along an exact helix.

---

## Parts are scripts

Every popkern part is a short [Rhai](https://rhai.rs/) script. Rhai is a small and friendly scripting language, and the same script builds the same part in your browser or on your own machine.

Bigger parts grow as projects. A project is a folder of numbered migration scripts, each picking up where the last one left off, much like database migrations. A later step can reach back and change an earlier feature, and the history scrubber replays the part one step at a time. Projects are git friendly and convertible via `popkern build` into a `.pkn` document or a STEP file from the command line.

```
// migrations/001_plate.rhai
let m = model();
m.profile(xy()).rect(2.4, 1.6)
    .sketch("plate_sketch").extrude(blind(0.4));
m

// migrations/002_boss.rhai
let m = previous();
let boss = m.tool(|m| m.profile(xy_at(0.2))
    .circle(0.35).sketch("boss_sketch").extrude(blind(0.8)));
m.active().union(boss);
m

// migrations/003_rounds.rhai
let m = previous();
m.active().fillet(edges().between("cylinder", "plane"),
    0.08, #{ label: "rounds" });
m
```

---

## What works today

Quite a lot, actually! Booleans, fillets and chamfers (with properly smooth corners), sweeps, revolves and lofts, shelling, sketches with constraints, STEP in and out, and a full feature tree with undo.

It's also early, so plenty doesn't work yet. The [launch post](https://popkern.dev/blog/announcing-popkern.html) is honest about what's missing.

## Agent-built, test-verified

popkern is written by AI agents, working from published research under human direction. Every change has to pass thousands of automated tests and the kernel's own validation before it is committed, and results are cross-checked against OpenCASCADE wherever the two can be compared. When an operation can't produce a valid solid, it declines and says why, rather than handing back something broken.

## What you make is yours

The kernel is AGPL-3.0, so improvements to it stay open. An [exception](https://github.com/popkern-dev/popkern/blob/main/LICENSE-EXCEPTION) covers everything you make with it, including your scripts, your models, your STEP files. Those are yours, full stop.

## Come and break it.

If you've got a part popkern can't build, open an issue and it becomes a test case. That's the most useful thing anyone can do right now!

[popkern on GitHub](https://github.com/popkern-dev/popkern) [Join the Discord](https://discord.gg/38p9xBBwff) [Support on Ko-fi](https://ko-fi.com/popkerndev)
