feat: Add AutoSliceOptimizer for dynamic per-layer parameter tuning #228

Open
opened 2026-04-05 16:19:11 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @allanwrench28 on 3/21/2026

Introduces a new optimization engine that analyzes each layer's geometry and dynamically adjusts print parameters (nozzle temperature, speed, flow rate, fan speed) on a per-layer basis for stronger parts with minimal failure risk.

Key components:

  • LayerAnalyzer: Computes per-layer geometry metrics (cross-section area, overhang fraction, thermal mass, bridge detection, feature width)
  • AutoSliceOptimizer: Multi-pass optimization engine that computes temperature, speed, flow, and cooling adjustments based on geometry analysis, material properties, and machine capabilities
  • Integration into GCode pipeline via M104/M106/M220/M221 commands
  • Two new config options: auto_slice_optimization (bool) and auto_slice_quality_target (0.0-1.0 quality vs speed tradeoff)

The optimizer considers: thermal load from part geometry, overhang quality, bridge solidification, small feature preservation, chamber temperature compensation, volumetric flow limits, and minimum layer cooling time.

https://claude.ai/code/session_01BVYv1mfseagSkigsbk62H7

Description

Screenshots/Recordings/Graphs

Tests

*Originally created by @allanwrench28 on 3/21/2026* Introduces a new optimization engine that analyzes each layer's geometry and dynamically adjusts print parameters (nozzle temperature, speed, flow rate, fan speed) on a per-layer basis for stronger parts with minimal failure risk. Key components: - LayerAnalyzer: Computes per-layer geometry metrics (cross-section area, overhang fraction, thermal mass, bridge detection, feature width) - AutoSliceOptimizer: Multi-pass optimization engine that computes temperature, speed, flow, and cooling adjustments based on geometry analysis, material properties, and machine capabilities - Integration into GCode pipeline via M104/M106/M220/M221 commands - Two new config options: auto_slice_optimization (bool) and auto_slice_quality_target (0.0-1.0 quality vs speed tradeoff) The optimizer considers: thermal load from part geometry, overhang quality, bridge solidification, small feature preservation, chamber temperature compensation, volumetric flow limits, and minimum layer cooling time. https://claude.ai/code/session_01BVYv1mfseagSkigsbk62H7 # Description <!-- > Please provide a summary of the changes made in this PR. Include details such as: > * What issue does this PR address or fix? > * What new features or enhancements does this PR introduce? > * Are there any breaking changes or dependencies that need to be considered? --> # Screenshots/Recordings/Graphs <!-- > Please attach relevant screenshots to showcase the UI changes. > Please attach images that can help explain the changes. --> ## Tests <!-- > Please describe the tests that you have conducted to verify the changes made in this PR. -->
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/OrcaSlicer#228