← Back to team overview

kicad-lib-committers team mailing list archive

Re: New "Library Convention" and his influences with current EEschema code

 

Le 11/05/2014 10:06, Lorenzo Marcantonio a écrit :
> On Fri, May 09, 2014 at 07:37:38PM +0200, Lorenzo Marcantonio wrote:
>> On Fri, May 09, 2014 at 06:29:14PM +0200, Kerusey Karyu wrote:
>>> Some pin graphics must be reviewed/recoded to keep 0.100" or 0.150" pin
>>> length for black-boxed symbols (That's why I don't use these graphics
>>> options).
> 
> Here you go, patched the code for right shape and size (it uses the
> number size). Of course if you use one of the 'outer' decorations you'll
> need to make the pin longer.
> 
> If nobody has something to say on that I'll commit it in about a week.
> 
> 
> 

Well, I have something to say.

If you want to modify the default values related to pin shapes, I
suggest you to consider that:

1- Default Pin length: this is current fixed to 300 mils.
Instead of hardcoding a new value (I prefer 150 or 200 mils, but this is
just my opinion), I am thinking it could be a personal choice, just like
colors or other personal preferences, and stored in user preferences.
It could be selected in Eeschema preferences, for instance in a combobox
which allows only a selection between 100,150, 200,250, 300mils (i.e. 2
to 6 Logical units)
Of course, the default value could be 2, 3 or 4 LU (to be defined)

2- About coding style:
instead of:
-            GRMoveTo( x1, y1 + CLOCK_PIN_DIM );
+            GRMoveTo( x1, y1 + m_numTextSize/2 );
which is not good,
I prefer something like:
define (only once):
int clockPinDim = m_numTextSize/2;

and later in code:
GRMoveTo( x1, y1 + clockPinDim );

or (better?)
#define CLOCK_PIN_DIM m_numTextSize/2

Because the CLOCK_PIN_DIM dimension will be easier to change in the future.

3 - about indexing pin shape on m_numTextSize
I am not saying the current hardcoded values are the best, but I am not
sure this is a good idea to use the numTextSize value to define the pin
shape size.
(Why to use num text size instead of name text size, for instance, when
the pin name and pin num are both outside the component body).

I frequently use small numTextSize or nameTextSize values, and do not
see why the pin shape should change when changing this parameter.

Thanks.


-- 
Jean-Pierre CHARRAS


References