Skip to content

Place the half-grid remainder cell at the end - #2

Merged
1Richter merged 4 commits into
mainfrom
fix/half-grid-cell-placement
Aug 4, 2026
Merged

Place the half-grid remainder cell at the end#2
1Richter merged 4 commits into
mainfrom
fix/half-grid-cell-placement

Conversation

@1Richter

@1Richter 1Richter commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Draft PR opened for review. Branch: fix/half-grid-cell-placement.

Leon Richter and others added 4 commits August 1, 2026 21:48
For a 3.5 x 2.5 grid the trailing 21mm cell showed up at the top of the
STL while the bin editor drew it along the bottom, so tools were placed
against a row of base that the printed bin did not have there.

The editor draws its grid from the top-left corner, which puts the
partial cell in the right column and the bottom row, and that is now the
canonical placement. Manifold +y is the editor's top edge, so the base
cell layout on the y axis is built partial-cell-first. Cell geometry
moved to _cell_bounds/_cell_center, which read the real cell spans:
disabled-cell cutters, stability plates and the label-to-cell mapping
used a fixed 42mm box around a centre that was off by half a cell
whenever the axis was fractional. Magnet placement now carries the cell
index with each full cell instead of matching centres by value.

The 2D canvas rounded its cell counts down, so for fractional grids the
partial row and column never got a disabled overlay and the row indexing
slipped by a fraction; counts round up and the last cell is clipped to
the bin.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
manifold3d's booleans can leave two vertices that should be identical
~1e-4mm apart instead of exactly coincident. trimesh's default
merge_vertices() tolerance is tighter than that gap, so the later
nondegenerate_faces() pass drops the resulting sliver triangle without
first welding its vertices into their neighbors -- opening a small
boundary hole that slicers report as non-manifold geometry.

Reproduced on a real customer export (a split part failed Orca's
manifold check) and, deterministically without any tool data, on a
plain stacking-lip bin at grid_y=6 (252mm) -- below that size the same
config exports clean, so this is a precision issue, not a modeling
bug. merge_vertices(digits_vertex=3) welds anything within 1um,
comfortably below FDM resolution, before the degenerate-face cleanup
runs.
The canvas fix had no frontend test: a fractional grid built fewer marker
columns than the mask has and indexed it at fractional offsets, so disabled
cells went unmarked, and the trailing cell hung over the bin edge.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
@1Richter
1Richter merged commit 2828b7c into main Aug 4, 2026
4 checks passed
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.

1 participant