Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate svg schematics for KiCAD v6,7 libraries #182

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

jemathews0
Copy link

fixes #167

The following branch allows the generate_svg() function to work properly with a KiCAD version 7 (and probably version 6) library, but I need some feedback on a few things before I think it's ready to merge:

  1. I noticed that there is a generate_schematic() function and wonder whether generate_svg() is going to be obsolete.
  2. I have tried running the unit tests, but I am still new to pytest and I can't find the generated .svg files to see if they're correct
  3. The generated svg files still have some strange bends/jogs in the lines that I can't seem to get rid of. I've tried reducing the bounding box so the pins stick out just a little bit, and removing/adding the part labels to the bounding box, but to no effect. As far as I can tell, the side parameter has been set correctly. It can be visualized by uncommenting tools/kicad/v6.py:961 and then generating the svg. Some of these jogs are very annoying because they cause the lines to go through multiple pins on the same part so it's unclear to which pin the wire is connected.
  4. I considered switching to use an svg library instead of manually writing the svg code as was done for v5, but I decided against it.
  5. I modified things so that all the scaling and flipping from symtx is done using a <g> transform() <g/> tag enclosing the svg at the exact scale and orientation indicated by the library. I felt this was a little cleaner but others might disagree.

Fixes devbisme#167 . Calling
`generate_svg()` when using KiCAD version 6 or 7 doesn't work, raising a
`NotImplementedError` because the `gen_svg_comp()` function wasn't
implemented. This commit modifies the library parsing to process the
drawing commands and implements the `gen_svg_comp()` funtion.
@tapegoji
Copy link

tapegoji commented Feb 1, 2024

do you have generate_schematic too?

@jemathews0
Copy link
Author

do you have generate_schematic too?

No. I never messed with generate_schematic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants