From 6737f89e4916b5add06e412b8192e0007d5de03b Mon Sep 17 00:00:00 2001 From: Johnny Matthews Date: Tue, 14 Jun 2022 12:53:50 -0500 Subject: Fix T98718: Face Is Planar Node Not handling Certain Conditions The comparison between dot products of each point of the poly were not taking into consideration negative values. FLT_MIN was used rather than -FLT_MAX due to a misunderstanding of the FLT_MIN definition. Maniphest Tasks: T98718 Differential Revision: https://developer.blender.org/D15161 --- .../blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/nodes') diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc index c400760f902..532c3dc81e5 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc @@ -65,7 +65,7 @@ class PlanarFieldInput final : public GeometryFieldInput { float3 reference_normal = poly_normals[i_poly]; float min = FLT_MAX; - float max = FLT_MIN; + float max = -FLT_MAX; for (const int i_loop : poly_loops.index_range()) { const float3 vert = mesh->mvert[poly_loops[i_loop].v].co; -- cgit v1.2.3