Skip to content

Commit

Permalink
more pythonic params (thanks plaes)
Browse files Browse the repository at this point in the history
  • Loading branch information
sliptonic committed Oct 16, 2020
1 parent 0159104 commit c8712b8
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/Mod/Path/PathScripts/PathUtils.py
Expand Up @@ -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

Expand Down

0 comments on commit c8712b8

Please sign in to comment.