mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-09 18:27:00 +00:00
Fix overhang preview ignoring support threshold fallbacks when angle set to 0 (#12650)
* Fix overhang preview not using fallbacks when angle is 0
The overhang visualization in Preview ("show overhangs based on support settings")
used the raw `support_threshold_angle` value from the configuration.
When `support_threshold_angle` was set to 0, Orca internally falls back to:
- 30° for tree supports
- an angle derived from `support_threshold_overlap` for normal supports
However, the preview logic ignored these fallbacks and used the raw value (0°),
leading to incorrect overhang highlighting that did not match the actual
support generation behavior.
This patch computes the effective overhang threshold used for preview:
• If `support_threshold_angle > 0`, use it directly
• If `support_threshold_angle == 0` and tree supports are used, fall back to 30°
• If `support_threshold_angle == 0` and normal supports are used, derive the
equivalent angle from `support_threshold_overlap`, `layer_height`, and the
external perimeter width.
The function now returns `normal_z` directly so the preview uses the same
effective slope threshold as the support generator.
As a result, the overhang highlight in Preview now correctly matches the
supports that will actually be generated.
* Apply Copilot suggestions
This commit is contained in:
@@ -488,7 +488,7 @@ public:
|
||||
GLVolume* new_toolpath_volume(const ColorRGBA& rgba);
|
||||
GLVolume* new_nontoolpath_volume(const ColorRGBA& rgba);
|
||||
|
||||
int get_selection_support_threshold_angle(bool&) const;
|
||||
float get_selection_support_normal_z() const;
|
||||
// Render the volumes by OpenGL.
|
||||
//BBS: add outline drawing logic
|
||||
void render(ERenderType type,
|
||||
|
||||
Reference in New Issue
Block a user