Paste #XIM -- näytä pelkkänä tekstinä -- uusi tämän pohjalta
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | #!/usr/bin/python import csv print "G21 G94 G97" print "F60.0 S8000" print "g0z1" print "g10 l2 p1 x15.8 y8.8 z27.0" #print "g10 l2 p1 x15.4 y8.8 z34.7" print "g54" def cut(x, y): print "g1 x",x," y",y def rapid(x, y): print "g0 x",x," y",y def cutb(x, y): print "g1 x",x*2.54," y",y*2.54 def rapidb(x, y): print "g0 x",x*2.54," y",y*2.54 def rapidz(z): print "g0 z",z def cutz(z): print "g1 z",z def cuthole(x, y): rapidb(x+.3,y) cutz(-0.7) cutb(x-.3,y) rapidz(2.5) #rapidb(x, y) rapidz(2.5) csvreader = csv.reader(open('s.juku-cuts.csv')) for row in csvreader: cuthole(float(row[0]), float(row[1])) print "M2" |