Skip to content

Show and clamp the max safe cutout depth in the bin editor - #8

Merged
1Richter merged 2 commits into
mainfrom
feat/bin-editor-cutout-depth-cap
Aug 4, 2026
Merged

Show and clamp the max safe cutout depth in the bin editor#8
1Richter merged 2 commits into
mainfrom
feat/bin-editor-cutout-depth-cap

Conversation

@1Richter

@1Richter 1Richter commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Draft PR opened for review. Branch: feat/bin-editor-cutout-depth-cap.

Leon Richter and others added 2 commits August 3, 2026 15:38
The backend clamps pocket depth to what the bin height allows, and the
toolbar's depth field clamped silently to the same value, so a too-deep
override looked accepted until the number changed on its own.

The depth field now carries the limit: min/max on the input, a "max <n>"
hint next to it, and the hint turns amber when a typed value was clamped.
Applies to both the per-tool and the per-cutout override.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Typing a depth below 5mm raised it to the generator's minimum and lit the
"max" hint amber, which points at the wrong limit. The hint now reacts only
to a value cut down to the maximum.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@1Richter
1Richter marked this pull request as ready for review August 3, 2026 17:39
Copilot AI review requested due to automatic review settings August 3, 2026 17:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds UI feedback in the bin editor so users can see the maximum safe pocket depth for the current bin height and automatically prevents (and visually flags) depth overrides that would exceed that cap, aligning with backend STL depth clamping behavior.

Changes:

  • Show a “max {depth}” hint next to the cutout depth override field (tool and selected cutout), turning amber when an entered value is clamped to the max.
  • Clamp per-tool / per-cutout depth overrides to [5mm, maxCutoutDepth] in the toolbar input before committing.
  • Add frontend tests and user docs describing the max-depth hint and clamping behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
frontend/src/components/BinEditorToolbar.tsx Adds min/max constraints, clamping logic, and a max-depth hint with a “clamped” visual state.
frontend/src/components/BinEditor.test.tsx Adds coverage to verify the max-depth hint renders and that over/under inputs clamp as intended.
docs/usage/bin-layout.md Documents the max-depth hint and clamping behavior in the bin editor.
docs/features.md Updates feature list to include the max pocket depth hint and clamping behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@1Richter
1Richter merged commit 47ee3c7 into main Aug 4, 2026
5 checks passed
1Richter added a commit that referenced this pull request Aug 4, 2026
Brings together every open self-host PR (#2-#16) on top of upstream 0.8.0+7:

  #2  fix/half-grid-cell-placement       #10 feat/custom-bin-size-mm
  #3  feat/split-multi-part              #11 feat/cutout-line
  #4  feat/preview-bed-size-grid         #12 feat/dashboard-hide-project-bins
  #5  fix/split-parts-3mf-export         #13 feat/persist-tracer-selection
  #6  feat/always-export-3mf             #14 feat/tool-quantity-duplicates
  #7  ci/run-frontend-tests              #15 feat/unload-idle-models
  #8  feat/bin-editor-cutout-depth-cap   #16 fix/clamp-autosize-grid
  #9  feat/bin-editor-cutout-editing

Verified: 401 backend tests, 189 frontend tests, ruff and tsc clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants