Add support configuration options: supportGap, supportDensity, and tree support settings#189
Conversation
…ee support settings Agent-Logs-Url: https://github.com/jgphilpott/polyslice/sessions/e344e2dc-96a5-4775-bb64-8d6638788ff3 Co-authored-by: jgphilpott <4128208+jgphilpott@users.noreply.github.com>
|
Okay this is looking good @copilot, thanks! Could you please also make sure the support instructions ( |
Agent-Logs-Url: https://github.com/jgphilpott/polyslice/sessions/4c28b440-5f87-4b35-bb37-4067de4d7086 Co-authored-by: jgphilpott <4128208+jgphilpott@users.noreply.github.com>
Done in b10eb84. Both files have been updated:
|
|
Excellent progress @copilot! We are almost ready to merge, before we do can you make sure all the relevant test files have also been updated?
Thanks! |
Agent-Logs-Url: https://github.com/jgphilpott/polyslice/sessions/d1008362-9a29-4cfc-9521-1f0352f3bea9 Co-authored-by: jgphilpott <4128208+jgphilpott@users.noreply.github.com>
Done in 34257a6. All five test files have been updated:
All 209 tests across the 5 affected files pass. |
There was a problem hiding this comment.
Pull request overview
Adds new configuration options to the slicer support-generation system (normal + tree) by extending the Polyslice API (constructor + accessors), wiring the options into support algorithms, and documenting/testing the new behavior.
Changes:
- Introduces 6 new support-related settings (supportGap, supportDensity, and 4 tree-specific knobs) with getters/setters and default-value coverage.
- Updates normal support grid generation to derive spacing from
supportDensityand to use configurablesupportGap. - Updates tree support to consume slicer-provided settings and refactors
buildTreeStructureto accept anoptsobject; updates docs and bumpsthree/prettier.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/accessors.coffee | Adds getters/setters + validation for new support settings. |
| src/utils/accessors.test.coffee | Adds getter/setter tests for new support settings. |
| src/polyslice.coffee | Adds new constructor properties and method delegates for support options. |
| src/polyslice.test.coffee | Asserts default values for newly added support options. |
| src/slicer/support/normal/normal.coffee | Derives spacing from supportDensity and uses supportGap instead of hardcoded constants. |
| src/slicer/support/normal/normal.test.coffee | Adds tests for density=0 behavior, gap collapse, and density-vs-output relationship. |
| src/slicer/support/tree/tree.coffee | Reads new tree settings from slicer and threads them into buildTreeStructure; enables configurable roots/rootCount. |
| src/slicer/support/tree/tree.test.coffee | Adds tests for supportGap collapse and angle-driven geometry differences. |
| src/slicer/support/support.test.coffee | Adds tests for new support option defaults and validation behavior. |
| docs/slicer/support/SUPPORT.md | Documents new support options and adds detailed tree support explanation. |
| .github/instructions/slicer/support/overview.instructions.md | Updates internal support-module overview with new options and tree support details. |
| package.json | Bumps three and prettier versions. |
| package-lock.json | Lockfile updates for the dependency bumps. |
|
@copilot I replied to all your comment, please review my notes and apply changes based on the conversation in this thread. Thanks! |
…ption in docs Agent-Logs-Url: https://github.com/jgphilpott/polyslice/sessions/baf9ce8d-4a77-400a-b329-d848c8c0c4b4 Co-authored-by: jgphilpott <4128208+jgphilpott@users.noreply.github.com>
All four items from the review thread addressed in ea3adaa — see the individual thread replies for details. |
Summary
Adds 6 new configurable options for support structure generation. All defaults match the existing hardcoded implementation values so no existing behaviour changes.
New Options
Shared (normal and tree support)
supportGap0.2nozzleDiameter / 2.Normal support
supportDensity500produces no support lines for that region.Tree support
supportRootsEnabledtruesupportRootCount4supportBranchAngle45supportTwigAngle45Changes
src/polyslice.coffee— new constructor properties; new getter/setter methods delegating to accessorssrc/utils/accessors.coffee— newget*andset*functions with validationsrc/slicer/support/normal/normal.coffee— readssupportGapandsupportDensityfrom slicer instead of hardcoded valuessrc/slicer/support/tree/tree.coffee— reads all tree-specific settings from slicer;buildTreeStructureparameters refactored into anoptsobjectsrc/slicer/support/support.test.coffee— 18 new tests for all getter/setter pairssrc/polyslice.test.coffee— default-value assertions for all new support optionssrc/utils/accessors.test.coffee— extended support settings test with getter/setter coverage for all 6 new options including boundary validation checkssrc/slicer/support/normal/normal.test.coffee— newgenerateRegionSupportPatterntests coveringsupportDensity=0early return,supportGapregion collapse, and density-vs-line-count relationshipsrc/slicer/support/tree/tree.test.coffee— newbuildTreeStructureopts tests coveringsupportGapcollapse, gap effect on twig count, andbranchAngle/twigAnglegeometry effectsdocs/slicer/support/SUPPORT.md— updated with all new options, tree support anatomy, and API reference.github/instructions/slicer/support/overview.instructions.md— updated configuration table, tree support structure section, and usage examplesValidation
All 888 tests pass.