package module#
- class PackageBody(*, height)[source]#
Bases:
KinematicComponent 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:
- 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:
PackageBodyRectangular PackageBody
This class represents a rectangular prism bounding box. For a cylindrical package body, use
CylinderPackageinstead.- Parameters:
width (Toleranced)
length (Toleranced)
height (Toleranced)
- 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:
PackageBodyCylindrical PackageBody
This class represents a cylindrical bounding box. For a rectangular package body, use
RectanglePackageinstead.- Parameters:
diameter (Toleranced)
height (Toleranced)
- 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)