incruste
v0.1.2
Published
Multicolor 3D-print inlays without an AMS: pockets and inserts to drop in during a pause, from a Bambu Studio / Orca 3MF project
Maintainers
Readme
Incruste
Multicolor 3D-print inlays without an AMS. From a .3mf project where the designs are painted (or placed as parts in other filaments) on the bed-facing side, it generates:
- the part with one pocket per color (adjustable clearance per side);
- a single-piece insert per color: the pieces of one color are joined by bridges hidden at the bottom of the pocket;
- a Bambu Studio 3MF with one plate for the part and one plate per insert, and the pause already placed after the deepest pocket.
Print the inserts, then the part. At the pause, drop the inserts face-down into their pockets, in the order shown, and resume: the following layers lock them in. No glue, no supports, no filament change during the print.
Free and open source (MIT). Works with Bambu Studio, OrcaSlicer and PrusaSlicer .3mf projects.
Quick start
No install needed (Node.js 20+):
npx incruste list project.3mf # list objects and detected designs
npx incruste generate project.3mf # generate part, inserts and 3MFOr install globally: npm install -g incruste, then incruste generate project.3mf.
No command line? Use the web app: https://incruste.croun.fr (computed locally in your browser, no file is uploaded).
Multicolor principle
- Placement order: colors are processed in filament-number order. The first is the shallowest and is placed first.
- Stepped depths: a color with bridges (more than one piece) goes deeper than the previous one, by the bridge thickness plus the clearance, rounded to the layer height (0.6 mm by default). Its bridges therefore pass over the pieces of the shallower colors. A color without bridges keeps the previous depth.
- Bridges: they never cross a deeper color. If that splits an insert into several parts, a warning is shown: change the filament order or bring the pieces closer.
- Touching colors: pockets are merged, with no wall between them. The deepest color is reduced by the clearance where it touches a shallower color.
- Thickness: plan about 0.6 mm of depth per color with bridges. A 2.5 mm lid allows 2 to 3 colors.
CLI
incruste list project.3mf
incruste generate project.3mf --stl
incruste generate project.3mf --object 11 --filaments 1,3
incruste generate project.3mf --layers 3 --clearance 0.15 --bed 180 -o out/
incruste generate --helplist shows the objects and the detected designs (one per object and filament). Without --object, generate picks the object with the most designs (the first on a tie); --filaments restricts to the listed colors; --layers sets the pocket depth in layers (default 4), --clearance the clearance per side in mm, --bed the bed size in mm (180 for an A1 mini), -o the output folder, --stl adds binary STL exports.
Development
src/core/ Effect TS core, shared by CLI and web
threemf.ts 3MF reading (Bambu / Orca / Prusa / standard), transforms, painting
paint.ts paint_color decoding (TriangleSelector)
inlay.ts pockets, inserts, bridges (minimum spanning tree), checks
export.ts binary STL + Bambu 3MF (plates + M400 U1 pause)
manifold.ts ManifoldWasm service (manifold-3d in WASM)
src/cli/ CLI built on effect/cli
web/ weft interface (@weftui/core + @weftui/dom), built as a single HTML filepnpm install # from the repository root
pnpm --filter incruste build:cli
pnpm --filter incruste cli list project.3mf
pnpm --filter incruste dev # Vite server for the web app
pnpm --filter incruste build:web # standalone dist/web/index.html (WASM embedded)
pnpm --filter incruste testAfter a project is loaded, the designs of the object that has the most are checked. Computation runs by itself on load and on every checkbox change, and the preview shows one color per insert (hidden bridges can be shown). Styling comes from the shared packages/ui package (components + incruste theme).
