Releases: RandoTechNerd/BREPcode
Release list
BREPcode v0.2.2
Kernel builds moved off the main thread, meshes too heavy for the kernel can be simplified in the app, and the drill finally reaches the models it was always meant to cut.
Builds in a Web Worker. The geometry kernel no longer blocks the page, so a heavy model builds while the app stays usable — no more "this tab is unresponsive". Worst measured stall on a monster model dropped from 4.9s to 75ms.
Simplify a too-dense import. A 200k-triangle mesh the kernel refuses can now be decimated in-app (meshoptimizer, quadric-error edge collapse) to something it can build — per part, so colour boundaries survive, with drift capped at about 1% of each part's size. A 202k-triangle terrain becomes an editable solid in 22 seconds.
The drill. Its subtraction was always correct; what was wrong is that on a heavy import the tool was never reached — arming it offered a "Build it now" button for a mesh the kernel had already refused, which is a dead end wearing the costume of an action. It now names the real problem and offers Simplify, both in the hint and under the editor. Two genuine bugs went with it: faces wound the wrong way by mesh repair were unpickable (culling is a rendering decision, never a picking one), and a click that did land on one drilled the wrong way, leaving the cutter hanging in mid-air.
That orange rod was never a drill bit. It is the negative-shape overlay — the picture of what got drilled out — drawn over everything and running the full length of the cutter, which is deliberately longer than the material. It is now clipped to the part, and it says what it is.
Export is a dialog with a preview of what each format actually gives you: grey for formats that drop colour, line art for the blueprint, your source text for .bcode, and the real packing for the new parts export. 3MF gains a "model only, no colour" option for single-material printing.
3MF — parts laid out. Every physically separate piece packed side by side on the bed, each standing on z=0, spilling onto numbered files when one plate is not enough. Connectivity decides what a part is, so a two-colour cap stays one piece.
In-browser AI. A model that runs on your own GPU via WebGPU — no key, no install, nothing leaving the machine.
Alt+Up/Down cycles word options — texture patterns, faces, sides, axes, repair levels, true/false — the same key that already nudged numbers.
STEP import verified end to end, and it now warns when a file comes back as an open shell rather than letting it fail later somewhere less explicable.
Also: label wrap around a cylinder, 45-degree fin sprues, 3MF exports centred on your build plate, and pictures in the model stash.
Windows: download BREPcode.exe and run it, no install. Self-hosting: BREPcode-site.zip is the whole static site.
BREPcode v0.2.0
The big one: talk to Claude from inside the desktop app.
Claude Code integration (desktop)
- Chat with Claude straight from the message box — it detects your installed Claude Code CLI (including the desktop-app install) and walks you through first-time sign-in step by step.
- Pick a model (sonnet default for speed, fable/opus for the hard stuff), set effort and auto-fix retries.
- Paste images inline with Ctrl+V — the sent bubble shows the thumbnail, and Claude really sees it.
- Live progress while you wait: "Claude is on it — model X", "writing… N characters".
Modeling
- Fin supports, redesigned — press the tool, then click the face you want supported. The fins land on that side and lean at the face's own angle, so they sit parallel to the model and every tooth is a short poke. Esc cancels.
- Drill into groups — booleans distribute over group members, so drilling a multi-part import (like a multicolour Benchy) just works.
- True multicolour glow — auto-colour on the Glow shade now sweeps the whole wheel, and each shape glows its own colour: green, red, yellow, magenta phosphors instead of all-green.
Chat harness #sections
A line that is just #name in the AI mission starts a named block, and each block becomes a toggle chip — keep OpenSCAD rules and JSCAD rules in one mission and tick whichever applies.
Import/export
- Multicolour 3MF import (Bambu/Orca production extension) with per-object parts, colours, and a PREVIEW mode for big models.
- BREPcode source embedded in exported STL/3MF, plus the
.bcodenative format — reimport and your full parametric history is back. - Autosave to a recovery folder, with a Recovered files browser in the (i) menu.
BREPcode.exe is the portable Windows app; BREPcode-site.zip is the static site for any web host.
BREPcode v0.1.9
⚠️ Replaces v0.1.8
v0.1.8 would start and never open a window. Every boot step was gated on require.main === module, which silently stopped being true — "type": "module" means Electron 43 loads even a .cjs entry through the ESM loader. No window, no error, three live processes. Use this build instead.
Colour that a slicer actually reads
Multi-colour 3MFs now come into OrcaSlicer as separate parts on separate extruders — verified in stock Orca. We were emitting the textbook <m:colorgroup>, and Orca ignores it entirely; taking apart a working Bambu 4-colour Benchy showed colour is per part with an extruder number in Metadata/model_settings.config.
Deliberately not included: printer presets, BambuStudio:3mfVersion, plate thumbnails. Those produce a stack of dialogs and carry nothing colour needs. Geometry, parts, extruder numbers. Nothing else.
A colour 3MF also wouldn't reimport — "non-manifold". Vertices were never welded on that path (6,585 vertices for 1,719 distinct positions), so triangles sharing an edge referenced different vertices. Fixed.
Save your work — .bcode
Plain text: your source at the top, scene and undo history in a comment below. 1.5 KB where the same part is 81 KB as STL, and it stays parametric. Opens in Notepad, diffs in git.
Crash recovery keeps a rolling snapshot as you type — desktop writes real files to a temp folder with an Open the folder button; browser keeps them locally. (i) → Recovered files.
Drag and drop a .bcode, .stl, .3mf, .obj or .svg anywhere on the window.
Desktop
- Open in slicer — one click into OrcaSlicer
- Double-clicking a
.bcodeopens it in the running window - The taskbar shows BREPcode's icon instead of Electron's
Fixes
- Clicking a subtracted shape did nothing. Cutters were never in the pick set.
- Handles on a cutter sat at the wrong height — a
cylinder({h: 35.3})biting a 12 mm plate measured 12 tall. - Drill and Fins only worked on imports. Any model with
constorreturnarmed the tool and then silently did nothing. returnalone on a line threw your model away (JavaScript inserts a semicolon). Now repaired, and stacked shapes tell you to useunion()/group().- Material presets appeared to stop working once shapes had their own colour — the panel now says so and offers one-click clearing.
- Export menu no longer runs off the bottom of the screen.
New
Shade slider for auto-colour — Neon, Glow, Very light … Very dark, All. Hue still spreads, so a QR code is multi-coloured within one family. With a shape selected, only that one is recoloured.
31 test suites + 31 desktop checks, all green.
BREPcode v0.1.8
Save your work — .bcode
The export that is the model rather than a picture of it. Plain text: your source at the top, the scene and undo history in a comment underneath. Opens in Notepad, diffs in git, pastes straight back. 1.5 KB where the same part is 81 KB as STL — and unlike the STL it stays parametric.
Delete the comment, hand-edit the code, write one from scratch — it still opens. The source is the model; everything else is decoration.
You can't lose work any more
BREPcode persisted your theme, material, grid and settings but never your code. A rolling snapshot is now taken as you type.
- Desktop writes real
.bcodefiles into a folder under your temp directory, with an Open the folder button so you can go and find them - Browser keeps the same snapshots locally
- Either way: (i) → Recovered files → Restore
Drag and drop
Drop a .bcode, .stl, .3mf, .obj or .svg anywhere on the window. A .bcode restores the editable model; a mesh imports. Files it can't open say so instead of failing silently.
Open in slicer (desktop)
One click from model to OrcaSlicer. The 3MF is stamped with your installed Orca's own version, read from the config the slicer wrote about itself — so it opens silently instead of showing "generated by an old OrcaSlicer version". This works for dev forks and nightlies with their own version numbering, where a hardcoded value would fail.
Double-clicking a .bcode opens it in the running window. (Note: the portable exe can't self-register file types — use Open with → Choose another app → Browse to BREPcode.exe, and Windows remembers.)
Fixes
- Clicking a subtracted shape did nothing at all. The negatives lived in their own group and the picker only ever raycast the solid, so a cutter was never in the pick set. Solid still wins where both overlap.
- Handles on a cutter sat at the wrong height. A
cylinder({h: 35.3})biting a 12 mm plate measured 12 tall, so its handles landed on the plate and dragging one wrote nonsense back. It now reads 30.8 × 30.8 × 35.3. - Your STL and 3MF carry the BREPcode that built them — reimport and reopen as editable code.
BREPcode-site.zip is the self-contained static site. Everything runs client-side.
31 test suites + 32 desktop checks, all green.
BREPcode v0.1.7
Your model keeps its recipe
STL and 3MF now carry the BREPcode that built them. Import one back and BREPcode offers to reopen it as editable code instead of frozen triangles — every dimension live again. In a 3MF it's a plain text part any unzip tool can read; in an STL it's base64 after endsolid. Neither adds or moves a single triangle, and no other tool notices.
Generated code that actually runs
- Variables named after BREPcode words no longer kill the model.
const fins = [...]was aSyntaxErrorthrown before a single line ran — past the reach of every repair. Your declaration now simply wins. - The prompt is explicit about the two things it was leaving to chance: the last line must be
return <shape>, and don't name a variable after a BREPcode word.
Blueprints
- Assemblies (
group(...)) export instead of failing with "unknown node kind". - Curved unions (a sphere fused with a torus) export instead of dying on an empty projection.
- Dimensions now match the app. A part the viewer measured at 72.0 mm was stamped 77.9 on its drawing — OCCT's bounding box is a loose bound on curved solids. The measured size wins.
Chat
The assistant receives the model's measured bounding box alongside your code. "Make it 30% narrower" on an imported mesh is arithmetic now, not a guess.
Safety
A public site build no longer includes locked-key.js — a password-locked key is meant for one person, not a public host. Use --with-locked-key for a private hand-off. And a missing key file no longer prevents the app from starting at all, which is the state a fresh clone was always in.
BREPcode-site.zip is the self-contained static site — unzip it onto any host. Everything runs client-side; no server, no upload of your models.
29 test suites, all green.
BREPcode v0.1.6
A view-and-orientation release, on top of everything in v0.1.5.
Opens on the view you expect
The default is now a front-elevated view rather than a 3/4 isometric: +X reads left-to-right across the screen and +Y runs away from you up the page, the way a drawing is laid out. Isometric shows more of the part, but leaves both axes running diagonally — which is exactly the confusion the axis letters exist to fix.
Dimensions moved to the left of the part, where they aren't sharing space with the X marker and the export dock.
The view cube tells you where you're standing
The flat cube could show you the three directions but never which one you were looking from. Now:
- a marker on the shared Y/Z edge brightens as you approach the 45° home pose — the cue that says "this is where you started";
- a face lights up when you're looking straight down its axis — in the accent colour from the near side, and a warm colour from the far side, so front and back are never the same picture;
- a dot on the lit face confirms you're dead-on rather than merely close.
The letters are Z / Y / X — the axis you end up looking down, matching the X and Y markers out on the grid.
Fixes
- Clicking "top" from a level camera did nothing. Straight up is the pole of the orbit controller's spherical coordinates, where the heading is undefined and there's no rotation to interpolate. Always true, but the new front-on default makes it a routine move. The pole views now land a thousandth off-axis — invisible, and enough to give the controller a heading.
- The front face reported the wrong side. It carried the back face's normal, so an ordinary front view lit up as "you're behind it" — exactly backwards.
BREPcode.exe — portable, no installer, no admin rights. Windows SmartScreen warns on first run because it isn't code-signed: More info → Run anyway.
BREPcode-site.zip — the same app as a static site; unzip onto any host.
Everything from v0.1.5 is included: plain-English editing with no API key, the epsilon rule, the tagged recipe library, desktop email, and the 5.3× faster first paint.
BREPcode v0.1.5
The big one for beginners: you can now describe what you want in plain English and the app just does it — no API key, no follow-up questions.
Say it, don't code it
With a model on screen, type any of these into the chat and it happens immediately. No key required, nothing sent anywhere.
| You say | What happens |
|---|---|
punch a hole in it |
a hole down the middle, all the way through |
round the edges / smooth it |
fillet |
bevel it / chamfer it |
chamfer |
take 0.2mm off the top |
shaves that face |
extend the right side by 7mm |
pushes that face out |
decrease width by 30% |
cuts a slab out of the middle and closes the gap |
make it 50mm wide |
same, to an exact size |
double the width |
scales (and it tells you the walls scaled too) |
drop it to the floor |
base lands exactly on z = 0 |
centre it |
centroid to the origin |
Give a size and it uses it; leave it out and it works one out from the part. Ask for something impossible and it says why — "a 90mm hole doesn't fit, the part is only 60mm across at its narrowest" — instead of building something broken. Genuinely vague wording still goes to the AI rather than being guessed at.
No more clicking "Fix" on every reply
The repair for a missing return existed but almost never fired, so generated models kept failing with "add return before your final shape". Two causes, either one fatal: a trailing semicolon left it with nothing to work on, and the word "return" appearing in any comment or string switched it off entirely. Both fixed, plus the case where a model ends on const part = …; and simply forgets to hand it back.
Send a model straight from your own email (desktop)
⚙ → Email now takes your own SMTP details and sends the STL or the engineering drawing from your address, with nothing routing through anyone else. Use an app password; it's encrypted with your OS keychain and the page can never read it back. The website keeps the mailto draft, because a browser genuinely cannot open an SMTP connection.
Faster first paint
The geometry kernel used to block every line of UI code behind ~13 MB of download and parse. It's now loaded alongside instead of in front, cutting what stands between you and a usable page by 5.3× — 13,357 KB down to 2,529 KB. The first model still appears exactly as fast.
Which way is which
- X and Y markers on the grid, and the view cube now reads Z / Y / X — the letter is the axis you end up looking down.
- New Grid tab in ⚙ Material: show/hide the grid and the markers, both on by default.
Under the hood
- The epsilon rule is now enforced. A cutter flush with the surface it's meant to breach is a coincident face — it looks right in the viewer and prints as a thin skin over the hole. Every generated cut now overshoots, with a comment saying why.
- Tagged recipe library. Subject knowledge (cell sizes, holder rules, support fins, the plain-English lexicon) is fetched only when a message is about it, instead of riding along on every request. Nesting means "a AAA holder" pulls the exact 10.5 × 44.5 dimensions and skips the follow-up entirely.
npm testcould never finish before — the kernel leaves a socket open and five suites hung on it. Now 26 suites, 0 failures, plus 19 desktop checks.
BREPcode.exe — portable, no installer, no admin rights. Windows SmartScreen will warn on first run because it isn't code-signed: More info → Run anyway.
BREPcode-site.zip — the same app as a static site; unzip onto any host.
BREPcode v0.1.4
Type it, describe it, or grab it and drag. A complete CAD app in your browser.
Try it with no install at BREPcode.com, or download
BREPcode.exe below to run it locally.
Fixed: some models could not export a blueprint or STEP
A profile built from arcs repeats a point at every junction, because each arc
starts where the previous one ended. The BREP.io kernel ignores the resulting
zero-length edge, so the model builds and looks correct in the viewer, but OCCT
refuses the wire outright. linearExtrude() and revolve() profiles now drop
those duplicates before export.
The failure was also unreadable. OCCT throws C++ exceptions and emscripten
surfaces them as a raw heap pointer, so the export died with
"SVG export failed: 8867952" and nothing else. Kernel failures now say what
usually causes them and what to try instead.
The isometric view is dimensioned too
All four views now carry measurements. The isometric ones run along the
projected axes rather than square to the page, which meant measuring the
projection basis out of the exporter's own camera rather than assuming it: it
turns out to be a true isometric at the classic 30 degrees, but with X and Y
mirrored from the textbook layout.
Each dimension is pushed clear of the shape along its own perpendicular, so it
holds for a tall thin part as well as a flat wide one.
The desktop app is dark all the way up
The title bar, menu strip and menu popups are drawn by Windows, not by the page,
so no stylesheet could reach them. On a machine set to light mode that put a
white menu bar directly above a black 3D view. The app now declares itself dark
and Windows renders its own chrome to match.
BREPcode.exe (Windows, 92 MB)
Portable: one file, no installer, no admin rights.
Windows will warn you. The build is not code-signed, so SmartScreen shows
"Windows protected your PC". Click More info -> Run anyway. If you would
rather not, BREPcode.com is the identical app.
Built on BREP.io
All the solid modeling is the BREP.io kernel by
Autodrop3d LLC, source,
@mmiscool. It ships unmodified with its own
license alongside. If BREPcode is useful to you, go star the kernel.
BREPcode v0.1.3
Type it, describe it, or grab it and drag. A complete CAD app in your browser.
Try it with no install at BREPcode.com, or download
BREPcode.exe below to run it locally.
Scannable codes, in two colours, on any face
qrcode() and datamatrix() now tag their raised squares dark and the backing
plate light, so a 2-colour 3MF prints a code that actually scans instead of one
solid slab. color / baseColor override either.
Two new toolbox entries stamp a DataMatrix or QR onto whatever face you
click — the code is turned to stand on that face's normal and centred where
you clicked.
Free-form corners (beta)
In the toolbox, last entry. Tick it and dragging a corner ball moves that corner
on its own, skewing the shape; Shift moves it up or down.
A cube([30,30,12]) is three numbers with nowhere to record a corner that has
moved, so the call is rewritten as freeform([...]): a solid defined by its
corners, each still an editable number. It is off by default, and with it
off corner drags behave exactly as before.
Fixed: hull() was quietly moving your model
IMPORT3D centres its mesh by default and the hull path never turned that off,
so every hull() silently jumped to the origin — hull(a, b) rendered
somewhere other than where a and b were. Now it stays put.
Fixed: selection could die for the whole model
Clicking a shape maps it back to the call that made it, and that mapping was
all-or-nothing: if the compile trace and the source disagreed even slightly,
every shape became unclickable, negatives included, with nothing explaining
why. hull() triggered it on its own. The mapper now degrades per shape, and
still refuses to guess when a shape is genuinely ambiguous.
Fixed: dragging a hole tore the solid
A cutter's faces are the inside of the hole, so dragging them peeled the wall
out of the part. The model now stays put and a translucent ghost of the cutter
drags instead.
Also
- SVG blueprint and STEP export work with
hull()andfreeform() - Grab handles take the shape of the face they sit on, domed rather than flat,
and sit on the surface instead of half-sunk into it - Selected parts get a coloured halo in addition to the outline, dimmed where it
passes behind the part - Colour pickers for the grabbers and the corner balls
- Model naming, feeding export filenames and the blueprint title block
- Blueprint dimensions come from the solid rather than the projection, which
read 2mm over on every axis stretch()takes a negative amount, removing that much from the middle: scale
a part up then stretch it back down and its walls thicken while the outside
stays put- Binary STLs work in the headless CLI
BREPcode.exe (Windows, 92 MB)
Portable: one file, no installer, no admin rights.
Windows will warn you. The build is not code-signed, so SmartScreen shows
"Windows protected your PC". Click More info -> Run anyway. If you would
rather not, BREPcode.com is the identical app.
Built on BREP.io
All the solid modeling is the BREP.io kernel by
Autodrop3d LLC, source,
@mmiscool. It ships unmodified with its own
licence alongside. If BREPcode is useful to you, go star the kernel.
BREPcode v0.1.2
Type it, describe it, or grab it and drag. A complete CAD app in your browser.
Try it with no install at BREPcode.com, or download
BREPcode.exe below to run it locally.
New: Free-form corners (beta)
Tick Free-form under the editor, then drag a corner ball and that corner
moves on its own, skewing the shape. Hold Shift to move it up or down.
A cube([30,30,12]) is three numbers with nowhere to record a corner that has
moved, so the call is rewritten as freeform([...]): a solid defined by its
eight corners, each still an editable number in the source. Drag again and it
edits those points in place.
Marked beta because it is new and the conversion is one-way: your cube()
becomes a list of points. The toggle is off by default, and with it off,
corner drags behave exactly as they always have.
Fixed: selection could die for the whole model
Clicking a shape maps it back to the call that made it, and that mapping was
all-or-nothing. If the compile trace and the source disagreed even slightly,
every shape in the document became unclickable, negatives included, with
nothing on screen explaining why. hull() triggered this on its own.
The mapper now degrades per shape: anything unambiguous still maps, only the
genuinely ambiguous parts go dark. Ambiguous shapes map to nothing rather than
guessing, because a wrong mapping would let a drag on one shape silently rewrite
another's numbers.
Fixed: dragging a hole tore the solid
A cutter's faces are the inside of the hole it made, so dragging them peeled the
wall out of the part and left a torn surface. The model now stays put and a
translucent ghost of the cutter drags instead, showing where the hole will land
without re-running the boolean on every mouse move.
Also in this release
- Grab handles take the shape of the face they sit on: square on a cube,
circular on a cylinder's end, a curved trapezoid on a cone. Domed, not flat. - Selected parts get a coloured halo in addition to the outline, dimmed where
it passes behind the part. - Colour pickers for the side grabbers and the corner balls.
- Model naming, feeding export filenames and the blueprint title block.
- Blueprint dimensions now come from the solid rather than the projection, which
read 2mm over on every axis; the title block sits inside the border. stretch()accepts a negative amount, removing that much from the middle.
Scale a part up then stretch it back down and its walls thicken while the
outside stays put.- Binary STLs work in the headless CLI.
BREPcode.exe (Windows, 92 MB)
Portable: one file, no installer, no admin rights.
Windows will warn you. The build is not code-signed, so SmartScreen shows
"Windows protected your PC". Click More info -> Run anyway. If you would
rather not, BREPcode.com is the identical app.
Built on BREP.io
All the solid modeling is the BREP.io kernel by
Autodrop3d LLC, source,
@mmiscool. It ships unmodified with its own
licence alongside. If BREPcode is useful to you, go star the kernel.