Repository navigation
Grid::split: do not overlap the halves on an odd axis - #461
Open
dylanoliverdo-coder wants to merge 1 commit into
Open
dylanoliverdo-coder wants to merge 1 commit into
dylanoliverdo-coder wants to merge 1 commit into
Conversation
With an odd number of steps both halves got ceil(n/2) steps, although the right half starts at floor(n/2), so one slab of cells was contoured by both jobs. The left half now gets floor(n/2) steps, matching where the right half starts.
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.
With an odd number of steps on the split axis, both halves got
ceil(n/2)steps, although the right half starts atfloor(n/2). One slab of cells was then contoured by both jobs, which gives duplicate triangles: edges shared by more than two faces. The left half now getsfloor(n/2)steps, matching where the right half starts. Even step counts are unchanged.Repro: a 60 x 40 x 20 mm block at 0.254 mm resolution (239 steps on X), a 6 mm flat end mill, a zigzag pocket 5 mm deep.
Tests: the
tests/testHarnessgcodetool suites pass 15 of 15 on master and on this branch.This touches
Grid::split, as does the seam fix in #459. If both are taken, the overlap fix applies on top in a few lines.Repro job (block-a.camotics and block-a.nc)
{ "units": "metric", "resolution-mode": "manual", "resolution": 0.254, "tools": { "1": { "units": "metric", "shape": "cylindrical", "length": 30, "diameter": 6, "description": "" } }, "workpiece": { "automatic": false, "margin": 0, "bounds": { "min": [ 0, 0, -20 ], "max": [ 60, 40, 0 ] } }, "files": [ "block-a.nc" ] }🤖 Generated with Claude Code