- HPGL2 import: added support for circles, arcs and 3-point arcs. Everything works only for absolute coordinates.
This commit is contained in:
parent
f9580be396
commit
336970d7ea
|
@ -10987,11 +10987,11 @@ class App(QtCore.QObject):
|
||||||
# How the object should be initialized
|
# How the object should be initialized
|
||||||
def obj_init(geo_obj, app_obj):
|
def obj_init(geo_obj, app_obj):
|
||||||
|
|
||||||
# assert isinstance(geo_obj, FlatCAMGeometry), \
|
assert isinstance(geo_obj, FlatCAMGeometry), \
|
||||||
# "Expected to initialize a FlatCAMGeometry but got %s" % type(geo_obj)
|
"Expected to initialize a FlatCAMGeometry but got %s" % type(geo_obj)
|
||||||
|
|
||||||
# Opening the file happens here
|
# Opening the file happens here
|
||||||
obj = HPGL2()
|
obj = HPGL2(self)
|
||||||
try:
|
try:
|
||||||
HPGL2.parse_file(obj, filename)
|
HPGL2.parse_file(obj, filename)
|
||||||
except IOError:
|
except IOError:
|
||||||
|
@ -11009,13 +11009,16 @@ class App(QtCore.QObject):
|
||||||
return "fail"
|
return "fail"
|
||||||
|
|
||||||
geo_obj.multigeo = True
|
geo_obj.multigeo = True
|
||||||
geo_obj.solid_geometry = obj.solid_geometry
|
geo_obj.solid_geometry = deepcopy(obj.solid_geometry)
|
||||||
geo_obj.tools = obj.tools
|
geo_obj.tools = deepcopy(obj.tools)
|
||||||
|
geo_obj.source_file = deepcopy(obj.source_file)
|
||||||
|
|
||||||
# if geo_obj.is_empty():
|
del obj
|
||||||
# app_obj.inform.emit('[ERROR_NOTCL] %s' %
|
|
||||||
# _("Object is not HPGL2 file or empty. Aborting object creation."))
|
if not geo_obj.solid_geometry:
|
||||||
# return "fail"
|
app_obj.inform.emit('[ERROR_NOTCL] %s' %
|
||||||
|
_("Object is not HPGL2 file or empty. Aborting object creation."))
|
||||||
|
return "fail"
|
||||||
|
|
||||||
App.log.debug("open_hpgl2()")
|
App.log.debug("open_hpgl2()")
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ CAD program, and create G-Code for Isolation routing.
|
||||||
- optimized the FlatCAMGerber.clear_plot_apertures() method
|
- optimized the FlatCAMGerber.clear_plot_apertures() method
|
||||||
- some changes in the ObjectUI and for the Geometry UI
|
- some changes in the ObjectUI and for the Geometry UI
|
||||||
- finished a very rough and limited HPGL2 file import
|
- finished a very rough and limited HPGL2 file import
|
||||||
|
- HPGL2 import: added support for circles, arcs and 3-point arcs. Everything works only for absolute coordinates.
|
||||||
|
|
||||||
11.12.2019
|
11.12.2019
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue