And after a bit of digging, we found out why: the SVG specification does not allow for units - each image is simply made up of points, and then a transformation matrix (what else?) is applied to the whole image to scale it up/down, so that it matches the required units. Our co-ordinate points at least now look consistent (there are a few 19.44821 values in there for example) but they don't seem to relate to the points we created in the drawing. It basically means that when you save even a really simple, single shape in Inkscape, the SVG is almost unsuable from the outset! When the image is saved as SVG, Inkscape keeps the original co-ordinates at which you drew the shape, and applies a matrix transformation to the shape, to get it to end up where you wanted it. Then you edit the co-ordinates, so that it sits at, say 10,10. Let's say you draw a circle, at some arbitrary point on the screen. Inkscape creates peculiar SVG data: it's strictly correct, and syntactically accurate to the SVG specifications, but it's a peculiar way of doing things. This is where we're going to start parsing, to create our g-code. Since all our PCBs use the same 2mm pads with 0.89mm hole, we don't have to worry about tool changing and different sized holes we'll just treat all our holes as exactly the same size.įrom Inkscape, delete all the unnecessary information and leave just the red drill holes, and save as a plain SVG. Manually find and colour all your drill holes (we're using red to identify a hole to be drilled). The general idea is this: create a PDF file and load it into Inkscape. So with this in mind, we're focussing on working with PDF files (rather than have to create a load of filters/parsers to import lots of different file types). In fact, any PCB design software can be used with CutePDF to produce PDF files of the final designs. ExpressPCB is really easy to use, but doesn't have an export option (it's free software, provided by a manufacturer so you can email them files in their own proprietary format) so we use CutePDF to get the software to produce a PDF file of our designs. As regular visitors to this blog will know, we're real fans of ExpressPCB for designing our PCBs (sometimes DipTrace if we have to export to gerber, or for creating 3d images of the boards). What currently takes about an hour to do, and often leaves us with wobbly-edged boards, and off-centred drill holes, we're hoping can be reduced to minutes, once we've mastered the CNC!Īnd the first step towards mastery is being able to produce valid G-Code for drilling holes, from our PCB designs.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |