- fixed some leftovers from Qt6 port

- some code optimizations in the Gerber Editor
- Corners Plugin now generate Gerber objects with the solid geometry flattened
- fixed issue where Gerber objects created from importing SVG geometries could not be edited
This commit is contained in:
Marius Stanciu
2021-09-21 23:41:56 +03:00
committed by Marius
parent 548b5c2e28
commit eaf9562854
6 changed files with 87 additions and 61 deletions

View File

@@ -1995,13 +1995,13 @@ class Gerber(Geometry):
self.solid_geometry = flatten_shapely_geometry(self.solid_geometry)
if 0 not in self.tools:
self.tools[0] = {
'type': 'REG',
'size': 0.0,
'geometry': []
'type': 'REG',
'size': 0.0,
'geometry': []
}
for pol in self.solid_geometry:
new_el = {'solid': pol, 'follow': pol.exterior}
new_el = {'solid': pol, 'follow': LineString(pol.exterior.coords)}
self.tools[0]['geometry'].append(new_el)
def import_dxf_as_gerber(self, filename, units='MM'):