← Back to team overview

kicad-developers team mailing list archive

Re: PATCH: Set SMD attribute in footprint wizard

 

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.
> 
> 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
>

I do not have a strong opinion about that.
In many cases the best choice is not easy to know, especially for
coordinates.

So, for me: the simpler the best:
round on grid to near (usual rounding) is the simpler.
And if the rounding error can create issues for small components, it
means the grid is too large.

Therefore round on grid to nearest with a grid size as parameter could
be the best.

(For very small footprints why to round coordinates or sizes ? This is
not useful)

-- 
Jean-Pierre CHARRAS


Follow ups

References