package module#

class PackageBody(*, height)[source]#

Bases: Kinematic

Component package body base class

This class is the representation of the 3D footprint of a component. Do not instantiate directly, but use on of the subclasses instead.

Parameters:

height (Toleranced)

height: Toleranced#

Height of the package body

final envelope(density_level)[source]#

Compute the envelope of the package body

This method returns the 2D envelope of the package body at the given density level.

Parameters:

density_level (DensityLevel) – density level to compute the envelope for

Return type:

Shape

Returns:

The envelope of the package body at the given density level

property dims: tuple[Toleranced, Toleranced]#

Get the axis aligned bounding box dimensions of the package body.

class RectanglePackage(width, length, *, height)[source]#

Bases: PackageBody

Rectangular PackageBody

This class represents a rectangular prism bounding box. For a cylindrical package body, use CylinderPackage instead.

Parameters:
width: Toleranced#

Width of the package body

length: Toleranced#

Length of the package body

property dims: tuple[Toleranced, Toleranced]#

Get the axis aligned bounding box dimensions of the package body.

class CylinderPackage(diameter, *, height)[source]#

Bases: PackageBody

Cylindrical PackageBody

This class represents a cylindrical bounding box. For a rectangular package body, use RectanglePackage instead.

Parameters:
diameter: Toleranced#

Diameter of the package body

property dims: tuple[Toleranced, Toleranced]#

Get the axis aligned bounding box dimensions of the package body.

class PackageBodyMixin[source]#

Mixin class for components that have a package body

package_body(body)[source]#

Set the package body of the component

Return type:

Self

Parameters:

body (PackageBody)