Repository navigation
Shell Mode - #215
Draft
dbierdemand wants to merge 12 commits into
Draft
Shell Mode#215dbierdemand wants to merge 12 commits into
dbierdemand wants to merge 12 commits into
Conversation
Backend: - New `shelled`, `shell_exterior_standard`, `shell_exterior_wall` options on BinParams (schemas.py) with validation; rebuild the bin as a constant-thickness shell via `_build_shelled_bin` in stl_generator_manifold.py: walls trace the outer perimeter and every tool outline, the top floor face is removed, and a 0.75mm trench floor plate (SHELL_TRENCH_PLATE_T) sits on the standard tapered base cells, leaving feet/grooves open - Optional outer wall band (`shell_exterior_wall`): widens to the gridfinity-standard 2.6mm lip wall with a stacking lip (`shell_exterior_standard`); off, it runs the shell thickness up through the lip (non-standard stacking). Falls back to the solid bin when too short or too small for the wall thickness - Cutout depth: `_max_pocket_depth` no longer deducts the 3.8mm lip notch for shelled bins (the lip collar is perimeter-only there); per-cutout depth overrides and insert height still apply - Partial-bin cutters compose after the shell body Frontend: - Shell toggle, wall thickness slider (1–3mm), exterior wall and gridfinity-standard-exterior sub-options in BinConfigurator; new config fields in types/index.ts and binDefaults.ts - calcMaxCutoutDepth drops the lip deduction for shelled bins - DepthInput clamping max-depth propagation in BinEditorToolbar; maxCutoutDepth threaded through the bin editor page; 3D preview updates Tests: new test_shell_mode.py; cutout-depth tests extended for shelled bins Docs: shell mode in features.md, stl-generation.md, usage docs; screenshots
Export inserts in bin-space coordinates resting on their pocket floor (wall_top_z - resolved pocket depth, which already includes insert_height) instead of at z=0, so they drop into the pocket exactly where the tool rests. Clip insert rings to the bin interior before the fit-clearance shrink, matching the pocket cutter so inserts never overhang walls. Subtract embossed text-label silhouettes from the insert's underside via new _make_insert_text_cutters, so raised text inside a tool trace stays visible through the insert; each cutter is offset outward by the insert fit clearance (round join) to prevent binding on the letters. In the 3D preview, share the main bin's bounding-box transform with the insert STL instead of centering it on its own bounds, preserving its true position inside the tool pocket. Also round the Toggle knob/pill and fix label overflow/wrapping in BinConfigurator, and remove unused docs screenshots. Tests: pocket-floor z-range, per-polygon depth override, tool-position x/y alignment, interior clipping of overhanging polygons, and text cutter coverage.
trimesh's mesh.section polygons_full and ray-casting helpers, used by the geometry test suite, require the optional rtree package. Install it explicitly so the backend tests run on a fresh environment. Also drop an unused manifold3d import and fix import ordering in test_shell_mode.py (incidental ruff cleanup, no behaviour change).
CI's lint check runs `next build`, which rewrites next-env.d.ts to reference ./.next/types/ instead of ./.next/dev/types/, causing the git diff --exit-code check to fail. Commit the build-generated form.
Replace the hard-coded 0.75mm trench floor plate with a user-facing Shell Depth slider under the Shell option. The slider expresses how deep the open shell interior extends below the wall top (higher = thinner floor plate = less filament) and uses the same range rule as Cutout Depth: 1.5mm minimum, max = 1.5 + 7 x (height - 1), snapping in 0.5mm steps. - schemas: add shell_floor_plate (0.4-20mm) to BinParams; reset to 0.75 when Shell is off - generator: plate thickness from config via _shell_floor_plate_t; extend the too-short-for-shell guard to clear plate + 1mm; text label surface follows the plate - routes: pass shell_floor_plate through to GenerateRequest (it was silently dropped, leaving the slider without effect) - frontend: Shell Depth slider (inverted plate complement), Height and Shell toggle clamping, rename "Shell (less filament)" to "Shell" - tests: plate thickness geometry, schema validation, route pass-through regression
Flat Bottom replaces the gridfinity feet with a flat, 45°-chamfered underside so a bin can rest directly on a surface instead of a baseplate. The grid footprint is unchanged (same cells, same 42mm pitch) — only the underside differs. - Backend: new `flat_bottom` on `BinParams`, plumbed through the STL request. `_base_top_z` returns 0 for a flat bottom, so walls run the full height, per-cell feet and shell base cells are skipped, and the shell trench floor plate becomes the floor (dropping the 0.01mm overlap that would otherwise open the underside). The solid path builds the chamf 8000 er in `_build_flat_body`; the shelled path subtracts the same wedge via `_make_flat_chamfer_cutter`. Partial-bin cutters and stability plates anchor to the new base top. - The 4.75mm the feet occupied becomes usable pocket/shell depth, bounded by a 2mm solid floor (`MIN_FLAT_FLOOR_DEPTH`) in both `_max_pocket_depth` and the frontend's `calcMaxCutoutDepth`, so 1u bins gain real depth too. - Magnet holes are forced off while flat bottom is on (there is no baseplate to lock to); half-grid base still applies, since it describes the grid layout rather than the feet. - Frontend: Flat Bottom toggle in the Base section, wired through the bin page, types and factory defaults. The configurator is now six collapsible sections (size, cutouts, base, features, partial, print) with collapse state in localStorage, keeping features/partial/print folded by default; `SectionHeader` gains a `dense` variant for the tight sidebar. - Tests: new `backend/tests/test_flat_bottom.py` covering the geometry and depth limits, plus `calcMaxCutoutDepth` flat-bottom cases; the numeric input e2e spec opens the folded Cutouts section first. - Docs: new "Flat bottom" section in `docs/stl-generation.md` and updated height/depth/toggle references in `docs/usage/bin-configuration.md`.
Flat Bottom replaces the gridfinity feet with a flat, 45°-chamfered underside so a bin can rest directly on a surface instead of a baseplate. The grid footprint is unchanged (same cells, same 42mm pitch) — only the underside differs. - Backend: new `flat_bottom` on `BinParams`, plumbed through the STL request. `_base_top_z` returns 0 for a flat bottom, so walls run the full height, per-cell feet and shell base cells are skipped, and the shell trench floor plate becomes the floor (dropping the 0.01mm overlap that would otherwise open the underside). The solid path builds the chamfer in `_build_flat_body`; the shelled path subtracts the same wedge via `_make_flat_chamfer_cutter`. Partial-bin cutters and stability plates anchor to the new base top. - The 4.75mm the feet occupied becomes usable pocket/shell depth, bounded by a 2mm solid floor (`MIN_FLAT_FLOOR_DEPTH`) in both `_max_pocket_depth` and the frontend's `calcMaxCutoutDepth`, so 1u bins gain real depth too. - Magnet holes are forced off while flat bottom is on (there is no baseplate to lock to); half-grid base still applies, since it describes the grid layout rather than the feet. - Frontend: Flat Bottom toggle in the Base section, wired through the bin page, types and factory defaults. The configurator is now six collapsible sections (size, cutouts, base, features, partial, print) with collapse state in localStorage, keeping features/partial/print folded by default; `SectionHeader` gains a `dense` variant for the tight sidebar. - Tests: new `backend/tests/test_flat_bottom.py` covering the geometry and depth limits, plus `calcMaxCutoutDepth` flat-bottom cases; the numeric input e2e spec opens the folded Cutouts section first. - Docs: new "Flat bottom" section in `docs/stl-generation.md` and updated height/depth/toggle references in `docs/usage/bin-configuration.md`.
The merge that brought in the flat-bottom commit resolved next-env.d.ts in favor of the dev variant (./.next/dev/types/...), which is what next dev writes. CI regenerates the file with next typegen, which emits the non-dev paths, so the checked-in file must match that or the git diff --exit-code step fails.
All four tests in the spec failed in expandCutouts() before reaching any of their own assertions. The helper clicked the Cutouts header unconditionally and then expected aria-expanded="true". The section is not folded by default: DEFAULT_COLLAPSED in BinConfigurator.tsx sets cutouts: false, so a new bin opens with Cutouts already expanded. The click therefore collapsed it and flipped aria-expanded to "false", which the assertion could never observe. The comment claiming the section "starts folded" was the source of the misdiagnosis. This is not a timing problem. toHaveAttribute already polls until the expect timeout expires, so adding an explicit timeout or a MutationObserver wait would not have changed the observed value. Make the helper idempotent: only click when the section is actually folded, then assert the expanded state. This also covers the case where a previous test in the file left a different collapse state, since collapsedSections is persisted in localStorage and shared across the tests in this run.
next typegen emits .next/types/*.d.ts paths in CI (production typegen), while the checked-in file referenced .next/dev/types/*, which the linter job detects via git diff --exit-code.
This was referenced Nov 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.