← Back to team overview

kicad-developers team mailing list archive

Re: PATCH: Set SMD attribute in footprint wizard

 

Yes the latest submitted patch expose an optional parameter (threshold) to
allow to chose the grid size you want to round on, if not provided 0.05mm
will be used as a default.
This now uses the python built-in "round" function for more readability and
avaid reimplementing functions provided by the language. That kind of
insure symmetry given that positive and negative number will be processed
the same way.

Given that this PutOnGrid function is implemented in the helper class from
which every script inherit we should be insured to have the same behaviour
for every python wizard script (not necessarily every python script though,
only the ones inheriting from HelpfulFootprintWizardPlugin)

Cheers,
Mikael


On Tue, Feb 16, 2016 at 2:05 PM, Clemens Koller <cko@xxxxxxxxx> wrote:

> On 2016-02-16 19:00, jp charras wrote:
> > Le 16/02/2016 18:05, Mikael Arguedas a écrit :
> >> What can be done is add a parameter to this ceiling function which
> default
> >> value would be 0.05 but that people can provide if they want a different
> >> value.
>
> Yes, I prefer parameters to tweak.
>
> >> Regarding the ceiling function itself, I designed it only for the
> current
> >> use of the python scripts drawing courtyard so I dealt only positive
> values
> >> but if people can specify coordinates or lines in grid space it makes a
> lot
> >> of sense to handle negative values.
>
> It somehow needs to "symmetrically" towards as well as away from zero
> or to/away from component origin. Hmm... might get tricky.
>
> > Therefore round on grid to nearest with a grid size as parameter could
> > be the best.
>
> Yes, that sounds reasonable.
>
> > (For very small footprints why to round coordinates or sizes ? This is
> > not useful)
>
> I am slowly working more and more towards automatic footprint generation
> where I am finally able to adjust solder paste (stencil) openings (volumes)
> as a percentage of pad areas and mask thickness depending on manufacturing
> parameters.
> (Ideally, I am able to adjust that in a finished layout.)
> So, numbers can get odd, then. Then it would still be nice
> if the values are clipped to reasonable decimals.
> We propably don't want every script re-invent the wheel and
> use it's very own rounding/ceiling magic there.
>
> Regards,
>
> Clemens
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>

References