- added a Laser preprocessor named 'Z_laser' which will change the Z to the Travel Z on each ToolChange event allowing therefore control of the dot size

- by default now a new blank Geometry object created by FlatCAM is of type multigeo
- made sure that optimizations of lines when importing SVG or DXF as lines will not encounter polygons but only LinesStrings or LinearRings, otherwise having crashes
- fixed the import SVG and import DXF, when importing as Geometry to be imported as multigeo tool
- fixed the import SVG and import DXF, the source files will be saved as loaded into the source_file attribute of the resulting object (be it Geometry or Gerber)
This commit is contained in:
Marius Stanciu
2020-07-23 00:44:33 +03:00
parent cf78211a6f
commit b8fb64a143
7 changed files with 308 additions and 84 deletions

View File

@@ -223,11 +223,37 @@ class AppObject(QtCore.QObject):
:return: None
"""
outname = 'new_geo'
def initialize(obj, app):
obj.multitool = False
obj.multitool = True
obj.multigeo = True
# store here the default data for Geometry Data
default_data = {}
self.new_object('geometry', 'new_geo', initialize, plot=False)
for opt_key, opt_val in app.options.items():
if opt_key.find('geometry' + "_") == 0:
oname = opt_key[len('geometry') + 1:]
default_data[oname] = self.app.options[opt_key]
if opt_key.find('tools_mill' + "_") == 0:
oname = opt_key[len('tools_mill') + 1:]
default_data[oname] = self.app.options[opt_key]
obj.tools = {}
obj.tools.update({
1: {
'tooldia': float(app.defaults["geometry_cnctooldia"]),
'offset': 'Path',
'offset_value': 0.0,
'type': _('Rough'),
'tool_type': 'C1',
'data': deepcopy(default_data),
'solid_geometry': []
}
})
obj.tools[1]['data']['name'] = outname
self.new_object('geometry', outname, initialize, plot=False)
def new_gerber_object(self):
"""