Skip to content

Commit 856d66c

Browse files
authored
Merge pull request #187 from TommasoSorgente/patch-1
bugfix (missing rotation axis normalization in polygon_flatten)
2 parents 1ac2bb9 + 6b28a2d commit 856d66c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

include/cinolib/geometry/polygon_utils.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ bool polygon_flatten(const std::vector<vec3d> & poly3d,
121121

122122
vec3d Z = vec3d(0,0,1);
123123
vec3d axis = best_fit.n.cross(Z);
124+
axis.normalize();
124125
double angle = best_fit.n.angle_rad(Z);
125126
mat3d R = mat3d::ROT_3D(axis, angle);
126127

0 commit comments

Comments
 (0)