Apart from 3D modelling I like FreeCAD's sketcher to draw parametrized 2D shapes. Even for so "lowly" tasks as creating SVG symbols for webpage UIs in browsers (after doing some additional work with inkscape on them), but mostly to later centercut them with a router V-bit (e. g. for front panel labeling; I use FlatCAM for that, as it usually is a project I route PCBs for). I export sketches as "flattened SVG" for that. The small issue with that is, that the generated SVG has an offset compared to the sketch. This is the SVG output of a FreeCAD sketch that is just a 10x10mm² square:
Code: Select all
<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="10.2mm" height="10.2mm" viewBox="0 0 10.2 10.2" xmlns="http://www.w3.org/2000/svg" version="1.1">
<g id="Sketch" transform="translate(0.100000,10.100000) scale(1,-1)">
<path id="Sketch_w0000" d="M 0.0 0.0 L 10.0 0.0 L 10.0 10.0 L 0.0 10.0 L 0.0 0.0 " stroke="#000000" stroke-width="0.35 px" style="stroke-width:0.35;stroke-miterlimit:4;stroke-dasharray:none;fill:none;fill-opacity:1;fill-rule: evenodd"/>
<title>b'Sketch'</title>
</g>
</svg>
The "path" is totally fine (you can see the corner coordinates of "0.0" and "10.0"). But the "g" element has a transform attribute of "translate(0.100000,10.100000) scale(1,-1)". I guess the scale by -1 and offset of 10 is because FreeCAD's and SVG's y coordinate are flipped with respective to each other. But I don't understand where the extra offset of 0.1mm in the x and y direction is coming from. That offset is not always 0.1mm by the way. It can have other values as well. It isn't hard to fix that by editing the SVG in a simple text editor, but it is another step to forget, and as the offset usually isn't large it isn't obvious enough to catch it on the CNC before routing.
Is there a setting to get rid of this offset?