Just a few calls to min() or max() do the trick, rather than if statements.
I consider this more semantic, because we just intend to clamp values here, and min() and max() are commonly used to do that.
It should also be slightly faster because it's less Python and more internal in CPython, but considering that this happens at best like 60 times per second the performance impact of this will be practically nil.
This was probably copy-pasted wrongly years ago.
The Cura interface currently doesn't allow changing the minimum path anyway, so this doesn't have any effect on the actual behaviour of Cura. Still, can't hurt to fix this, for posterity.
The commit adds:
- Machine definition files for the Layer One Atom 3 and Atom 3 Lite Printer
- One shared extruder definition file for the Atom 3 and the Atom 3 Lite
- A mesh file for the Atom 3 and Atom 3 Lite
- Variant files for [0.2; 0.4; 0.6]mm Nozzles for PTFE and full metal hotends
The code is clearly written to take into account that 'addresses' may be null. But not that the whole 'addresses' attribute may not exist. And then instead of printing one warning (Could not get information about XX) it instead printed a stacktrace and retried and printed a stacktrace and retried and printed a stacktrace and.... It ended up driving me a bit nuts when looking at the logs for unrelated reasons. So Ifinallay fixed it. Could end up as a speedup in some cases as well I suppose?
No idea why this was there in the first place. Our archeology attempts couldn't
find out as to why it was introduced. We suspect an issue with other Qt versions.
At least now ロボット.stl will not be mangled into ロホット.gcode upon saving (and
german bears into bars)
* Update in Definition file for Hellbot Magna 1
* Change the Author name and version number.
* Added Heated bed.
* Added specific Gcode for purging the 2 in 1 hotend.
* Add bed images for Hellbot Hidra and Hidra Plus
* Add meshes files for Hellbot Hidra and Hidra plus
* Add extruder files for new Hellbot printers
* Add extruder files for new Hellbot Printers: Hellbot Hidra and Hellbot Hidra Plus
* Add New Hellbot printers
* Add definition files for the new Hellbot printers: Hidra and Hidra Plus
CURA-8047
The previous default position was aimed at 100mm above the build plate. This is taller than most models that people load into Cura. It's now aimed at 30mm. Models up to 50mm are way more common to print, so this brings it right in the butter zone for most people, hopefully.
Fixes#9251.