====== Step 5: Don't mill another thing ====== **Or: Getting an actual shape from a drawing to the mill** OK so we've had the mill [[3-mill_something|write something]] using the default LinuxCNC example code, but LinuxCNC is not for //designing// anything, it only runs G-code //generated// by a CAM or CAD package. So, we've [[4-more_software|got more software]] and can now try and generate something "original" - in this case we're going to trace a picture in Inkscape, save it as SVG and use PyCAM to turn it into G-Code as described [[http://pycam.sourceforge.net/modeling-inkscape-svg/|here]]. **Wrinkle**\\ Inkscape translates a bitmap image by outlining //both sides of the lines//, which gives an unexpected double-edged result in the same way PyCAM does with regular fonts. There's ways around this which we'll no doubt get to later. ===== Step 5a: Find a shape ===== We went on the internet, and we found this! {{http://fuddymuckers.co.uk/gallery/cnc/moose.png}} ===== Step 5b: Load it into Inkscape ===== Load into Inkscape, right-click, something something... trace bitmap! {{ http://fuddymuckers.co.uk/gallery/s/800/cnc/inkscape_trace.png }} {{ http://fuddymuckers.co.uk/gallery/s/800/cnc/inkscape_trace_menu.png }} Save as SVG. **Yes I forgot what I did here, will update later if I remember!** ===== Step 5c: Load into PyCam ===== {{http://fuddymuckers.co.uk/gallery/s/500/cnc/pycam_moose.png}} The wrinkle here is Inkscape has dutifully traced the inside & outside of the shape as two separate lines, so we're getting two separate tool paths: {{http://fuddymuckers.co.uk/gallery/cnc/pycam_moose_path.png}} Also note the shape is wherever it was on the A4 page in Inkscape - miles away from the machine's "home". If only there was an easy button to fix that... {{http://fuddymuckers.co.uk/gallery/s/500/cnc/pycam_moose_origin.png}} That's better - the shape now sits at X0,Y0,Z0. ===== Step 5d: Stop writing, it's bedtime! ===== Back later - stay tuned! {{http://fuddymuckers.co.uk/gallery/s/500/cnc/redguy1.png}}