Skip to content

Commit

Permalink
FIX:brim ear detection redius not work
Browse files Browse the repository at this point in the history
jira: nojira
Change-Id: If89c3d7bc0a1246373c18ee8baae50f602860c46
  • Loading branch information
MackBambu authored and lanewei120 committed Oct 15, 2024
1 parent fecd3c3 commit 183108c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/slic3r/GUI/Gizmos/GLGizmoBrimEars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -775,9 +775,10 @@ Points GLGizmoBrimEars::generate_points(Polygon &obj_polygon, float ear_detectio
const coordf_t angle_threshold = (180 - brim_ears_max_angle) * PI / 180.0;
Points pt_ears;
if (ear_detection_length > 0) {
double detect_length = ear_detection_length / SCALING_FACTOR;
Points points = obj_polygon.points;
points.push_back(points.front());
points = MultiPoint::_douglas_peucker(points, ear_detection_length);
points = MultiPoint::_douglas_peucker(points, detect_length);
if (points.size() > 4) {
points.erase(points.end() - 1);
obj_polygon.points = points;
Expand Down

0 comments on commit 183108c

Please sign in to comment.