mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
Enhancement: Enabling base patterns (infill) for Organic supports (#12141)
Enhancement: Enabling base patterns for Organic supports
This commit is contained in:
@@ -1490,18 +1490,42 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||
|
||||
// Prusa: Fixing crashes with invalid tip diameter or branch diameter
|
||||
// https://github.com/prusa3d/PrusaSlicer/commit/96b3ae85013ac363cd1c3e98ec6b7938aeacf46d
|
||||
if (is_tree(object->config().support_type.value) && (object->config().support_style == smsTreeOrganic ||
|
||||
// Orca: use organic as default
|
||||
object->config().support_style == smsDefault)) {
|
||||
float extrusion_width = std::min(
|
||||
support_material_flow(object).width(),
|
||||
support_material_interface_flow(object).width());
|
||||
if (object->config().tree_support_tip_diameter < extrusion_width - EPSILON)
|
||||
return { L("Organic support tree tip diameter must not be smaller than support material extrusion width."), object, "tree_support_tip_diameter" };
|
||||
if (object->config().tree_support_branch_diameter_organic < 2. * extrusion_width - EPSILON)
|
||||
return { L("Organic support branch diameter must not be smaller than 2x support material extrusion width."), object, "tree_support_branch_diameter_organic" };
|
||||
if (object->config().tree_support_branch_diameter_organic < object->config().tree_support_tip_diameter)
|
||||
return { L("Organic support branch diameter must not be smaller than support tree tip diameter."), object, "tree_support_branch_diameter_organic" };
|
||||
if (is_tree(object->config().support_type.value)) {
|
||||
if (object->config().support_style == smsTreeOrganic ||
|
||||
// Orca: use organic as default
|
||||
object->config().support_style == smsDefault) {
|
||||
|
||||
if (warning) {
|
||||
// Orca: check the support wall count and the base pattern
|
||||
if (object->config().tree_support_wall_count > 1 &&
|
||||
object->config().support_base_pattern != SupportMaterialPattern::smpNone &&
|
||||
object->config().support_base_pattern != SupportMaterialPattern::smpDefault) {
|
||||
warning->string = L("For Organic supports, two walls are supported only with the Hollow/Default base pattern.");
|
||||
warning->opt_key = "support_base_pattern";
|
||||
}
|
||||
|
||||
// Orca: check if the Lightning base pattern selected
|
||||
if (object->config().support_base_pattern == SupportMaterialPattern::smpLightning) {
|
||||
warning->string = L(
|
||||
"The Lightning base pattern is not supported by this support type; Rectilinear will be used instead.");
|
||||
warning->opt_key = "support_base_pattern";
|
||||
}
|
||||
}
|
||||
|
||||
float extrusion_width = std::min(
|
||||
support_material_flow(object).width(),
|
||||
support_material_interface_flow(object).width());
|
||||
if (object->config().tree_support_tip_diameter < extrusion_width - EPSILON)
|
||||
return { L("Organic support tree tip diameter must not be smaller than support material extrusion width."), object, "tree_support_tip_diameter" };
|
||||
if (object->config().tree_support_branch_diameter_organic < 2. * extrusion_width - EPSILON)
|
||||
return { L("Organic support branch diameter must not be smaller than 2x support material extrusion width."), object, "tree_support_branch_diameter_organic" };
|
||||
if (object->config().tree_support_branch_diameter_organic < object->config().tree_support_tip_diameter)
|
||||
return { L("Organic support branch diameter must not be smaller than support tree tip diameter."), object, "tree_support_branch_diameter_organic" };
|
||||
}
|
||||
} else if (object->config().support_base_pattern == SupportMaterialPattern::smpLightning && warning) {
|
||||
// Orca: check if the Lightning base pattern selected
|
||||
warning->string = L("The Lightning base pattern is not supported by this support type; Rectilinear will be used instead.");
|
||||
warning->opt_key = "support_base_pattern";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user