diff options
author | Tim Kuipers <t.kuipers@ultimaker.com> | 2020-02-24 16:51:23 +0300 |
---|---|---|
committer | Tim Kuipers <t.kuipers@ultimaker.com> | 2020-02-24 16:55:42 +0300 |
commit | 5653c8c9ae5b2bf7e763cea9ae589f222b9b04e6 (patch) | |
tree | 491a50d9a1630f6796863170dd35985204dac26b /plugins/GCodeReader | |
parent | 507459660e0196c4bdc1770b347b6496718b0624 (diff) |
Avoid showing infinitely wide lines in gcode
lines less than zero wide are displayed as very wide; prevent negative extrusion lines from being generated in the first place
CURA-7066
Diffstat (limited to 'plugins/GCodeReader')
-rw-r--r-- | plugins/GCodeReader/FlavorParser.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/GCodeReader/FlavorParser.py b/plugins/GCodeReader/FlavorParser.py index 7bb9ad0e4a..2a61859b4e 100644 --- a/plugins/GCodeReader/FlavorParser.py +++ b/plugins/GCodeReader/FlavorParser.py @@ -169,6 +169,9 @@ class FlavorParser: # A threshold is set to avoid weird paths in the GCode if line_width > 1.2: return 0.35 + # Prevent showing infinitely wide lines + if line_width < 0.0: + return 0.0 return line_width def _gCode0(self, position: Position, params: PositionOptional, path: List[List[Union[float, int]]]) -> Position: |