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

Allow plotting without a config file? #2

Open
kasbah opened this issue Aug 15, 2018 · 4 comments
Open

Allow plotting without a config file? #2

kasbah opened this issue Aug 15, 2018 · 4 comments

Comments

@kasbah
Copy link
Contributor

kasbah commented Aug 15, 2018

Hey, this is pretty neat. I've kind of always felt this kind of thing should be built into KiCad. I suggested it be added to Xess's list.

How would you feel about using some default plot options instead of requiring a config (the config could still be used if needed)? Aditionally, the gerber config for instance could also be read from the kicad_pcb file. Here is an example of the relevant section:

    (pcbplotparams
      (layerselection 0x014f0_ffffffff)
      (usegerberextensions false)
      (usegerberattributes false)
      (usegerberadvancedattributes false)
      (creategerberjobfile false)
      (gerberprecision 5)
      (excludeedgelayer true)
      (linewidth 0.150000)
      (plotframeref false)
      (viasonmask false)
      (mode 1)
      (useauxorigin false)
      (hpglpennumber 1)
      (hpglpenspeed 20)
      (hpglpendiameter 15.000000)
      (psnegative false)
      (psa4output false)
      (plotreference false)
      (plotvalue true)
      (plotinvisibletext false)
      (padsonsilk false)
      (subtractmaskfromsilk true)
      (outputformat 1)
      (mirror false)
      (drillshape 0)
      (scaleselection 1)
      (outputdirectory "gerbers/"))
  )
@johnbeard
Copy link
Owner

I too hope that it can be built in. But I needed (wanted) something now!

Default plot options are tricky. You have to choose a sensible default in all cases and make sure the user realised what they are. If users come to rely on defaults, you can never change them without breaking deliverable files. So I'm not really keen on built-in defaults. For something that results in actual paid-for PCBs, I'd like to make sure the user has, as far as possible, fully specified what they want.

Reading from the PCB is a possibility. Will need to think about who wins: configs or PCB file, and if the general settings apply only to Gerbers or what. It might just be clearer if the user has to provide a complete separate config.

I'm also unsure if we want to "immortalise" settings the user makes in the dialog when they might just be experimenting with options. It's easy to overlook those changes when modifying a PCB file when using VCS and almost inevitable when not using a VCS.

@kasbah
Copy link
Contributor Author

kasbah commented Aug 23, 2018

I recently noticed the options part of the .kicad_pcb will be Postscript, HPGL etc as well, not just Gerber. How about this for the time being: if no config is given, read the config from the .kicad_pcb file?

I am also envisioning using this as part of kitspace.org, allowing people to submit KiCad files, rather than Gerber. The problem I have as part of that would be to detect how many copper layers are needed for the design. Maybe this is a separate issue.

@set-soft
Copy link

set-soft commented Jul 1, 2020

Hi @kasbah !
In my fork I added an option to create a config example file.
When using this option you can ask to extract the plot options from a PCB.
So if you do:

kiplot -b PCB_FILE -p --example

You'll get an example file named example.kiplot.yaml
You can then ask to plot any of the examples, for the gerbers:

kiplot -c example.kiplot.yaml -b PCB_FILE -s all gerber_example

You'll get all the gerber files in the Example/gerber_dir directory.
The generated file contains all the possible outputs, much more that what the original kiplot supports.

@kasbah
Copy link
Contributor Author

kasbah commented Jul 2, 2020

Thanks @set-soft, I ended up adapting a simpler script from Greg Davill to do this on Kitspace. Will evaluate your fork when we want to advance it further.

rdeterre pushed a commit to rdeterre/kiplot that referenced this issue Nov 9, 2020
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

3 participants