mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
FIX: Divide by zero exception in InterlockingGenerator when invalid configuration parameters are used. (fixes https://github.com/bambulab/BambuStudio/issues/9910 )
(cherry picked from commit cdd60ab71f8a3895fcb1345b2ccc2f2f472bf968)
This commit is contained in:
@@ -26,7 +26,8 @@ namespace Slic3r {
|
|||||||
void InterlockingGenerator::generate_interlocking_structure(PrintObject* print_object)
|
void InterlockingGenerator::generate_interlocking_structure(PrintObject* print_object)
|
||||||
{
|
{
|
||||||
const auto& config = print_object->config();
|
const auto& config = print_object->config();
|
||||||
if (!config.interlocking_beam) {
|
// Check if interlocking is enabled, and avoid errors like division by zero due to invalid configuration.
|
||||||
|
if (!config.interlocking_beam || config.interlocking_beam_layer_count < 1 || config.interlocking_depth < 1 || config.interlocking_beam_width < EPSILON ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user