Measuring - Fixed transformation of distance_xyz
This commit is contained in:
parent
236f97aded
commit
5df2713010
2 changed files with 5 additions and 5 deletions
|
@ -723,8 +723,8 @@ MeasurementResult get_measurement(const SurfaceFeature& a, const SurfaceFeature&
|
|||
if (f2.get_type() == SurfaceFeatureType::Point) {
|
||||
Vec3d diff = (f2.get_point() - f1.get_point());
|
||||
result.distance_strict = std::make_optional(DistAndPoints{diff.norm(), f1.get_point(), f2.get_point()});
|
||||
result.distance_xyz = diff;
|
||||
|
||||
result.distance_xyz = diff.cwiseAbs();
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
} else if (f2.get_type() == SurfaceFeatureType::Edge) {
|
||||
const auto [s,e] = f2.get_edge();
|
||||
|
|
|
@ -156,10 +156,10 @@ struct MeasurementResult {
|
|||
angle->transform(trafo);
|
||||
if (distance_infinite.has_value())
|
||||
distance_infinite->transform(trafo);
|
||||
if (distance_strict.has_value())
|
||||
if (distance_strict.has_value()) {
|
||||
distance_strict->transform(trafo);
|
||||
if (distance_xyz.has_value())
|
||||
distance_xyz = trafo * *distance_xyz;
|
||||
distance_xyz = (distance_strict->to - distance_strict->from).cwiseAbs();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue