Fixed bug in get_measurement() function

This commit is contained in:
enricoturri1966 2022-09-26 13:17:41 +02:00
parent ba21f54afb
commit 4dd005a554

View File

@ -518,7 +518,7 @@ MeasurementResult get_measurement(const SurfaceFeature& a, const SurfaceFeature&
const auto& [idx2, normal2, pt2] = f2.get_plane(); const auto& [idx2, normal2, pt2] = f2.get_plane();
double angle = 0.; double angle = 0.;
if (! normal1.isApprox(normal2)) { if (normal1.isApprox(normal2)) {
// The planes are parallel, calculate distance. // The planes are parallel, calculate distance.
Eigen::Hyperplane<double, 3> plane(normal1, pt1); Eigen::Hyperplane<double, 3> plane(normal1, pt1);
result.distance_infinite = plane.absDistance(pt2); result.distance_infinite = plane.absDistance(pt2);