Fix concentric infill generating inside holes (dome/cavity cross-sections)#167
Merged
jgphilpott merged 4 commits intomainfrom Mar 1, 2026
Merged
Fix concentric infill generating inside holes (dome/cavity cross-sections)#167jgphilpott merged 4 commits intomainfrom
jgphilpott merged 4 commits intomainfrom
Conversation
…ing points Co-authored-by: jgphilpott <4128208+jgphilpott@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix infill clipping issue in dome slicing example
Fix concentric infill generating inside holes (dome/cavity cross-sections)
Mar 1, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes concentric infill so it no longer generates extrusion paths inside holes (notably in dome/cavity-like cross-sections) by switching from point-sampling “skip loop” logic to geometric line clipping against hole boundaries.
Changes:
- Replace majority point-sampling hole detection with per-edge
clipLineWithHolesclipping and polyline rendering when holes exist. - Remove the unused
primitivesimport and addclippingdependency in the concentric pattern. - Add a regression test covering a rectangular loop intersecting a circular hole (the previously missed 50% sampled-points case).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/slicer/infill/patterns/concentric.coffee | Clips concentric loop edges against holes and renders the remaining segments as polylines to prevent infill inside holes. |
| src/slicer/infill/patterns/concentric.test.coffee | Adds a regression test for partial-overlap rectangular-vs-circular hole cases and keeps/extends hole-avoidance assertions. |
Owner
|
@copilot apply changes based on the comments in this thread |
…nt, nearest-neighbour polyline ordering Co-authored-by: jgphilpott <4128208+jgphilpott@users.noreply.github.com>
jgphilpott
approved these changes
Mar 1, 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.
concentric.coffee: when holes exist, clip each loop edge by edge usingclipLineWithHoles, group resulting valid segments into polylines, render each polyline with combing travel movesExtrudeGeometry(rectangular outer boundary + circular inner hole) that specifically tests the partial-overlap scenarioparseFillExtrusionCoordshelper to eliminate duplicated G-code coordinate parsing across both hole testsHOLE_TOLERANCE = 0.5as a shared describe-scope constant; apply to both hole-radius assertions to absorb polygon-approximation boundary noisefor polyline in polylineswith nearest-neighbourwhileloop (picks closest start/end, optionally flips polyline) to minimise travel in holes-present branchremainingPolylines.length > 1guard to justif lastEndPoint?per secondary review feedback🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.