From 780b5c8bf22f7e97865a683f57a328760253c60c Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Thu, 24 Jan 2019 01:56:22 +0200 Subject: [PATCH] - wip --- flatcamTools/ToolPaint.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/flatcamTools/ToolPaint.py b/flatcamTools/ToolPaint.py index 17996116..16928970 100644 --- a/flatcamTools/ToolPaint.py +++ b/flatcamTools/ToolPaint.py @@ -791,8 +791,9 @@ class ToolPaint(FlatCAMTool, Gerber): try: poly_buf = poly.buffer(-paint_margin) if isinstance(poly_buf, MultiPolygon): + cp = [] for pp in poly_buf: - cp = paint_p(pp) + cp.append(paint_p(pp)) else: cp = paint_p(poly_buf) except Exception as e: @@ -803,7 +804,11 @@ class ToolPaint(FlatCAMTool, Gerber): return if cp is not None: - geo_obj.solid_geometry = list(cp.get_objects()) + if isinstance(cp, list): + for x in cp: + geo_obj.solid_geometry += list(x.get_objects()) + else: + geo_obj.solid_geometry = list(cp.get_objects()) geo_obj.options["cnctooldia"] = tooldia # this turn on the FlatCAMCNCJob plot for multiple tools