Tuesday, January 25, 2011

Drag knife compensation

Someone asked about calculating a path for drag knife compensation, so I had a go at writing an  OffsetForward method for my Curve class. See the code here.

4 comments:

bkubiat said...

http://code.google.com/p/grecode/
I have made a tool that also does knive compensation for gcodes.

Dan Heeks said...

Thanks. Does it do arcs? Do you have a picture of some results of it working?

Hans Werner said...

Hi Dan
I like Heekscnc. I would like to use your drag knife compensation. But i don´t know how to implement it into Heekscnc. Thank you for your support!

Dan Heeks said...

Hans,
In HeeksCNC/kurve_funcs.py, you could add this line:
offset_curve.OffsetForward(0.5, True)

here:
"
def profile(curve, direction = "on", radius = 1.0, offset_extra = 0.0, roll_radius = 2.0, roll_on = None, roll_off = None, rapid_down_to_height = None, clearance = None, start_depth = None, step_down = None, final_depth = None):
global tags

offset_curve = area.Curve(curve)
offset_curve.OffsetForward(0.5, True)
"

where 0.5 is the distance that the knife point is behind the spindle centre line.