geometry module#
Geometry for the shipped providers#
How CsvParts and IdealPassives build a two-pin passive from a case code:
passive_geometry() returns the landpattern and symbol instance for one,
and a materialize assigns them to the component.
Not core API, and not a contract either provider imposes on a third. The core neither declares nor inspects geometry, so another provider is free to build its own however it likes; this is the shortest thing that works for standard passives.
A case code the landpattern table does not know cannot be built, so a provider
checks known_case() while resolving and declines such a part there,
rather than letting materialize fail on it later.
A polarized part needs PolarizedSMT and PolarizedCapacitorSymbol together, so that the .a/.c pads and the symbol agree.
- known_case(case)[source]#
Whether
passive_geometry()can build a landpattern for case.
- passive_geometry(category, case, polarized=False)[source]#
A landpattern and symbol instance for a two-pin passive in case.
Raises KeyError for a case code
known_case()rejects, or a category with no symbol generator.