KiCad / kicad-symbols

Official KiCad schematic symbol libraries for Kicad 5
https://kicad.github.io/symbols
Other
700 stars 747 forks source link

Conn_Coaxial footprint filters need improvement #650

Open Ratfink opened 6 years ago

Ratfink commented 6 years ago

Our current footprint filters for the Conn_Coaxial* symbols are as follows:

*BNC*
*SMA*
*SMB*
*SMC*
*Cinch*

This isn't ideal, for several reasons. The *SM?* filters match a lot of things they shouldn't: diodes, and a few inductors. The U.FL footprints in Connector_Coaxial.pretty/ aren't matched at all. Clearly something needs to be done. We have a few options:

  1. Add more types of connector to the filter lists, e.g. *U.FL*
  2. Replace the existing filters with a library-based filter, e.g. Connector_Coaxial:*
  3. Rename our coaxial connector footprints to have a common prefix, and replace the existing filters with a new filter matching that, e.g. Coaxial*

Option 1 involves the least work right now, but will require additional work every time a new kind of coaxial connector footprint is added, so I don't love it. If we go with this, it might be best to at least remove the leading * to avoid matching diodes and inductors. We'd still get trouble from e.g. N connectors.

Option 2 isn't something we've done anywhere else as far as I know, but it would work nicely for our own library. The problem is that it would exclude footprints in third-party libraries from matching the filter of our generic coaxial connector symbol. Really, that seems like a general problem with library-based filtering: how could we ever use it without making it hard to use third-party libraries?

Option 3 would be similar to what we've done in a lot of the other connector libraries, would make filtering easy, and would work with third-party libraries. Overall I'd say it seems best then, except that coaxial connectors as a whole aren't a series, so it might be an abuse of our naming convention in F3.6. The other problem is that we'd have to rename all our coaxial connector footprints, but that isn't very many.

If we want the benefits of option 3 without renaming our coaxial connectors, we could compromise by combining options 2 and 3. This would allow third-party libraries to have coaxial connector footprints with names prefixed with Coaxial, while allowing us to keep our names the same, since they're matched by the library filter.

@poeschlr @jkriege2 @evanshultz @Misca1234 Thoughts?

evanshultz commented 6 years ago

Good find!

What about a modification of option 2 to just Conn*:*. Agreed it isn't something we've done, but it limits the scope nicely and isn't so specific that 3rd-party libs couldn't easily plug in. If we think 3rd-party libs would be company-specific, like ACME_Connector then we could try *Conn*:*.

With option 1, does this happen often? Do new standards arrive regularly or do we have new footprints popping up frequently? If not, this might be a one-time thing now that only needs to get touched perhaps every few years. Maybe that's not so bad if we don't want to limit the library in any way.

Ratfink commented 6 years ago

I've seen plenty of projects with a single project-specific library for all parts that the project needs that aren't in the KiCad library. It would be a shame to leave that configuration behind.

Plus, the filter *Conn*:* would match a lot of non-coaxial connectors. So then we're stuck either placing further restrictions on library name, e.g. *Conn*Coax*:*, or having a list of filters like we do now, e.g. *Conn*:BNC*. The former exacerbates the problem I brought up in the previous paragraph, and the latter offers little advantage over option 1 (though it would cut down on erroneous matches).

I'm not aware of new families of coaxial connectors being created often, but it does happen sometimes, and our current list is very much incomplete. If we go the lazy route of adding new filters only when we get new footprints that need them, we risk having third-party footprints not match our filters, and we librarians might forget to add filters when we need to. If we try to compile make a big list of all the families we can find right now, we would still occasionally have to amend it in the future. Plus, just imagine the fun of having a filter C* for C connectors.

evanshultz commented 6 years ago

If the user is taking advantage of the pin count filter, are there really that many footprints that will be available? I haven't done this, just wondering.

Ratfink commented 6 years ago

A filter of C* on a two-pin symbol? Gee, that sounds awfully familiar, but I don't have the capacity to recall…😁

While working on https://github.com/KiCad/kicad-footprints/pull/607, I just noticed that our screw terminal symbols use a library-based filter of TerminalBlock*:*. Maybe a variant of option 2 such as *Conn*Coax*:* actually would be the best thing to go with here, then.