Hi Jean-Pierre,
On 08/13/2017 02:01 PM, jp charras wrote:
[snip]
>
> This was made to speed up netlist and connection calculations in the early
> time of Pcbnew.
> (There was no support of wxString and std::string, therefore comparing 2
> strings was not as easy and
> not as fast as comparing 2 numbers).
>
> I am thinking the long pin number support can be now safely removed without
> any problem and the code
> will be clearer.
>
> I don't think the file format changes, if the pad name is restricted to 4
> ASCII7 chars, like now.
It is true, but I opt for removing the name length constraint, therefore
I suggested to increment the file format version. I realize there are
not many cases when it is useful, but I am converting a library that
uses e.g. SHIELD, MECH1, MECH2 for pad names. Truncating pad names may
easily result in a disaster, so for now I am just skipping such parts,
but ideally we could support them too.
> The file format changes only if the pad name is free (any UTF8 char, any
> length).
> However a full free name/pin number can be not compatible with netlists:
> see Spice and other formats for instance.
I think this should be handled by exporters by displaying a message. We
do not need to restrict ourselves only due to other software limitations.
> Moreover any non ASCII7 char will create problems in X2 Gerber files (only
> ASCII7 chars are allowed
> in Gerber files).
>
> But this is an other problem (and besides, I am not sure a free pad name is
> very useful: all
> footprints use only digits and A...Z chars in Pad names).
Then it sounds like ASCII7 is a reasonable choice. In such case we
either should use std::string or wxString::{From,To}Ascii().
Regards,
Orson
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to : [email protected]
Unsubscribe : https://launchpad.net/~kicad-developers
More help : https://help.launchpad.net/ListHelp