- From f605fc571f913bf24ac8ff22b9a40007b4a0b0eb Mon Sep 17 00:00:00 2001
- From: SammelLothar <SammelLothar@gmx.de>
- Date: Tue, 24 Jan 2012 21:41:51 +0100
- Subject: [PATCH] foam-xyuv-Modification-2.6-pre
- ---
- lib/python/hershey.py | 10 +-
- lib/python/rs274/glcanon.py | 287 +++++++++++++++++++++++++++++----
- nc_files/foam-xyuv.ngc | 25 +++
- share/axis/tcl/axis.tcl | 5 +
- src/emc/usr_intf/axis/scripts/axis.py | 52 ++++++-
- 5 files changed, 339 insertions(+), 40 deletions(-)
- create mode 100644 nc_files/foam-xyuv.ngc
- diff --git a/lib/python/hershey.py b/lib/python/hershey.py
- index 16bb02a..6a07a3d 100644
- --- a/lib/python/hershey.py
- +++ b/lib/python/hershey.py
- @@ -17,7 +17,7 @@
- from minigl import *
- -translate = {'0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, '-': 10, '.': 11, 'X': 12, 'Y': 13, 'Z': 14, 'G': 15}
- +translate = {'0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, '-': 10, '.': 11, 'X': 12, 'Y': 13, 'Z': 14, 'G': 15,'V':16,'U':17}
- class Hershey:
- def __init__(self):
- @@ -92,8 +92,12 @@ class Hershey:
- (160.0, 380.0), (200.0, 420.0), (260.0, 440.0), (280.0, 440.0),
- (340.0, 420.0), (380.0, 380.0), (400.0, 320.0),
- (400.0, 280.0), (270.0, 280.0)
- -
- - ]]
- + ]],
- + # V
- + [[(60, 20), (200, 440)], [(340, 20), (200, 440)]],
- + # U
- + [[(60, 20), (60, 400),(95,410),(130,420),(165,430),(200,440)],
- + [(340, 20),(340, 400),(305, 410),(270, 420),(235, 430),(200, 440)]]
- )
- diff --git a/lib/python/rs274/glcanon.py b/lib/python/rs274/glcanon.py
- index 75322bb..d704446 100644
- --- a/lib/python/rs274/glcanon.py
- +++ b/lib/python/rs274/glcanon.py
- @@ -78,6 +78,10 @@ class GLCanon(Translated, ArcsToSegmentsMixin):
- self.g5x_offset_u = 0.0
- self.g5x_offset_v = 0.0
- self.g5x_offset_w = 0.0
- + self.xyuv_live_plot_data = []
- + self.grid_space = 10.0
- + self.xy_plane_z_position = 5.0
- + self.uv_plane_z_position = 30.0
- def comment(self, arg):
- if arg.startswith("AXIS,"):
- @@ -86,7 +90,35 @@ class GLCanon(Translated, ArcsToSegmentsMixin):
- if command == "stop": raise KeyboardInterrupt
- if command == "hide": self.suppress += 1
- if command == "show": self.suppress -= 1
- -
- + if command == "XY_Z_POS":
- + if len(parts) > 2 :
- + try:
- + self.xy_plane_z_position = float(parts[2])
- + if 210 in self.state.gcodes:
- + self.xy_plane_z_position = self.xy_plane_z_position / 25.4
- + except:
- + self.xy_plane_z_position = 5.0/25.4
- + if command == "UV_Z_POS":
- + if len(parts) > 2 :
- + try:
- + self.uv_plane_z_position = float(parts[2])
- + if 210 in self.state.gcodes:
- + self.uv_plane_z_position = self.uv_plane_z_position / 25.4
- + except:
- + self.uv_plane_z_position = 30.0
- + if command == "GRID":
- + if len(parts) > 2 :
- + try:
- + self.grid_space = float(parts[2])
- + if 210 in self.state.gcodes:
- + self.grid_space=self.grid_space / 25.4
- + except:
- + self.grid_space = 5.0/25.4
- +
- + def get_grid_space(self):return self.grid_space
- + def get_xy_plane_z_position(self):return self.xy_plane_z_position
- + def get_uv_plane_z_position(self):return self.uv_plane_z_position
- +
- def message(self, message): pass
- def check_abort(self): pass
- @@ -96,7 +128,21 @@ class GLCanon(Translated, ArcsToSegmentsMixin):
- self.lineno = self.state.sequence_number
- def draw_lines(self, lines, for_selection, j=0):
- - return linuxcnc.draw_lines(self.geometry, lines, for_selection)
- + if 171 in self.state.gcodes: