Mailing list archives : pcb-rnd

ID:3566
From:ge...@igor2.repo.hu
Date:Fri, 29 Nov 2019 17:08:57 +0100 (CET)
Subject:Re: [pcb-rnd] reversed missing layer export warning
in-reply-to:3565 from cuvoodoo <pc...@cuvoodoo.info>
replies: 3705 from ge...@igor2.repo.hu
Thanks!
 
On Fri, 29 Nov 2019, cuvoodoo wrote:
 
>in the CAM jobs, there is the option [okempty].
>I don't know the exact intent or purpose of this attribute.
>I think it is meant to warn if the corresponding layer is empty and/missing, and/or still export a file.
>but in the current state the effect is plugin dependent.
>
>for the excellon plugin:
>an (almost) empty file will always be generated, even if there is no hole/slot, (u)route layer (group), or the okempty option.
>when the okempty is absent, it will not warn even if there is no hole/slot (e.g. it is actually empty).
>when the okempty is absent, it only warns if there is no (u)route layer (group):
 
The purpose of [okempty] is only to suppress the warning which is 
generated when the result of export is empty and it looks like it 
shouldn't be.
 
Sorry, but I do not want to change it to modify how/when empty files are 
generated, I want to keep it as a pure warning-supressor. 
 
I also don't think we should unify how plugins behave on empty file 
generation: whether an empty output file is a problem or not, really 
depends a lot on the format and use of the files. So it's best if each 
plugin decides whether an empty output should be generated or not and 
warned or not. With okempty we give the user a way to override the warning 
part, effectively saying "yes, I know it would be empty, and it's okay, 
even if the plugin thinks it is strange".
 
So let's check each case using the above pointers.
 
>excellon cam export for '%base%.xln=virtual(purpose=pdrill),virtual(purpose=udrill),mech(purpose=proute),mech(purpose=uroute)' failed to produce any content
>
>the file is still exported.
>with the okempty option present, it will not warn about the missing layers.
 
Yup, exactly how it should work!
 
>
>for the gerber plugin (only tested using JLC PCB CAM job):
>it will only output a file when there is a line in the corresponding layer.
>no empty file is generated for empty layers, even with the okempty option.
 
Sure, because whether an empty file is generated or not is independent of 
okempty, which controls the warning only.
 
>it will not warn if the layer is empty, even if okempty option is absent.
 
Thanks, I will revise this (meaning: gerber exporter, cam mode, 
which layer group types should warn for being empty)
 
 
>it will warn if the corresponding layer (group) is missing:
>
>gerber cam export for '%base%.g%top_offs+1%l=intern-copper' failed to produce any content
>
>with the empty option present, it will not warn anymore.
 
That's normally good: if your job addresses a layer group that's not 
there, we should warn by default.
 
However, I see a problem: we should have a different warning for 
"addressed layer group does not exist" and "groups exist, but are empty". 
But this is a rather big change (with a lot of risk for introducing 
bugs) for a small benefit, so should happen in a cleanup phase.
 
Regards,
 
Igor2
 

Reply subtree:
3566 Re: [pcb-rnd] reversed missing layer export warning from ge...@igor2.repo.hu
  3705 Re: [pcb-rnd] reversed missing layer export warning from ge...@igor2.repo.hu
    3707 Re: [pcb-rnd] reversed missing layer export warning from pc...@cuvoodoo.info
      3708 Re: [pcb-rnd] reversed missing layer export warning from ge...@igor2.repo.hu
        3734 Re: [pcb-rnd] reversed missing layer export warning from pc...@cuvoodoo.info
          3738 Re: [pcb-rnd] reversed missing layer export warning from ge...@igor2.repo.hu