From c8712b83f85ce90c5be360e2a2dc7ae843336450 Mon Sep 17 00:00:00 2001 From: sliptonic Date: Fri, 16 Oct 2020 13:49:47 -0500 Subject: [PATCH] more pythonic params (thanks plaes) --- src/Mod/Path/PathScripts/PathUtils.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathUtils.py b/src/Mod/Path/PathScripts/PathUtils.py index 0cce50d5b936..5662feddf8b9 100644 --- a/src/Mod/Path/PathScripts/PathUtils.py +++ b/src/Mod/Path/PathScripts/PathUtils.py @@ -983,16 +983,7 @@ def RtoIJ(startpoint, command): relativecenter = chord.scale(0.5, 0.5, 0.5).add(perp) # build new command - params = {} - if 'X' in command.Parameters: - params['X'] = command.Parameters['X'] - if 'Y' in command.Parameters: - params['Y'] = command.Parameters['Y'] - if 'Z' in command.Parameters: - params['Z'] = command.Parameters['Z'] - if 'F' in command.Parameters: - params['F'] = command.Parameters['F'] - + params = { c: command.Parameters[c] for c in 'XYZF' if c in command.Parameters} params['I'] = relativecenter.x params['J'] = relativecenter.y