From d1174dc4b32a5999259ed5ceff89c488746d576e Mon Sep 17 00:00:00 2001 From: Russell Johnson <47639332+Russ4262@users.noreply.github.com> Date: Sun, 21 Feb 2021 14:15:41 -0600 Subject: [PATCH] Path: Add check for `CustomPoint` input If custom points are same, the user has not entered acceptable values for path generation with custom points. --- src/Mod/Path/PathScripts/PathSlot.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Mod/Path/PathScripts/PathSlot.py b/src/Mod/Path/PathScripts/PathSlot.py index 1b9ee73f82..bdafd00e87 100644 --- a/src/Mod/Path/PathScripts/PathSlot.py +++ b/src/Mod/Path/PathScripts/PathSlot.py @@ -433,7 +433,12 @@ class ObjectSlot(PathOp.ObjectOp): # Use custom inputs here p1 = obj.CustomPoint1 p2 = obj.CustomPoint2 - if p1.z == p2.z: + if p1 == p2: + msg = translate('PathSlot', + 'Custom points are identical.') + FreeCAD.Console.PrintError(msg + '\n') + return False + elif p1.z == p2.z: pnts = (p1, p2) else: msg = translate('PathSlot',