Add eval() to image scaling in image workbench

Merged, abandoned or rejected pull requests are moved here to clear the main Pull Requests forum.
Post Reply
TheMarkster
Posts: 986
Joined: Thu Apr 05, 2018 1:53 am

Add eval() to image scaling in image workbench

Post by TheMarkster » Sat Sep 01, 2018 11:27 pm

https://github.com/FreeCAD/FreeCAD/pull/1638

This adds the ability to enter things like 6 * 25.4 into the distance line edit widget during scaling operations in the image workbench. Can also enter something like math.pi * 3 or 2**3, etc. Basically, any legal python input can be used.

Using eval() is not considered a secure way of doing things, but in this context the user would be entering malicious code into his own computer. Also, what can the user do in eval() that he can't already do just by entering directly into the python console?

phpBB [video]

Post Reply