mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
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
This commit is contained in:
parent
507459660e
commit
5653c8c9ae
1 changed files with 3 additions and 0 deletions
|
@ -169,6 +169,9 @@ class FlavorParser:
|
||||||
# A threshold is set to avoid weird paths in the GCode
|
# A threshold is set to avoid weird paths in the GCode
|
||||||
if line_width > 1.2:
|
if line_width > 1.2:
|
||||||
return 0.35
|
return 0.35
|
||||||
|
# Prevent showing infinitely wide lines
|
||||||
|
if line_width < 0.0:
|
||||||
|
return 0.0
|
||||||
return line_width
|
return line_width
|
||||||
|
|
||||||
def _gCode0(self, position: Position, params: PositionOptional, path: List[List[Union[float, int]]]) -> Position:
|
def _gCode0(self, position: Position, params: PositionOptional, path: List[List[Union[float, int]]]) -> Position:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue