I did not try this patch, but there are substantial problems with it
because it reverts a lot of changes introduced in other commits.  Most
likely this is because the work was begun without using git, and when
switching to git you started with a different git version than you were
using before.  I've interspersed my remarks with extracts from the
patch.


> +        global xy_feeds,uv_feeds

Please look for alternatives to global variables

> @@ -205,11 +250,11 @@ class GLCanon(Translated, ArcsToSegmentsMixin):
>              emc.line9(geometry, line[1], line[2])
>              coords.append(line[1][:3])
>              coords.append(line[2][:3])
> -        glEnd()
>          for line in self.dwells:
>              if line[0] != lineno: continue
>              self.draw_dwells([(line[0], c) + line[2:]], 2, 0)
>              coords.append(line[2:5])
> +        glEnd()
>          glLineWidth(1)
>          if coords:
>              x = reduce(lambda x,y:x+y, [c[0] for c in coords]) / len(coords)

This change must be a mistake.  It is exactly reverting a bugfix from April:

commit 7561fb23bb86c806fd621b2babd0f38d20c9e88a
Author: Jeff Epler <jep...@unpythonic.net>
Date:   Mon Apr 25 14:55:25 2011 -0500

    axis: fix traceback when clicking on a dwell mark

diff --git a/lib/python/rs274/glcanon.py b/lib/python/rs274/glcanon.py
index 77683eb..88b091c 100644
--- a/lib/python/rs274/glcanon.py
+++ b/lib/python/rs274/glcanon.py
@@ -205,11 +205,11 @@ class GLCanon(Translated, ArcsToSegmentsMixin):
             emc.line9(geometry, line[1], line[2])
             coords.append(line[1][:3])
             coords.append(line[2][:3])
+        glEnd()
         for line in self.dwells:
             if line[0] != lineno: continue
             self.draw_dwells([(line[0], c) + line[2:]], 2, 0)
             coords.append(line[2:5])
-        glEnd()
         glLineWidth(1)
         if coords:
             x = reduce(lambda x,y:x+y, [c[0] for c in coords]) / len(coords)

> +        #sammel

Please do not add comments like this.  git tracks who wrote the code and
when.  So these comments add no value.

> +            #grid to inch internal 
> +            if unitcode == "G20":
> +                grid_space = grid_space / 25.4
> +                if grid_space < 0.01:grid_space = 0.01

I am unsure about this code.  There are (at least :-/) two ideas of
units: the one that is the currently active modal code in the
interpreter, and the one requested by the user for the DRO.  Is there
a reason to introduce this new global variable here instead of using one
of those concepts?

> +                g5x_offset = self.to_internal_units(s.g5x_offset)[:3]
> +                g92_offset = self.to_internal_units(s.g92_offset)[:3]
>                  olist = self.dlist('draw_small_origin',
>                                          gen=self.draw_small_origin)
>                  glCallList(olist)
> -                g5x_offset = self.to_internal_units(s.g5x_offset)[:3]
> -                g92_offset = self.to_internal_units(s.g92_offset)[:3]

Does this change make any difference?

> -            glLineStipple(1, 0x1111)
> +            #glLineStipple(1, 0x1111)

Why?

>          glColor3f(*self.colors['axis_x'])
> +        
> +        glLineWidth(2.0)

Why?

> -            glPopMatrix()
>  
> +            glPopMatrix()

>          glVertex3f(0.0,1.0,0.0)
> +
>          glEnd()

Avoid making whitespace-only changes.  When the organization of the code
is so bad to begin with that regularizing whitespace is beneficial, then
do it as a separate commit.

> -
> -lappend auto_path $::emc::TCL_LIB_DIR

You've accidentally reverted another bugfix from Nov 7 2011 by Dewey
Garrett (git id f78bfe069)
>  label ${pane_top}.feedoverride.foentry \
>       -textvariable feedrate \
> -     -width 4 \
> +     -width 3 \
>          -anchor e

And a bugfix by Kim Kirwan from March 2011. (git id 4188056)

> -#!/usr/bin/env python2
> +#!/usr/bin/python

Why?

> -        while error: 
> +        if error: 
...
> -            error = e.poll()
>          self.error_after = self.win.after(200, self.error_task)

You've reverted a change by Michael Harbler on March 2011 (git id
b44be2dd)

> +        #hier die aktuelle maschinenposition
> +        aktuell = self.stat.joint_actual_position

Use English for variable names.
>  
> -def manual_tab_visible():
> -    page = root_window.tk.call(widgets.tabs, "raise")
> -    return page == "manual"
> -
>  def manual_ok(do_poll=True):
> -    """warning: deceptive function name.
> -
> -This function returns TRUE when not running a program, i.e., when a user-
> -initiated action (whether an MDI command or a jog) is acceptable.
> -
> -This means this function returns True when the mdi tab is visible."""

More changes by other authors that you have reverted
> -        root_window.bind_class(".info.progress", "<Escape>", cancel_open)

Why?

> -        self.m = m = Message(t, text=text, aspect=500, anchor="w", 
> justify="left")
> +        m = Message(t, text=text, aspect=500, anchor="w", justify="left")
...
> -    def set_text(self, text):
> -        self.m.configure(text=text)
> -
...
>  class _prompt_touchoff(_prompt_float):
> -    def __init__(self, title, text_pattern, default, defaultsystem):
> +    def __init__(self, title, text, default, defaultsystem):
...
> -        self.text_pattern = text_pattern
> -        text = text_pattern % self.workpiece_or_fixture(defaultsystem)
...
> -        c.trace_variable("w", self.change_system)
...
> -    def workpiece_or_fixture(self, s):
> -        if s.startswith('T') and vars.tto_g11.get():
> -            return _("fixture")
> -        return _("workpiece")
> -
> -    def change_system(self, *args):
> -        system = self.c.get()
> -        text = self.text_pattern % self.workpiece_or_fixture(system)
> -        self.set_text(text)
> -
...
> -                _("Enter %s coordinate relative to %%s:")
> +                _("Enter %s coordinate relative to workpiece:")

Apparently another change that you have unintentionally reverted

>  def jog(*args):
>      if not manual_ok(): return
> -    if not manual_tab_visible(): return
...
> -    if not manual_tab_visible(): return

Apparently another change that you have unintentionally reverted

> +t.tag_configure("lineno", foreground="#808080")#808080

Accidental change?

> +test=live_plotter.get_xyuv_live_plot_data()

Why?

> -#forget(widgets.mist, "iocontrol.0.coolant-mist")
> -#forget(widgets.flood, "iocontrol.0.coolant-flood")
> -#forget(widgets.lubel, "iocontrol.0.coolant-flood", 
> "iocontrol.0.coolant-mist")
> +forget(widgets.mist, "iocontrol.0.coolant-mist")
> +forget(widgets.flood, "iocontrol.0.coolant-flood")
> +forget(widgets.lubel, "iocontrol.0.coolant-flood", 
> "iocontrol.0.coolant-mist")

Why?

------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to