jitxlib.landpatterns package#

The JITX Standard Library Landpattern Generator Framework.

This package contains a framework for generating various component landpatterns. It is provided through the jitxlib-standard library.

The framework is designed to generated the landpattern whenever an element of the landpattern is referenced, including during introspection. This allows the landpattern to be up to date with any changes to the design tree, but this comes with the caveat that the landpattern may yield different results depending on when it’s inspected, as well as the fact that the landpattern may be generated multiple times which may be relevant if the landpattern is expensive to generate.

class ApplyToMixin[source]#
apply_to(target, *additional)[source]#

Apply the generator to a target object or objects that is not this object itself. Note that this only affects what the generator looks at, the output will still be stored in this object. This is useful when making composite landpatterns, and you need a separate object to generate information based on other objects in the landpattern. For example, if composing a landpattern where a stand-alone silkscreen outline generator is desired, the generator can be instantiated separately and this method is then used to designate the object(s) to which the generator applies. It’s not advisable to call this method on a non-composite landpattern. If this method is not called, the generators will introspect the object itself (including child-objects), which is typically what is desired for standard use cases.

Parameters:
  • target (TypeAliasType | Iterable[TypeAliasType]) – the object(s) to which the generator applies, can be supplied as an iterable or as varargs.

  • additional (GeometrySource)

Returns:

self for method chaining

class LineWidthContext(line_width)[source]#

Bases: Context

Parameters:

line_width (float)

line_width: float#
classmethod get()[source]#

Get the current line width context, if unset it defaults to the minimum silkscreen width in the substrate constraints.

Return type:

LineWidthContext

class LineWidthMixin(*args, **kwargs)[source]#

Bases: Structurable

line_width(line_width)[source]#

Set the line width to use for the generator. If not set, the current value from the design context will be used.

Parameters:

line_width (float) – the line width to use

Return type:

Self

Returns:

self for method chaining

class SoldermaskRegistrationContext(soldermask_registration)[source]#

Bases: Context

Parameters:

soldermask_registration (float)

soldermask_registration: float#
classmethod get()[source]#

Get the current active context of this type.

Return type:

SoldermaskRegistrationContext

Returns:

The current context instance, or None if not set.

class LandpatternProvider[source]#

Base mixin class for landpattern generators that produce elements for the landpattern.

rebuild(force=False)[source]#

Trigger a rebuild of the landpattern. Normally this is not necessary, as the landpattern is built on demand. However, if it appears that the landpattern fails to detect a change, or if it needs to be built at a specific time, this method can be called to force a rebuild.

Parameters:

force (bool)

invalidate()[source]#

Invalidate the landpattern. This is useful if the landpattern is invalidated by a change to a parameter.

class LandpatternGenerator[source]#

Bases: Landpattern, LandpatternProvider

Subpackages#

Submodules#