-
-
Notifications
You must be signed in to change notification settings - Fork 0
Implement polygon-based exposure detection for horizontal skin generation #58
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: jgphilpott <[email protected]>
Co-authored-by: jgphilpott <[email protected]>
|
Okay thanks @copilot I have observed that the Cura exposure detection and skin generation works well. Do you think you could re-activate our algorithm and start transitioning towards the Cura technique of:
|
- Add polygon-clipping library for geometric operations - Implement calculatePolygonArea() helper function - Implement calculateExposedAreasPolygonBased() using polygon difference - Implement calculateRegionCoveragePolygonBased() using polygon intersection - Re-activate exposure detection in middle layers with polygon-based approach - Increase coverage threshold to 15% (from 10%) to reduce false positives - Add area filtering (4x nozzle diameter squared) to ignore artifacts - Add comprehensive tests for new polygon-based functions (10 new tests) - All 376 tests pass Co-authored-by: jgphilpott <[email protected]>
Done! I've re-activated the exposure detection algorithm and transitioned to the Cura-style polygon-based approach in commit c8fb475. Key changes:
The polygon-based approach uses exact geometric calculations like |
Researched modern slicer implementations (Cura, PrusaSlicer) and implemented polygon-based exposure detection algorithm (lines 616-731 in
src/slicer/slice.coffee). The previous algorithm was disabled due to false positives on curved surfaces (torus, sphere) caused by fixed 0.1 coverage threshold and grid sampling limitations.Research Findings
Cura (CuraEngine)
PrusaSlicer
BridgeDetectorclass for gap analysisImplementation
Re-activated exposure detection with Cura-style polygon-based approach:
polygon-clippinglibrary (v0.15.7) for geometric operationscalculatePolygonArea()- Shoelace formula for area calculationcalculateExposedAreasPolygonBased()- Uses polygon difference (subtraction)calculateRegionCoveragePolygonBased()- Uses polygon intersectionAlgorithm approach:
Benefits
Research Documentation
docs/exposure-detection-research.md- Comprehensive analysis with code examples (398 lines)docs/EXPOSURE_DETECTION_SUMMARY.md- Quick reference implementation guide (147 lines)Future Enhancements
Phase 2 (Optional):
Phase 3 (Future):
exposureDetectionEnabled,exposureCoverageThreshold)Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.