diff --git a/source/blender/blenkernel/intern/curves_geometry.cc b/source/blender/blenkernel/intern/curves_geometry.cc index 0fd58a52f81..21b1fbffa02 100644 --- a/source/blender/blenkernel/intern/curves_geometry.cc +++ b/source/blender/blenkernel/intern/curves_geometry.cc @@ -797,6 +797,13 @@ Span CurvesGeometry::evaluated_normals() const break; } +#ifdef DEBUG + for (const int i : evaluated_points) { + const float3 &normal = evaluated_normals[i]; + BLI_ASSERT_UNIT_V3(normal); + } +#endif + /* If the "tilt" attribute exists, rotate the normals around the tangents by the * evaluated angles. We can avoid copying the tilts to evaluate them for poly curves. */ if (!(tilt.is_single() && tilt.get_internal_single() == 0.0f)) { @@ -817,6 +824,13 @@ Span CurvesGeometry::evaluated_normals() const evaluated_tilts.as_span()); } } + +#ifdef DEBUG + for (const int i : evaluated_points) { + const float3 &normal = evaluated_normals[i]; + BLI_ASSERT_UNIT_V3(normal); + } +#endif } }); });