-
-
Notifications
You must be signed in to change notification settings - Fork 0
Add slice-pillars example script with optimized travel path generation #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…1 to 5x5 Co-authored-by: jgphilpott <[email protected]>
|
Okay this is a great start @copilot! Now that I can see the pillars and examine the G-Code I can confirm what I suspected from the start. Unlike the hole sheet examples that optimize travel paths between holes the same logic is not being done for the pillars. I noticed two main issues:
Could you please investigate and resolve these two issues for me? Thanks! |
- Apply nearest-neighbor sorting to outer boundaries (pillars), not just holes - Initialize starting position to build plate center on first layer - Ensures optimal print order starting from closest object to home position Co-authored-by: jgphilpott <[email protected]>
Fixed both issues in commit 9b7ff75:
The 3x3 grid now follows an efficient pattern starting from (120, 117) → (110, 117) → (120, 107) → (110, 107) → ... instead of the previous zigzag pattern. |
|
Okay this is a nice start @copilot but several issues still remain:
|
…ct before next - Initialize starting position to home (0,0) instead of build plate center - Convert home position to mesh coordinates using center offsets - For independent objects (no holes), complete walls + skin/infill before moving to next - Track completed objects to skip them in Phase 2 - Minimizes travel and creates more efficient print order Co-authored-by: jgphilpott <[email protected]>
Both issues fixed in commit c717b0d:
Travel pattern is now optimal with nearest-neighbor ordering starting from home position, and no unnecessary back-and-forth between objects. |
|
Okay @copilot this is looking good, we are almost ready to merge! But I noticed that some tests are failing … can you please update the tests to match the changes we've made to the source code? Also, do you think the docs and/or instructions need to be updated in any way? |
…ction is disabled - Add exposure detection check to sequential object optimization - Exposure detection requires Phase 2 for complex coverage analysis - Update slice-pillars.js to disable exposure detection for optimal performance - All 569 tests now pass Co-authored-by: jgphilpott <[email protected]>
…zation - Add comprehensive slice-pillars documentation to EXAMPLES.md - Document travel path optimization (nearest-neighbor, home position start, sequential completion) - Update slicer overview instructions with two-phase approach details - Update SLICING.md with configuration and optimization notes Co-authored-by: jgphilpott <[email protected]>
Both issues addressed:
The PR is now ready to merge. |
|
@copilot thanks for fixing the tests but have you added any new ones for the new behavior that we introduced? Also, i'm a little confused why we need to disable |
…n comment - Add 4 new tests for travel path optimization: * Home position initialization (0,0) * Nearest-neighbor sorting for independent objects * Sequential object completion when exposure detection disabled * Phase 2 fallback when exposure detection enabled - Add comprehensive comment explaining why exposureDetection must be disabled for sequential completion optimization (Phase 2 dependency, complexity, future refactoring path) - All 573 tests pass (569 original + 4 new) Co-authored-by: jgphilpott <[email protected]>
Both items addressed in commit 74f7ec8:
All 573 tests pass. |
|
For independent objects (no holes), immediately process skin/infill before moving to next object. IMPORTANT: Sequential completion only works when exposure detection is DISABLED.
TODO: Future PR should refactor exposure detection to support per-object processing, |
Adds a new example script that generates and slices independent cylindrical pillars arranged in grid patterns from 1x1 through 5x5 arrays, complementing the existing
slice-holesexample which demonstrates CSG subtraction operations.Changes
New example script:
examples/scripts/slice-pillars.jsBuild integration: Updated
package.jsonslice command to include pillar generationGenerated artifacts: G-code files for all 5 configurations in
resources/gcode/wayfinding/Slicer optimization: Enhanced core slicing engine with nearest-neighbor travel path optimization
Test coverage: Added 4 comprehensive tests for travel path optimization
Documentation: Comprehensive documentation added
slice-pillarsexample usage inEXAMPLES.mdExample Usage
The script follows the same patterns as
slice-holes.jsfor consistency, using identical printer/filament configuration and output structure. The travel path optimizations improve print efficiency for any scenario with multiple independent objects by ensuring sequential object completion and starting from the printer's home position.Testing
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.