While drawing shapes in Inkscape and copying the SVG paths into JSON files, the most jarring / time-consuming portion of the process is translating from Inkscape's coordinate system to PCBModE's system.
That is, Inkscape object have an origin at the bottom left of the screen, while PCBModE's is in the centre. So copying Inkscape coordinates to a JSON file and then using that to generate a new SVG, and opening it up in Inkscape results in an incorrectly placed object.
Allowing an additional parameter in the JSON file would be helpful, say:
{
"type": "path",
"layers": ["top"],
"value": "m -1.1632,305.44917 0.76716,0.0716 -0.008,0.0852 q -0.0326,-6.2e-4 -0.0943,-0.002 -0.0617,-9.1e-4 -0.0878,0.006 -0.0411,0.0119 -0.0616,0.0366 -0.0206,0.0259 -0.0251,0.074 l -0.11521,1.23418 q -0.004,0.042 0.007,0.0709 -0.0961,-0.0211 z",
"style": "fill",
"location": [
-0.88,
-9.52
],
"origin": "bottom-left",
"rotate": 0
},
This would simply take the given coordinates and subtract the (bounding-box / 2) in both the X and Y directions.
This parameter could be used for shapes or components, even vias I guess, although that would be strange.
While drawing shapes in Inkscape and copying the SVG paths into JSON files, the most jarring / time-consuming portion of the process is translating from Inkscape's coordinate system to PCBModE's system.
That is, Inkscape object have an origin at the bottom left of the screen, while PCBModE's is in the centre. So copying Inkscape coordinates to a JSON file and then using that to generate a new SVG, and opening it up in Inkscape results in an incorrectly placed object.
Allowing an additional parameter in the JSON file would be helpful, say:
This would simply take the given coordinates and subtract the (bounding-box / 2) in both the X and Y directions.
This parameter could be used for shapes or components, even vias I guess, although that would be strange.