outlines module#
- class SilkscreenLine(*values)[source]#
Bases:
IntEnumSilkscreen Edge
- Top = 1#
- Bottom = 2#
- Left = 4#
- Right = 8#
- Vertical = 12#
- Horizontal = 3#
- Perimeter = 15#
- XAxis = 16#
- YAxis = 32#
- class SilkscreenLineGenerator[source]#
- silkscreen_line(line, offset=0)[source]#
Set the silkscreen edge to draw.
- Parameters:
line (
SilkscreenLine|int) – The silkscreen edge to use.offset (
float) – Offset the line by this amount. Mainly for aestheticoutwards. (reasons. Positive is)
- Returns:
self for method chaining.
- class OutlineGenerator[source]#
Bases:
SilkscreenLineGenerator- line_width(width)[source]#
Override the line width for this generator only. If not specified, the line width from the landpattern generator is used.
- Parameters:
width (float)
- make_bounds(target)[source]#
Generate the silkscreen outline
- Return type:
TypeAliasType- Parameters:
target (SilkscreenOutline)
- make_shape(target)[source]#
- Return type:
- Parameters:
target (SilkscreenOutline)
- class SoldermaskBased[source]#
Bases:
OutlineGenerator- make_bounds(target)[source]#
Generate the silkscreen outline
- Return type:
TypeAliasType- Parameters:
target (SilkscreenOutline)
- class PackageBased[source]#
Bases:
OutlineGenerator- make_bounds(target)[source]#
Generate the silkscreen outline
- Return type:
TypeAliasType- Parameters:
target (SilkscreenOutline)
- class SilkscreenOutline(*args, **kwargs)[source]#
Bases:
ApplyToMixin,PackageBodyMixin,SilkscreenSoldermaskClearanceMixin,DensityLevelMixin,LineWidthMixin,LandpatternGeneratorSilkscreen Outline
- outline: Silkscreen | None = None#
- silkscreen_outline(generator, *fallback, on=Side.Top)[source]#
Add a silkscreen outline to the landpattern.
- Parameters:
generator (
OutlineGenerator|None) – The outline generator to use. If None, the outline will be removed.fallback (
OutlineGenerator) – Additional outline generators to try if the first one fails, e.g. if running out of space.on (
Side) – The side of the board to apply the outline to.
- Return type:
Self
- class InterstitialOutline(*, vertical=False, horizontal=False)[source]#
Bases:
OutlineGenerator,SilkscreenSoldermaskClearanceMixinInterstitial Silkscreen Outline Generator
This class constructs a rectangular outline surrounding the interstitial (interior) region of a landpattern. This typically corresponds to the area where the package body of the component rests. The interstitial region is estimated based on the inside edges of the pads, this works best for two-pin, dual-column, and quad-column packages.
This outline style is commonly used for packages such as QFP, SOIC, SSOP. It is also commonly used for 2-pin SMT and through-hole components.
>>> class MyComponent(Component): ... landpattern = LandpatternWithOutline( ... ).silkscreen_outline(InterstitialOutline())
- make_bounds(target)[source]#
Generate the silkscreen outline
- Return type:
TypeAliasType- Parameters:
target (SilkscreenOutline)