Stack

Composition of multiple solid shapes ordered from top to bottom.

MRO
Decorators
dataclasses.dataclass

Methods

  • __init__(self, height : Decimal, sections : list[Shape]) -> None

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      height
      Type
      Decimal
      Default
      Description

    • Name
      sections
      Type
      list[Shape]
      Default
      Description

  • __post_init__(self) -> None

  • volume_for_height(self, height) -> None

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      height
      Type
      Default
      Description

  • height_for_volume(self, volume) -> None

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      volume
      Type
      Default
      Description

Attributes

  • Name
    sections
    Type
    list[Shape]
    Value

    = dataclasses.field(default_factory=list)

    Description

  • Name
    height
    Type
    Decimal
    Value

    = dataclasses.field(init=False, default=Decimal())

    Description

  • Name
    max_fitting_volume
    Type
    decimal.Decimal
    Value

    = None

    Description

    The maximum volume that fits into this shape.

Copyright © 2024