Skip to content

Commit

Permalink
Fixed a hang in tree supports, caused by integer overflow on coord_t. F…
Browse files Browse the repository at this point in the history
…ixes #10048
  • Loading branch information
lukasmatena committed Mar 14, 2023
1 parent b0a8757 commit 993d6bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libslic3r/TreeSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1451,7 +1451,7 @@ static void generate_initial_areas(
// As a circle is round this length is identical for every axis as long as the 90 degrees angle between both remains.
const coord_t circle_length_to_half_linewidth_change = config.min_radius < config.support_line_width ?
config.min_radius / 2 :
sqrt(sqr(config.min_radius) - sqr(config.min_radius - config.support_line_width / 2));
scale_(sqrt(sqr(unscale<double>(config.min_radius)) - sqr(unscale<double>(config.min_radius - config.support_line_width / 2))));
// Extra support offset to compensate for larger tip radiis. Also outset a bit more when z overwrites xy, because supporting something with a part of a support line is better than not supporting it at all.
//FIXME Vojtech: This is not sufficient for support enforcers to work.
//FIXME There is no account for the support overhang angle.
Expand Down

0 comments on commit 993d6bd

Please sign in to comment.