elliotf / heekscnc

Automatically exported from code.google.com/p/heekscnc
Other
1 stars 0 forks source link

Various problems with drill operations #306

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Using svn from about 1st of May

What steps will reproduce the problem?
1. Create a point
2. Add a drill operation
3. Make python

What is the expected output?
A drilling operation appearing in the Gcode box

 What do you see instead?
Various format related errors along the lines of:
Traceback (most recent call last):
  File "/tmp/post.py", line 27, in <module>
    drill(x=-5, y=13, z=0, depth=8, standoff=3, dwell=1, peck_depth=1, retract_mode=0, spindle_mode=0)
  File "/usr/lib/heekscnc/nc/nc.py", line 567, in drill
    creator.drill(x, y, z, depth, standoff, dwell, peck_depth, retract_mode, spindle_mode)
  File "/usr/lib/heekscnc/nc/iso.py", line 685, in drill
    self.write(self.PECK_DRILL() + self.PECK_DEPTH(self.fmt, peck_depth)) 
  File "/usr/lib/heekscnc/nc/iso.py", line 115, in PECK_DEPTH
    def PECK_DEPTH(self, format, depth): return('Q' + self.SPACE() + (format % depth))
TypeError: unsupported operand type(s) for %: 'instance' and 'int'

and no GCODE

What version of the product are you using? On what operating system?

Please provide any additional information below.

I think the problem is that the way format.py works has been updated at some 
point but iso.py hasn't been updated to keep up. I have tried to do so in the 
attached file, the changes should be indicated by a #Dave

Also FEEDRATE() didn't seem to be defined so I made it return 'F' which seemed 
about right.

When I got that to work I also got the following error:

Traceback (most recent call last):
  File "/usr/lib/heekscnc/backplot.py", line 13, in <module>
    parser.Parse(nc_file)
  File "/usr/lib/heekscnc/nc/iso_read.py", line 188, in Parse
    self.writer.add_line(self.x, self.y, self.r)
TypeError: add_line() takes exactly 7 arguments (4 given)
Traceback (most recent call last):
  File "/usr/lib/heekscnc/backplot.py", line 13, in <module>
    parser.Parse(nc_file)
  File "/usr/lib/heekscnc/nc/iso_read.py", line 188, in Parse
    self.writer.add_line(self.x, self.y, self.r)
TypeError: add_line() takes exactly 7 arguments (4 given)

I 'fixed' this by changing
       def add_line(self, x, y, z, a, b, c):
to
    def add_line(self, x = None, y = None, z = None, a = None, b = None, c = None):

in nc_read.py and hxml_writer.py

I don't know if that was the right thing to do but it seems to have worked, and 
now produces gcode.

  cheers
    Dave

Original issue reported on code.google.com by d...@nakedscientists.com on 12 May 2011 at 8:56

Attachments:

GoogleCodeExporter commented 8 years ago
The FEEDRATE is in the iso.py, but it isn't marked, sorry

Original comment by d...@nakedscientists.com on 12 May 2011 at 9:04

GoogleCodeExporter commented 8 years ago
I believe this has already been fixed.

Instead of this line:
def PECK_DEPTH(self, format, depth): return('Q' + self.SPACE() + (format % 
depth))

There is now:
    def PECK_DEPTH(self, format, depth): return('Q' + self.SPACE() + (format.string(depth)))

Original comment by danhe...@gmail.com on 12 May 2011 at 10:50

GoogleCodeExporter commented 8 years ago
Cool, I had a look in the change log but didn't notice anything in the last 
couple of weeks.

did you get the other 5-6 similar ones in the same file, the FEEDRATE() and 
add_line issues as well?

cheers

Original comment by d...@nakedscientists.com on 12 May 2011 at 11:51