- made the delayed Gerber buffering to use multiprocessing but I see not much performance increase
This commit is contained in:
@@ -388,16 +388,25 @@ class GerberObject(FlatCAMObj, Gerber):
|
|||||||
except (TypeError, AttributeError):
|
except (TypeError, AttributeError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def buffer_handler(geo):
|
||||||
|
new_geo = geo
|
||||||
|
if isinstance(new_geo, list):
|
||||||
|
new_geo = MultiPolygon(new_geo)
|
||||||
|
|
||||||
|
new_geo = new_geo.buffer(0.0000001)
|
||||||
|
new_geo = new_geo.buffer(-0.0000001)
|
||||||
|
|
||||||
|
return new_geo
|
||||||
|
|
||||||
def on_generate_buffer(self):
|
def on_generate_buffer(self):
|
||||||
self.app.inform.emit('[WARNING_NOTCL] %s...' % _("Buffering solid geometry"))
|
self.app.inform.emit('[WARNING_NOTCL] %s...' % _("Buffering solid geometry"))
|
||||||
|
|
||||||
def buffer_task():
|
def buffer_task():
|
||||||
with self.app.proc_container.new('%s...' % _("Buffering")):
|
with self.app.proc_container.new('%s...' % _("Buffering")):
|
||||||
if isinstance(self.solid_geometry, list):
|
output = self.app.pool.apply_async(self.buffer_handler, args=([self.solid_geometry]))
|
||||||
self.solid_geometry = MultiPolygon(self.solid_geometry)
|
self.solid_geometry = output.get()
|
||||||
|
|
||||||
self.solid_geometry = self.solid_geometry.buffer(0.0000001)
|
|
||||||
self.solid_geometry = self.solid_geometry.buffer(-0.0000001)
|
|
||||||
self.app.inform.emit('[success] %s.' % _("Done"))
|
self.app.inform.emit('[success] %s.' % _("Done"))
|
||||||
self.plot_single_object.emit()
|
self.plot_single_object.emit()
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ CHANGELOG for FlatCAM beta
|
|||||||
- Transform Tool - compacted the UI
|
- Transform Tool - compacted the UI
|
||||||
- minor issue in Paint Tool
|
- minor issue in Paint Tool
|
||||||
- added a new feature for Gerber parsing: if the NO buffering is chosen in the Gerber Advanced Preferences there is now a checkbox to activate delayed buffering which will do the buffering in background allowing the user to work in between. I hope that this can be useful in case of large Gerber files.
|
- added a new feature for Gerber parsing: if the NO buffering is chosen in the Gerber Advanced Preferences there is now a checkbox to activate delayed buffering which will do the buffering in background allowing the user to work in between. I hope that this can be useful in case of large Gerber files.
|
||||||
|
- made the delayed Gerber buffering to use multiprocessing but I see not much performance increase
|
||||||
|
|
||||||
2.06.2020
|
2.06.2020
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user