Просмотр исходного кода

Issue #282 - Paint operations should ignore lines, after all only geometries that have a valid area should be painted.

Victor Benso 6 лет назад
Родитель
Сommit
328677aa36
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      flatcamTools/ToolPaint.py

+ 2 - 1
flatcamTools/ToolPaint.py

@@ -1068,8 +1068,9 @@ class ToolPaint(FlatCAMTool, Gerber):
 
 
                 for geo in recurse(obj.solid_geometry):
                 for geo in recurse(obj.solid_geometry):
                     try:
                     try:
+                        #Polygons are the only really paintable geometries, lines in theory have no area to be painted
                         if not isinstance(geo, Polygon):
                         if not isinstance(geo, Polygon):
-                            geo = Polygon(geo)
+                            continue
                         poly_buf = geo.buffer(-paint_margin)
                         poly_buf = geo.buffer(-paint_margin)
 
 
                         if paint_method == "seed":
                         if paint_method == "seed":