A command-line tool for cloth simulation and parametric CAD, built so that an agent can run it without a person at the screen. Open source.

Flat pattern for a conventional sewn leather glove, drafted for the solver: stitch line, cut line, stitch holes. The sewn result is further down, with its open problems.
The project started with the IKIYA × Y’2 Leather steer-oil rider’s coat with green cupro lining I wanted to understand and recreate. The question was how to move from a garment I could see to patterns, seams and a fit I could inspect.
That jacket remains the goal. The glove above is an early simulation test; the current jacket drape is a separate generic example. Neither is a completed reconstruction of the Ikiya jacket.
The purpose is to let an agent make cloth and solid parts unattended: a job file goes in, a run folder comes out, and every run is checked against its configured tolerances, with each check and its measured value written to the run record. The checks cover only what they measure, so a pass does not rule out other defects.
On 1 December 2026 a conventional leather glove of seven flat pieces was sewn and seated on a hand form and passed 4 of 4 checks, with a 95th-percentile seam gap of 0.2 mm. Seven CAD example builds passed every check. A jacket drape the same day failed two of its three checks, and the tool reported the failure itself.
PHLASMA is meant to pair three things. A model writes the design as code. Direct CAD tools build it: the model calls a command-line suite made for agents, instead of working a program made for people through its menus. Output checks read the exported geometry back and record what they measured.
Running today. The model is stock Qwen (qwen3.8:27b) on one local workstation. Given dimensioned briefs, it wrote the code for six mold builds, and all six passed their checks at 30 to 68 seconds each, model time included.
Planned, not installed. A local model with its refusal behaviour removed by abliteration, so that ordinary engineering requests are not turned away. No such model is in use, and nothing on this page came from one.
Speed. The aim is to be faster than an agent operating a desktop CAD program. That comparison has not been run, so the times above are measurements of this tool alone, not a result against any other.
Studio runs from the command line today. P0xter handles prompt routing separately. A future connection would let P0xter submit a Studio job and return its geometry and check record.
The tool exists because a commercial garment program stopped a whole overnight batch on one dialog box. Every rule follows from that.
Nothing waits for a person. A problem is an error record and an exit code, never a popup.
Job in, run folder out. Each command takes a JSON job and writes run.json with status, timings and an input hash, a line-by-line event log, and the output files.
Every run records its checks. Checks run by default and land in run.json. Exit code 0 is a pass, 3 is a failed check.
Many at once. No licence seat and no single-instance lock.
phlasma garment glove examples/garment/glove_L.json --out out/glove --json
The pattern pieces are meshed so both sides of every seam get matching vertices. A parametric hand is built as a smooth implicit solid. The solver sews the glove with the hand shrunk by 8 mm, lets the hand grow back to size, then seats the leather under light gravity. Cloth is simulated with extended position-based dynamics (Macklin et al., 2016, small-step variant) in NVIDIA Warp. The same code runs on a GPU or a CPU.
| Check | Result | Measured |
|---|---|---|
| Seams closed | pass | gap p95 0.21 mm, worst 1.97 mm |
| No penetration | pass | 0.0 % of points inside the hand |
| Stretch | pass | edge strain p95 1.9 % |
| Clipping | pass | worst leather-in-form 0.13 mm against a 0.5 mm tolerance, 95,537 points |
| Size | 32,599 particles, 62,938 triangles, 1,070 seam pairs, 2,879 steps | |
| Time | 213 s simulating on 4 CPU cores; 146 s for three 2400 px renders on the tower GPU |
Inspect the glove run record · Inspect the fit measurements
| Place | Glove inner girth | Hand girth | Ease |
|---|---|---|---|
| Knuckles | 238.0 mm | 212.0 mm | 26.0 mm |
| Index finger, middle joint | 74.8 mm | 64.4 mm | 10.4 mm |
| Wrist seam | 246.2 mm | 181.0 mm | 65.2 mm |
| Getting it on | Opening 246.2 mm against an estimated 242.2 mm for the hand with the thumb folded. Passes. | ||
| Fingertips and thumb | Room beyond the tips: 5.5 to 7.6 mm on the fingers, 6.6 mm on the thumb. | ||
| Seam lengths | Palm to back and cuff seams match exactly. Each fourchette is 0.7 to 0.9 % longer than the span it joins. | ||
Not solved. Edge strain on the three fourchettes reaches 14 to 20 % (95th percentile), far above the 1.9 % of the glove overall; real stiff leather would not take that, so the fourchette widths need a felt test. The thumb is cut in the plane of the hand and sewn on the outseam, not set in. Two stray stitch holes are left on the back cuff where a tag was removed. Nothing has been cut or sewn in leather.

The sewn glove with dovetail cuff seams and a teal patch carrying the text, rendered on black from the solved state, with the hand section smoothed after the first solve (clipping check: 0 points over 0.5 mm). The text is on the patch itself, not added afterwards. Records below are from the earlier run: Run record · Fit · Clipping · Job.

The solved mesh as triangles, palm side and back side, drawn from the run's state.

Flat pattern sheet. Pattern job · Seam lengths · Render record.

Jacket drape of 1 December 2026: 20 pieces, 12,503 particles.
The same day, a 20-piece jacket was draped on the mannequin on the same CPU. It completed and reported check_failed. This is the tool working as designed: it did not present a bad result as a good one.
| Check | Result | Measured |
|---|---|---|
| No penetration | pass | 0.14 % of points inside the body |
| Seams closed | fail | gap p95 3.04 mm, worst 9.43 mm |
| Stretch | fail | edge strain p95 4.09 %, worst 78.7 % |
| Size and time | 22,960 triangles, 952 seam pairs, 1,632 steps, 309 s on 4 CPU cores |
The cause has not been diagnosed. Whether the same job passes on a GPU at its intended settings has not been re-checked for this page.

K mold, demolded part by part in simulation. 53 parts, no collisions. Nothing has been cast.
The assemble verb takes every part with its pull direction and moves each one along its path, testing for collisions at every step: 7,145 positions while building the K mold and 6,717 while demolding it, with none found. The report also records what did not go to plan: part KA2 cannot start along its named pull and frees along Z instead. These are digital results.
A model is a short script of parameters and parts. The build makes solid bodies, checks them, and writes the files a shop needs. Each kind of object has its own checks.
Assembly report · Run record · Demold animation
| Example | Parts | Checks, all passed |
|---|---|---|
| Solitaire ring | 2 | bodies, interference, wall thickness, stone seat, ring size (17.31 mm inner against 17.32 wanted) |
| Gloss ring | 6 | bodies, interference, wall thickness, stones, ring size |
| Nail set | 10 | bodies, interference, nail geometry, wall thickness |
| Nail horn | 1 | bodies, interference, nail geometry, wall thickness |
| Nail sculpt | 1 | bodies, interference, nail geometry, wall thickness |
Each build took between two and six seconds on this machine.
The assembly report and run record are linked above.
Calculated or simulated only; nothing has been made or tested physically. The Stinger r13 evidence record is sealed and re-runs offline (13 checks pass): 5 claims simulated, 3 imported, 4 unverified. A requirements import (CSV and ReqIF, tested on a hand-written file), record comparison, signed bundles, reproducible builds and an offline install test on Linux, Windows and macOS were added. A one-sentence quad tilt-duct vehicle (TERN) now runs through the checks as a design, and a simulation-only experiment trained controllers for a small arm inside the same judge. The dated entries are on the PHLASMA timeline.
The glove path is the most developed. The jacket path can fail its own checks, as shown above. There is no continuous integration and test coverage is thin. The procedural graphics module was not run for this page, so nothing is claimed for it. No physical object has been made from these outputs.
The standalone PHLASMA site brings the software, applications and development timeline together.