Commit | Line | Data |
---|---|---|
7f1b0236 TM |
1 | from svg_gcode import * |
2 | file="test/test_vector.svg" | |
3 | file="/home/harvie/Work/Designs/cnc/loga/mardera.svg" | |
4 | file="/home/harvie/Work/Designs/cnc/loga/logo_spoje.svg" | |
5 | comp_instance = SVGcode(file) | |
6 | comp_instance.find_paths() # Extract path coordinates | |
7 | comp_instance.linearize_paths(curve_fidelity = 10) # Convert paths into polygons | |
8 | #comp_instance.write(outputfile = "hrv.svg") | |
9 | #print(comp_instance.linear_coords[0]) | |
10 | for path in comp_instance.linear_coords: | |
11 | p = path[0] | |
12 | print("g0 x%s y%s"%(str(p[0]),str(p[1]))) | |
13 | for p in path: | |
14 | print("g1 x%s y%s"%(str(p[0]),str(p[1]))) | |
15 | print "( ---------- cut-here ---------- )" |