← Back to team overview

kicad-developers team mailing list archive

Re: PATCH: Set SMD attribute in footprint wizard

 

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.

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.

Finally, Jean-Pierre by doing a put on grid function, would you like to
have the option to chose between near ceil or floor ? or do you want this
ceiling function to be named "round on grid" to allow us to change the
rounding later without changing the method name ?

Cheers,
Mikael

On Tue, Feb 16, 2016 at 5:48 AM, jp charras <jp.charras@xxxxxxxxxx> wrote:

> Le 16/02/2016 13:33, Clemens Koller a écrit :
> > Hi, Jean-Pierre
> >
> > On 2016-02-16 13:04, jp charras wrote:
> >> Le 16/02/2016 11:59, Clemens Koller a écrit :
> >>> On 2016-02-16 09:30, Mikael Arguedas wrote:
> >>>>     If you are implementing the ceiling function in a parent class,
> use 0.05
> >>>>     mm, because it will be not necessary used for sizes, but also for
> >>>>     distances, and round the half size if needed.
> >>>
> >>> Ok, I might be nitpicking again:
> >>> Can we make that rounding value configurable?
> >>> I would call this minimum drafting design width/gap.
> >>>
> >>> With smaller and smaller SMD sizes, even 0.025mm is a quite
> >>> coarse grid/minimum width size. I ended up with 0.01mm.
> >>> I have already 0603M (0201) 0402M (01005) 03015M (008004) (M=metric)
> >>> sizes arriving in my calculations... @:-|
> >>>
> >>> Regards,
> >>>
> >>> Clemens
> >>
> >> We are not talking about rounding width values, but the position of the
> >> courtyard corners definition in SMD ICs footprint generators.
> >> This is not exactly the same thing, and 0.05 rounding could be enough.
> >
> > Sorry, I wasn't clear enough: I also mean the position of
> > corners/frames/drafting items.
> > Width and/or gap both together translate to position or
> > "design resolution". I don't know how you want to call that.
>
> Just the working grid resolution.
>
> the ceiling function could be just a "put on grid" function, because we
> don't aways if the value to "round on grid" must be rounded to near, or
> ceil or floor.
>
> >
> > But the important part to me is: Please don't hard-code it.
> > Make it adjustable (i.e. 0.05mm, 0.025, 0.01mm, ...) as
> > it might vary how small the stuff gets.
> > (Others might do Chip-on-Board stuff or Die-Bonding.)
> >
> > Regards,
> >
> > Clemens
> >
>  0.05 mm could be the default value, with something like a
> SetRoundingGridSize( aGridSize ) or SetRoundingThreshold to change the
> actual value, for instance.
>
> Not also the rounding is only made on request in python scripts, not for
> all values, therefore only for a few parameters.
>
> So setting the rounding threshold is not so important.
>
> --
> Jean-Pierre CHARRAS
>
> _______________________________________________
> 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
>

Follow ups

References