mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-12 04:01:51 +08:00
Measuring: validation for zero distance moved from backend to frontend
This commit is contained in:
parent
dda0b50b5c
commit
05e82b1fc5
@ -1061,14 +1061,6 @@ MeasurementResult get_measurement(const SurfaceFeature& a, const SurfaceFeature&
|
|||||||
result.angle = angle_plane_plane(f1.get_plane(), f2.get_plane());
|
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;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -905,7 +905,7 @@ void GLGizmoMeasure::render_dimensioning()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
auto point_point = [this, shader](const Vec3d& v1, const Vec3d& v2, float distance) {
|
auto point_point = [this, shader](const Vec3d& v1, const Vec3d& v2, float distance) {
|
||||||
if (v1.isApprox(v2))
|
if ((v2 - v2).squaredNorm() < 0.000001)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const Camera& camera = wxGetApp().plater()->get_camera();
|
const Camera& camera = wxGetApp().plater()->get_camera();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user