- fixed importing DXF file as Gerber method such that now the resulting Gerber object is correctly created having the geometry attributes like self.apertures and self.follow_geometry

This commit is contained in:
Marius Stanciu
2020-07-02 17:15:13 +03:00
parent 34c545ced5
commit e1dab238a7
5 changed files with 81 additions and 26 deletions

View File

@@ -54,8 +54,12 @@ class TclCommandOpenDXF(TclCommandSignaled):
# if geo_obj.kind != 'geometry' and geo_obj.kind != 'gerber':
# self.raise_tcl_error('Expected Geometry or Gerber, got %s %s.' % (outname, type(geo_obj)))
geo_obj.import_dxf(filename, obj_type, units=units)
if obj_type == "geometry":
geo_obj.import_dxf_as_geo(filename, units=units)
elif obj_type == "gerber":
geo_obj.import_dxf_as_gerber(filename, units=units)
else:
return "fail"
filename = args['filename']