- HPGL2 import: added support for circles, arcs and 3-point arcs. Everything works only for absolute coordinates.

This commit is contained in:
Marius Stanciu 2019-12-13 15:54:26 +02:00
parent f9580be396
commit 336970d7ea
3 changed files with 149 additions and 789 deletions

View File

@ -10987,11 +10987,11 @@ class App(QtCore.QObject):
# How the object should be initialized
def obj_init(geo_obj, app_obj):
# assert isinstance(geo_obj, FlatCAMGeometry), \
# "Expected to initialize a FlatCAMGeometry but got %s" % type(geo_obj)
assert isinstance(geo_obj, FlatCAMGeometry), \
"Expected to initialize a FlatCAMGeometry but got %s" % type(geo_obj)
# Opening the file happens here
obj = HPGL2()
obj = HPGL2(self)
try:
HPGL2.parse_file(obj, filename)
except IOError:
@ -11009,13 +11009,16 @@ class App(QtCore.QObject):
return "fail"
geo_obj.multigeo = True
geo_obj.solid_geometry = obj.solid_geometry
geo_obj.tools = obj.tools
geo_obj.solid_geometry = deepcopy(obj.solid_geometry)
geo_obj.tools = deepcopy(obj.tools)
geo_obj.source_file = deepcopy(obj.source_file)
# if geo_obj.is_empty():
# app_obj.inform.emit('[ERROR_NOTCL] %s' %
# _("Object is not HPGL2 file or empty. Aborting object creation."))
# return "fail"
del obj
if not geo_obj.solid_geometry:
app_obj.inform.emit('[ERROR_NOTCL] %s' %
_("Object is not HPGL2 file or empty. Aborting object creation."))
return "fail"
App.log.debug("open_hpgl2()")

View File

@ -18,6 +18,7 @@ CAD program, and create G-Code for Isolation routing.
- optimized the FlatCAMGerber.clear_plot_apertures() method
- some changes in the ObjectUI and for the Geometry UI
- 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

File diff suppressed because it is too large Load Diff