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

Some things I'ld like to automate #38

Closed
mdeweerd opened this issue Oct 23, 2021 · 5 comments
Closed

Some things I'ld like to automate #38

mdeweerd opened this issue Oct 23, 2021 · 5 comments

Comments

@mdeweerd
Copy link
Contributor

I am sharing what I like to do when wrapping up a KiCAD project, which may give some ideas for future updates.

  • Ensure that the dates of the schematic/PCB are in line with the most recent change (latest git change for instance/local date).
  • Generate GERBER files + PDF + SVG;
  • Generate a black&white schematic as well as color schematic - PDF and SVG versions;
  • Update a text file describing the PCB technology (size, thickness, minimum track width, minimum clearance, minimum drill size, etc);
  • Generate PNG snapshots of the 3D PCB view:
    • front + back:
      • without components,
      • THT only,
      • SMD only,
      • THD+SMD;
      • THD+SMD+Virtual.
  • Generate a STEP file;
  • Keep a reference to the corresponding GIT hash, add/update a GIT tag;
  • Name the files or directory according to the board version;
  • Copy the kicad_pcb file to maintain a copy of the PCB layout for that version in source format with the PCB files (usefull for tools such as Interactive BOM as well).
  • Update a document (openoffice/libreoffice/word) with the PCB layers and generate a PDF from it.

The BOM file would already be generated using KiCOST.

I run most things through native scripts, but this project, once I get it working, may help getting the 3D images and STEP file through automation. Several other steps are automated using local scripts started under cygwin.

@mdeweerd
Copy link
Contributor Author

I am closing this "Issue" here because I am settling on KiBot where I opened a similar issue that has been extended versus this list.

I am sure that kicad-tools is a usefull setup, but I think that KiBot does all this and much more except diffing PCBs and Schematics.

Being open-source, I personnally think it's best to concentrate joint ("community") efforts on a single automation setup, and that it would be usefull to bring diffing to KiAuto and the project level automation for it to KiBot. (KiBot reads and "executes" yaml configurations, applies variant filtering before handing the execution off to one of the other great tools).

I am leaving this ticket open so that you (the maintainer) can read it and close it if you wish).

@obra
Copy link
Owner

obra commented Nov 15, 2021 via email

@mdeweerd
Copy link
Contributor Author

Perfect, I've been using kibot several ways the past few days and there are several ways to launch it.
I think that docker will remain useful for:

  • Consistency;
  • Use of other tools (interactive bom, kicost, diffing, etc);
  • Ease of installation (only one docker image to install rather than many other tools each with their own instructions and dependencies).

Kibot does the job of automation and I have added some targets to a Makefile, the tool can generate a Makefile from the yaml file, but its possible to use the yaml file directly.

Basically the files in 'bin-on-docker/' would need to be ported over to KiAuto it seems and then integrated in KiBot to allow configuration.
KiBot is a fork from kiplot, so a lot is already in common.

@mdeweerd
Copy link
Contributor Author

I now have a better experience with KiBot. The way I see it, KiBot is essentially the Project Configuration and Automation Layer to KiAuto.

I think that KiBot proposes all that kicad-tools does, with the exception of diffing boards and schematics. I do not know kicad-tools well enough, so I may be missing something.

According to my quick analysis of the scripts, diffing boards and schematics essentially creates PNG images from the PDF files for different versions of the boards and compares those images.
Kicad-tools also proposes the scripts to integrate this with git.

KiAuto's container has almost everything that is needed - git is missing for instance, it has Imagick.

The diffing scripts can probably be added to KiAuto pretty much as they are.

I think that a useful evolution would be that they'd rely on the PDF generation tools already available in KiAuto in order to avoid maintaining different methods and also to potentially benefit from the reuse of KiBot YAML configurations for generating the PDF files.

However, a basic port of the diffing scripts to KiAuto is likely the best way to go. I've added the scripts to my setup but I didn't try to run them yet.

@mdeweerd
Copy link
Contributor Author

@obra I did some work on porting the difference tooling as explained in the link you can follow from the "mentioned this issue" indicator above.

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

No branches or pull requests

2 participants