Skip to content

feat: add support top contact speed split - #703

Open
mwz-iot wants to merge 1 commit into
process_interface_phase2from
feature/support-top-contact-speed-split-phase2
Open

feat: add support top contact speed split#703
mwz-iot wants to merge 1 commit into
process_interface_phase2from
feature/support-top-contact-speed-split-phase2

Conversation

@mwz-iot

@mwz-iot mwz-iot commented Aug 12, 2026

Copy link
Copy Markdown

Description

This PR adds support top contact speed control for normal supports.

What Changed

A new support top contact speed option is added under Speed settings. When enabled, the top contact/interface area of normal supports can use separate speeds for different contact-layer positions:

  • First layer contact speed
  • Middle layer contact speed
  • Top layer contact speed

When the option is disabled, all affected paths fall back to the existing support_interface_speed, preserving the previous behavior.

Implementation Details

The implementation classifies support top contact paths by their semantic support layer type instead of using Z-distance heuristics.

The previous height-based approach was removed. The new logic uses TopInterface / TopContact layer information and contiguous interface-layer block detection:

  • TopContact is treated as the top contact layer.
  • The bottommost TopInterface layer in a contact block is treated as the first contact layer.
  • Intermediate TopInterface layers are treated as middle contact layers.
  • Non-top-interface/contact support layers act as block boundaries.

The new First/Middle/Top extrusion role variants are internal implementation details only. They are used to select the correct speed during G-code generation, but they are not exposed as separate user-visible feature types.

UI / Preview Behavior

The feature is presented as part of Support interface / support top contact speed control.

  • Statistics remain grouped under Support interface.
  • Feature type legend remains grouped under Support interface.
  • First/Middle/Top are not shown as separate feature types or separate legend entries.
  • Speed preview still shows the actual resulting speeds, so first/middle/top layers can display different colors in Speed view.
  • Hovering paths in Speed view shows the actual generated speed.

Path Coverage

The per-layer speed selection applies to the whole corresponding support top contact layer, including:

  • internal support interface paths
  • contact/interface perimeter loops
  • contact boundary/outer loops

This keeps the outer loop and internal contact pattern consistent within the same contact layer.

Compatibility

When support top contact speed control is disabled:

  • Existing support_interface_speed behavior is preserved.
  • Cached/internal First/Middle/Top roles are guarded during G-code speed selection and fall back to support_interface_speed.
  • Existing projects and profiles without the new settings load with default disabled behavior.

The following paths are intentionally unchanged:

  • tree support
  • bottom contact/interface
  • raft
  • generic support base paths

Localization

This PR adds localization entries for the new support top contact speed strings.

It also fills the existing baseline translation gap for Support transition speed.

Screenshots/Recordings/Graphs

Please attach screenshots showing:

  1. The new support top contact speed settings in the Speed tab.
image
  1. Speed preview with the option enabled, showing different speeds for first/middle/top contact layers.
image
  1. Feature/statistics view showing these paths still grouped as Support interface.
image
  1. Speed preview with the option disabled, showing fallback to support_interface_speed.
image

Tests

Manual validation completed:

  • support_interface_top_layers=1, option ON:
    • top contact speed is applied correctly.
  • support_interface_top_layers=2, option ON:
    • first and top contact speeds are applied correctly.
  • support_interface_top_layers=3+, option ON:
    • first, middle, and top contact speeds are applied correctly.
  • Option OFF:
    • all affected paths fall back to support_interface_speed.
  • Toggling the option ON/OFF and slicing again without changing other support settings refreshes correctly.
  • Changing first/middle/top speed values refreshes slicing output correctly.
  • Internal contact paths and outer/contact loops use the same per-layer speed.
  • Feature legend/statistics do not expose First/Middle/Top as separate feature types.
  • Speed preview hover displays the actual generated speed.
  • Tree support is unaffected.
  • Bottom contact/interface is unaffected.
  • Raft behavior is unaffected.

Known behavior:

  • TopContact is generated independently from support_interface_top_layers.
  • support_interface_top_layers controls TopInterface layers, not the total visible top contact layer count.
  • In overlap/union cases, source contact regions may already be merged by support generation before speed classification.
  1. Speed preview with the option enabled, showing different speeds for first/middle/top contact layers.
  2. Feature/statistics view showing these paths still grouped as Support interface.
  3. Speed preview with the option disabled, showing fallback to support_interface_speed.

- Add support_top_contact_speed_split (bool) and three per-layer speed
  parameters: support_top_contact_speed_first/middle/top (float)
- When split is enabled, TopContact/TopInterface layers use per-layer
  speeds based on their position in the contact zone block
- When split is disabled, all paths fall back to support_interface_speed
- Use interface_layers contiguous block scanning (no Z-distance heuristics)
- New ExtrusionRole variants (First/Middle/Top) are internal-only;
  UI statistics, legend, and color views still show Support interface
- Perimeter loops and contact loops also use per-layer speeds
- Tree support, bottom contact, and raft paths are unaffected
- Remove height*3 heuristic; replace with layer_type-based block detection
- Add Chinese translations for all 9 new msgids
- Add machine translations for 17 other languages
- Fix Support transition speed translation gap in baseline

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mwz-iot mwz-iot self-assigned this Aug 12, 2026
@github-actions

Copy link
Copy Markdown

Documentation validation failed

🔗 Link Validation Errors

📄 doc/developer-reference\Built-in-placeholders-variables.md:

  • Line 93: home#process-settings - Fragment does not exist
  • Line 93: home#material-settings - Fragment does not exist

📄 doc/developer-reference\How-to-wiki.md:

  • Line 44: home#material-settings - Fragment does not exist
  • Line 45: home#process-settings - Fragment does not exist
  • Line 46: home#prepare - Fragment does not exist
  • Line 47: home#calibrations - Fragment does not exist
  • Line 50: home#process-settings - Fragment does not exist
  • Line 50: home#support-settings - Fragment does not exist
  • Line 50: home#others-settings - Fragment does not exist

📄 doc/Home.md:

  • Line 14: Precise-wall.md - File does not exist
  • Line 17: extrusion-rate-smoothing.md - File does not exist
  • Line 33: adaptive-pressure-advance.md - File does not exist

📄 doc/Tab.cpp:

  • Line 2545: fill-patterns - File does not exist
  • Line 2548: fill-patterns - File does not exist
  • Line 2608: speed_settings_other_layers_speed#support-top-contact-speed-split - Fragment does not exist
  • Line 2609: speed_settings_other_layers_speed#support-top-contact-speed-first - Fragment does not exist
  • Line 2610: speed_settings_other_layers_speed#support-top-contact-speed-middle - Fragment does not exist
  • Line 2611: speed_settings_other_layers_speed#support-top-contact-speed-top - Fragment does not exist
  • Line 2612: speed_settings_other_layers_speed#support-transition - Fragment does not exist
  • Line 2640: speed_settings_acceleration#first-layer-travel - Fragment does not exist
  • Line 2653: speed_settings_jerk_xy#first-layer-travel - Fragment does not exist
  • Line 2736: multimaterial_settings_prime_tower#brim-chamfer - Fragment does not exist
  • Line 2737: multimaterial_settings_prime_tower#brim-chamfer-max-width - Fragment does not exist
  • Line 2749: multimaterial_settings_prime_tower#wall-gap - Fragment does not exist
  • Line 2763: multimaterial_settings_ooze_prevention#delta-temperature - Fragment does not exist

🖼️ Image Validation Errors

📄 doc/developer-reference\How-to-create-profiles.md:

  • Line 142: [Markdown] Alt text "Help menu" ≠ filename "go-to-configuration-folder"
  • Line 144: [Markdown] Alt text "Delete system folder" ≠ filename "profile-delete-system-folder"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants