-
-
Notifications
You must be signed in to change notification settings - Fork 0
Implement adhesion module with skirt generation and modular architecture #104
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
Co-authored-by: jgphilpott <[email protected]>
Co-authored-by: jgphilpott <[email protected]>
|
This is a fantastic start @copilot! Do you think you could also add an example script called test-adhesion.js? The script would slice each of the five example geometries in resources/stl and produce a G-code output demonstrating the adhesion feature. |
…all 5 geometries Co-authored-by: jgphilpott <[email protected]>
Added The script demonstrates the adhesion feature by:
Run with: Output includes:
|
|
Great work @copilot, here are a few more notes:
|
Co-authored-by: jgphilpott <[email protected]>
…uration Co-authored-by: jgphilpott <[email protected]>
All requested changes implemented in commits 9e0dd9b and e45c8c3: 1. Removed
2. Reorganized into sub-modules (e45c8c3)
3. Added skirt type setting (e45c8c3)
4. Build plate boundary checking (e45c8c3)
All 17 tests passing. Example script still works correctly. |
|
@copilot some more notes:
|
…tract boundary helper Co-authored-by: jgphilpott <[email protected]>
Both changes implemented in commit c28ba76: 1. Sub-modules in subdirectories with tests ✅
2. Boundary checking extracted to helper ✅
All 598 tests passing. Example script still works correctly. |
|
Okay @copilot here are some more notes:
|
Co-authored-by: jgphilpott <[email protected]>
Both changes implemented in commit 48a0e5e: 1. Simplified adhesion dispatch ✅
2. Renamed and integrated slice script ✅
Generated files:
All 598 tests passing. |
The
adhesionEnabledandadhesionTypeconfig settings existed but had no implementation. This adds a functional adhesion module supporting skirt generation with a modular architecture for future extensibility. The deprecatedoutlineconfig setting has been removed.Changes
Modular architecture (
src/slicer/adhesion/)adhesion.coffee- Main dispatcher routing to sub-modules (calls each module's generate function directly)skirt/- Skirt generation subdirectoryskirt.coffee- Handles skirt type dispatch internally (circular and shape-based)skirt.test.coffee- Skirt-specific tests (6 tests)brim/- Brim generation subdirectorybrim.coffee- Template for future brim implementationbrim.test.coffee- Brim tests (2 tests)raft/- Raft generation subdirectoryraft.coffee- Template for future raft implementationraft.test.coffee- Raft tests (2 tests)helpers/- Shared utility functionsboundary.coffee- Build plate boundary checking for all adhesion typesboundary.test.coffee- Boundary helper tests (13 tests)Skirt generation
Configuration properties
adhesionDistance- Distance from model edge with unit conversion supportadhesionLineCount- Number of concentric loopsadhesionSkirtType- Skirt style: 'circular' (default) or 'shape'Accessor methods
getAdhesionDistance()/setAdhesionDistance(distance)getAdhesionLineCount()/setAdhesionLineCount(count)getAdhesionSkirtType()/setAdhesionSkirtType(type)Build plate boundary checking
helpers/boundary.coffee)checkBuildPlateBoundaries()- Detects boundary violationsaddBoundaryWarning()- Adds G-code warning consistentlycalculateCircularSkirtBounds()&calculatePathBounds()- Helper calculatorsIntegration
slice.coffeepipelineDeprecated config removed
outlineconfig setting (no longer needed)Slice pipeline integration (
examples/scripts/slice-adhesion.js)npm run slicepipeline in package.jsonresources/gcode/adhesion/(version controlled)cube.gcode(78.94 KB)cylinder.gcode(87.10 KB)Usage
G-code output
When adhesion extends beyond build plate boundaries (verbose mode):
Testing
Module architecture supports future brim/raft implementations with dedicated sub-modules and subdirectories. Backwards compatible (default
adhesionEnabled: false).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.