Skip to content

Releases: RandoTechNerd/BREPcode

BREPcode v0.6.0: the Rust kernel (next.BREP.io)

Choose a tag to compare

@RandoTechNerd RandoTechNerd released this 18 Oct 05:03

BREPcode now runs on the next.BREP.io Rust kernel

Exact geometry in this release comes from the next.BREP.io Rust BREP kernel by @mmiscool (Autodrop3d LLC), source at mmiscool/next.BREP.io_RUST_BREP_KERNEL. It's a remarkable piece of work: true curved surfaces, exact booleans, fillets, and a feature pipeline close enough to BREP.io's that BREPcode's models run on it almost as-is. Thank you, mmiscool. If BREPcode is useful to you, go star the kernel.

The kernel ships unmodified, pinned to upstream commit 75bad91 (BREP_kernel 0.9.0), with its Autodrop3d licence beside it. rust/brepcode-kernel is the small wrapper that builds it to WebAssembly.

Two engines, picked for you

  • Exact parts (cubes, cylinders, sketches, extrude, revolve, booleans, fillets, chamfers) build on the Rust kernel. Real cylinders stay cylinders, and real models build 1.4 to 4x faster (the knob and bracket examples about 4x).
  • Meshes (imported STLs, texture(), heightmap()) go to manifold-3d. A texture cut that took 113 ms now takes 5 ms.
  • Anything either one can't do falls back to the BREP.io JavaScript kernel automatically, so models that built before still build.
  • The status line says which ran: Exact, Mesh, or JS kernel.

New: drop an STL, get an exact solid (beta)

The drop menu has Open as an exact solid. It rebuilds real planes and cylinders from the triangles using next.BREP.io's own STL reconstruction (the engine behind its stl2step tool). For example, a 1,202-triangle printer part became 33 true faces (25 planes, 8 cylinders) in 0.4 s. Then use Keep exact or Back to mesh. CAD-made parts convert best; organic models stay meshes, and BREPcode tells you which you got. Export STEP with Surfaces: True curved to hand a CAD program the real surfaces.

Also in this release

  • Hex nuts made with cylinder($fn=6) keep their flats on the exact kernel.
  • The command line takes --engine auto|split|js, and it now exits when it finishes.
  • About and file headers report the real version (they had been stuck at 0.4.0).

Downloads

  • BREPcode.exe: portable Windows build, no installer. The Claude Code agent bridge is off in this download; start BREPcode.exe --agent to turn it on.
  • BREPcode-site.zip: the web build for brepcode.com (see docs/deploy-lovable.md).
  • brep_kernel_bg.wasm: the Rust kernel by itself (14.5 MB), for hosts that serve large files from a separate store.

Also built on: BREP.io (the JavaScript kernel, also by mmiscool), manifold-3d, three.js and replicad / OpenCascade.

BREPcode v0.5.0: FizzCore + printable support fins

Choose a tag to compare

@RandoTechNerd RandoTechNerd released this 04 Oct 03:52

FizzCore bubble infill and printable support fins

Drop an STL / 3MF / OBJ anywhere on the page and BREPcode now asks what you came to do: open it, fill it with FizzCore bubbles, add support fins, or open it and jump straight to a tool.

FizzCore bubble infill

  • Fills a part with graded bubbles: big in the core, small and dense under the skin, small ones packed into the gaps.
  • Every bubble gets a 45° teardrop top, so no ceiling inside needs support.
  • Pick your nozzle and it sizes the skin, the webs and the smallest bubble in whole extrusion lines.
  • Solid webs (the bubbles are the infill) or Hybrid (wide webs that get your slicer's gyroid).
  • Shows plastic saved and an "equivalent slicer infill %" so you can compare it honestly with gyroid.

Support fins

  • Tilts the part (45° by default) with a live low-poly preview before the full run.
  • Fins are grown up from the bed a 0.2 mm layer at a time with every layer within 45° of the one below, so nothing floats and nothing overhangs.
  • The contact edge is a straight line laid against the part's bulges, and tiny pokes stop 0.2 mm short so they catch a teetering part but never fuse.
  • Fins stop a little past the part's centre of mass by default. They prevent tipping; a face that already prints doesn't get a tall fin.
  • Auto picks the lean direction (least overhang) and the fin side (where it would tip).
  • Overhangs on the part itself are painted red, and a button finds the tilt with the least overhang.
  • Spin, flip, or click a face to lay it flat: the fins stay put and re-fit.
  • Basics in the panel; fin size, thickness, spacing, distance from model, poke gap and foot size under Advanced.

Notes

  • The Claude Code agent bridge is off in this download. Start BREPcode.exe --agent to let Claude Code drive the app (see docs/AGENT.md).
  • Windows portable exe: no installer, just run it.

BREPcode v0.4.0

Choose a tag to compare

@RandoTechNerd RandoTechNerd released this 25 Aug 10:02

Models that flow instead of snapping together, imported colour that survives the trip, and an AI that reads a third less to do more.

Organic modelling

union() puts a crease exactly where two shapes cross — right for a bracket, wrong for a wrist. Two new ops join through a soft-minimum distance blend, where the fillet shapes itself: widest at shallow meetings, tighter head-on.

blob([[0,0,14,13], [0,0,34,9], [11,0,12,4], [-11,0,12,4]], { k: 7 })
smoothUnion(5, cylinder({ r: 6, h: 22 }), translate([0,0,24], sphere({ r: 14 })))

blob() is metaballs — the cheapest route to a creature. smoothUnion() blends anything, imported meshes included. k is the blend in mm: 2–4 a generous fillet, 6–10 flesh, 15+ melts the parts into one mass. Resolution comes from a triangle budget, so a character builds in about a second; pass { maxTris: 20000 } for the one build before a final export.

This matters most for the AI: describing a mascot used to mean constructing organic geometry, which models are bad at. Now it means placing blobs and picking k, which they are good at.

Imported OBJs keep their colour

A coloured OBJ used to come back grey and welded into one solid — every import was flattened to STL, a format with no colour at all. Now a coloured OBJ arrives as separate, named, editable parts:

return group(
  colorize("#408c4d", importedMesh("coin-rim.stl", { repair: "BASIC" })),
  colorize("#f56b9e", importedMesh("coin-side_A_face.stl", { repair: "BASIC" })),
);

Vertex colours are read (what BREPcode's own exports and Blender carry), part names come from the file's own groups, and heavy files get an instant coloured preview with a build button rather than a frozen tab.

A lighter AI harness

Six sections of the always-on prompt teach situations — an attached image, a drawing sheet, gear fits, splitting for the plate, pasted OpenSCAD, the built-model reference. Most messages are none of those, yet every message paid for all of them. They now arrive only when the request calls for them.

A typical request: 33,219 → 20,817 characters, 37% lighter. Nothing was removed — a request that needs a section always gets it. The biggest winners are local models with no prompt cache (Lemonade, llama.cpp, the in-browser model), which re-read every byte every message.

Fixes

  • Window controls stay in one cluster on every panel — no more ⇲ ⤢ ✕ spread across the header
  • The editor header stays on one line whatever the model is called
  • Free-form corner balls sit on the part, and never overwrite a difference() or turn a cylinder into a box
  • Stretching keeps the cut true — a hole stays round while the plate stretches, and the snap on release is gone
  • Published gallery thumbnails frame the whole model instead of cropping whatever the camera happened to show
  • The publish panel says where the stash actually lives, and its checkboxes are readable
  • The (i) panel's sections collapse independently

4,163 checks across 75 files.

Downloads

  • BREPcode.exe — portable Windows app, no installer.
  • BREPcode-site.zip — the static site, if you want to host it yourself.

BREPcode v0.3.0

Choose a tag to compare

@RandoTechNerd RandoTechNerd released this 14 Aug 15:21

Models you can drag by their dimensions, meshes the kernel used to choke on, a link short enough to say out loud — and BREPcode's first contribution from someone else.

Local AI: Lemonade, and a Server URL box that helps

The Server URL field is now a picker: LM Studio, Ollama, Lemonade (AMD Ryzen AI) and llama.cpp, each with its real port. It also stopped masking itself as a password — it is a URL, and a typo'd port hidden behind dots is invisible.

Lemonade support exists because @cgarwood82 opened this repo's first pull request. Lemonade serves its API at /api/v1 rather than at the root, and every piece of setup guidance in the app had quietly assumed otherwise — so the first person to point BREPcode at a server shaped differently had nothing to go on but a red ✗. The setup guide now has steps for it, including LEMONADE_ALLOWED_ORIGINS, which is why brepcode.com gets refused by a server that is plainly running. His regression tests are in the suite.

Everything else

  • Parameters popout — sliders and number boxes for a model's dimensions, so you can drag a value instead of editing code.
  • Simplify — meshes too heavy for the kernel can be reduced in the app, with a live preview and Ctrl+Z back to any resolution.
  • Mesh repair on import — broken STLs are welded and closed before the kernel sees them, instead of being rejected.
  • Short links — brepcode.com/m/yourmodel, short enough to read out loud.
  • Guided tour — reserved at brepcode.com/tour, and it no longer waits on the kernel to start.
  • Windows that behave — consistent expand/restore/put-back, and they keep out of the model's way instead of sitting on top of it.
  • Colour by height — band a model by Z and get separate solids, so it prints in real colours.
  • Claude Code as an AI provider — if you have the CLI, the desktop app finds it. No key to paste.
  • Logbook — opt-in, behind the unlock icon, writing a plain log to a folder you choose.

4026 checks across 72 files, plus 41 desktop checks.

Downloads

  • BREPcode.exe — portable Windows app, no installer.
  • BREPcode-site.zip — the static site, if you want to host it yourself.

BREPcode v0.2.2

Choose a tag to compare

@RandoTechNerd RandoTechNerd released this 30 Jul 23:28

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

Choose a tag to compare

@RandoTechNerd RandoTechNerd released this 28 Jul 09:39

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 .bcode native 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

Choose a tag to compare

@RandoTechNerd RandoTechNerd released this 27 Jul 08:02

⚠️ 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 .bcode opens 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 const or return armed the tool and then silently did nothing.
  • return alone on a line threw your model away (JavaScript inserts a semicolon). Now repaired, and stacked shapes tell you to use union()/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

Choose a tag to compare

@RandoTechNerd RandoTechNerd released this 27 Jul 05:30

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 .bcode files 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

Choose a tag to compare

@RandoTechNerd RandoTechNerd released this 27 Jul 02:52

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 a SyntaxError thrown 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

Choose a tag to compare

@RandoTechNerd RandoTechNerd released this 26 Jul 21:31

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.