Measuring: validation for zero distance moved from backend to frontend
This commit is contained in:
parent
dda0b50b5c
commit
05e82b1fc5
2 changed files with 1 additions and 9 deletions
|
@ -1060,14 +1060,6 @@ MeasurementResult get_measurement(const SurfaceFeature& a, const SurfaceFeature&
|
|||
else
|
||||
result.angle = angle_plane_plane(f1.get_plane(), f2.get_plane());
|
||||
}
|
||||
|
||||
// validation
|
||||
if (result.distance_infinite.has_value() && result.distance_infinite->dist < EPSILON)
|
||||
result.distance_infinite.reset();
|
||||
if (result.distance_strict.has_value() && result.distance_strict->dist < EPSILON)
|
||||
result.distance_strict.reset();
|
||||
if (result.angle.has_value() && std::abs(result.angle->angle) < EPSILON)
|
||||
result.angle.reset();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -905,7 +905,7 @@ void GLGizmoMeasure::render_dimensioning()
|
|||
return;
|
||||
|
||||
auto point_point = [this, shader](const Vec3d& v1, const Vec3d& v2, float distance) {
|
||||
if (v1.isApprox(v2))
|
||||
if ((v2 - v2).squaredNorm() < 0.000001)
|
||||
return;
|
||||
|
||||
const Camera& camera = wxGetApp().plater()->get_camera();
|
||||
|
|
Loading…
Reference in a new issue