From b74a1b0708a40ccdd7c0315e2ce3db692b7eb378 Mon Sep 17 00:00:00 2001 From: Roy-043 <70520633+Roy-043@users.noreply.github.com> Date: Fri, 14 Oct 2022 21:08:29 +0200 Subject: [PATCH] Draft: Fix path array float math issue --- src/Mod/Draft/draftobjects/patharray.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Mod/Draft/draftobjects/patharray.py b/src/Mod/Draft/draftobjects/patharray.py index 014f19ed62..85b92ebfd6 100644 --- a/src/Mod/Draft/draftobjects/patharray.py +++ b/src/Mod/Draft/draftobjects/patharray.py @@ -452,14 +452,15 @@ def placements_on_path(shapeRotation, pathwire, count, xlate, align, for j in range(0, len(ends)): if travel <= ends[j]: iend = j + remains = ends[iend] - travel + offset = path[iend].Length - remains break else: # avoids problems with float math travel > ends[-1] iend = len(ends) - 1 + offset = path[iend].Length # place shape at proper spot on proper edge - remains = ends[iend] - travel - offset = path[iend].Length - remains pt = path[iend].valueAt(get_parameter_from_v0(path[iend], offset)) place = calculate_placement(shapeRotation, path[iend], offset,