← Back to team overview

kicad-developers team mailing list archive

Re: Python Plugin - Use of advanced LSET Constructor

 

I add some details I got after more test. Maybe it should be considered
as a bug.
I can use this constructor: __init__(self, unsigned int aIdCount,
LAYER_ID aFirst, v(...) *args) -> LSET
But only if I put 1 layer in the list (with no respect for the aIdCount
value).
For example
    pcbnew.LSET(1, pcbnew.F_Cu) <= Works
    pcbnew.LSET(2, pcbnew.F_Cu) <= Works (but it shouldn't !)
    pcbnew.LSET(2, pcbnew.F_Cu, pcbnew.B_Cu) <= Doesn't Work but it should.
The Error is indicated in the previous e-mail. Maybe there is a
confusion in the type of argument
linked to the Python Swig translation ?

> Hello,
> I'm new to the List so don't hesitate to tell me if I should change my
> way of posting e-mail.
>
> I'm working on an "advanced" QFN generator with generation of
> customized solder paste layer (percentage of the pad surface).
>
> For that I need to change Layer Set parameter of the thermal pad
> in order to remove the Paste Layer.
>
> Using the default LSET constructor with no arg is working, it's also
> working
> with one Layer ID.
>
> If I try to initialize a LSET with multiples layers it doesn't work:
>
>     thermal_pad = PA.PadMaker(self.module).SMDPad(tpad["W"],
> tpad["L"], pcbnew.PAD_RECT)
>     no_paste_lset = pcbnew.LSET(2, pcbnew.F_Cu, pcbnew.F_Mask) #
> Failing Line
>     thermal_pad.SetLayerSet(no_paste_lset)
>
> The constructor doesn't work (neither the one with Layer_ID array).
>
>     [...]
>     File "/home/nats/.kicad_plugins/qfn_wizard.py", line 103, in
> BuildThisFootprint
>         no_paste_lset = pcbnew.LSET(2, pcbnew.F_Cu, pcbnew.F_Mask)
>
>     [...]
>
>     NotImplementedError: Wrong number or type of arguments for
> overloaded function 'new_LSET'.
>     Possible C/C++ prototypes are:
>         LSET::LSET()
>         LSET::LSET(BASE_SET const &)
>         LSET::LSET(LAYER_ID)
>         LSET::LSET(LAYER_ID const *,unsigned int)
>         LSET::LSET(unsigned int,LAYER_ID,...)
>
> Do you have any hint on how to make this constructor work (maybe a
> problem with LSET swig wrapper) ?
>
> Thanks,
>



Follow ups

References