FIX:brim ear detection redius not work
jira: nojira Change-Id: If89c3d7bc0a1246373c18ee8baae50f602860c46
This commit is contained in:
parent
fecd3c3297
commit
183108c436
|
@ -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;
|
const coordf_t angle_threshold = (180 - brim_ears_max_angle) * PI / 180.0;
|
||||||
Points pt_ears;
|
Points pt_ears;
|
||||||
if (ear_detection_length > 0) {
|
if (ear_detection_length > 0) {
|
||||||
|
double detect_length = ear_detection_length / SCALING_FACTOR;
|
||||||
Points points = obj_polygon.points;
|
Points points = obj_polygon.points;
|
||||||
points.push_back(points.front());
|
points.push_back(points.front());
|
||||||
points = MultiPoint::_douglas_peucker(points, ear_detection_length);
|
points = MultiPoint::_douglas_peucker(points, detect_length);
|
||||||
if (points.size() > 4) {
|
if (points.size() > 4) {
|
||||||
points.erase(points.end() - 1);
|
points.erase(points.end() - 1);
|
||||||
obj_polygon.points = points;
|
obj_polygon.points = points;
|
||||||
|
|
Loading…
Reference in New Issue