Open failiz opened 1 year ago
I'd try to apply the transform attribute to the <g>
element.
We would the move the current part to obsolete, and add new parts with corrected schematic orientation as default. Don't use a replaced-by so that existing projects will not have to change their schematic, especially if they already rotated the symbol.
I'd try to apply the transform attribute to the
<g>
element.We would the move the current part to obsolete, and add new parts with corrected schematic orientation as default. Don't use a replaced-by so that existing projects will not have to change their schematic, especially if they already rotated the symbol.
The problem with that is that the shape of the part does not change, it keeps the original layout. I guess that we are going to replace it I can do it in Inkscape.
Ah, 0.9.10 ignores the rotation if it is on the group element instead of the svg element ?
No, I meant that the part is rotated, but the size of the part is still using the horizontal layout (but I did not try it in Fritzing). The size has to be transposed (the width is now the height) and the viewbox needs to be adjusted.
Ah, yes. The same problem might apply for the Origin and therefore the grid alignment. And even if it would work in recent Fritzing builds, we should maintain some backward compatibility for these core parts. So we must flatten the svg graph after adding the transform.
At a request in the forums I created new (meeting the graphics and parts file format file standards) svgs for these three parts that I think fix all the listed issues. At least the battery svg was dimensioned in px (which will cause scaling problems when edited with a current version of Inkscape due to the DPI difference since the original is 72DPI and current Inkscape uses 96DPI for px.)
See the battery power supply in the schematic view: The battery appears rotated 90 degrees, which is not the common way of writing electronics (power at the top and ground at the bottom). This forces to rotate the part (which is annoying for advanced users) or contributes to creating "ugly" schematics by beginners.
The solution is simple, rotate the SVG file.
I tried to rotate it in the SVG file by just adding a
transform="rotate(90, 5.20345, 4.0132)"
see below:This works great on my computer, but Fritzing cannot draw it, see below message: Any workarounds?