mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 07:34:03 -06:00
Measure: Fix wrong diameter when selecting a circle feature (#8575)
Suppress Eigen lazy evaluation by not using `auto`. VC++ compiler optimization does funny things with `intersection_pt` that breaks lazy evaluation.
This commit is contained in:
parent
fd8792f342
commit
6587f27086
1 changed files with 2 additions and 2 deletions
|
@ -1413,8 +1413,8 @@ void SurfaceFeature::translate(const Transform3d &tran)
|
||||||
auto calc_world_radius = [&local_center, &local_normal, &tran, &world_center](const Vec3d &pt, double &value) {
|
auto calc_world_radius = [&local_center, &local_normal, &tran, &world_center](const Vec3d &pt, double &value) {
|
||||||
Vec3d intersection_pt;
|
Vec3d intersection_pt;
|
||||||
get_point_projection_to_plane(pt, local_center, local_normal, intersection_pt);
|
get_point_projection_to_plane(pt, local_center, local_normal, intersection_pt);
|
||||||
auto local_radius_pt = (intersection_pt - local_center).normalized() * value + local_center;
|
Vec3d local_radius_pt = (intersection_pt - local_center).normalized() * value + local_center;
|
||||||
auto radius_pt = tran * local_radius_pt;
|
Vec3d radius_pt = tran * local_radius_pt;
|
||||||
value = (radius_pt - world_center).norm();
|
value = (radius_pt - world_center).norm();
|
||||||
};
|
};
|
||||||
//m_value is radius
|
//m_value is radius
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue