Pyramid

A five-faced solid shape with a rectangular base shape and the lateral surfaces as triangles that meet at a common vertex at a certain height.

MRO
Decorators
dataclasses.dataclass

Methods

  • __init__(
      self,
    ) -> None

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      height
      Type
      Decimal
      Default
      Description

    • Name
      width
      Type
      Decimal
      Default
      Description

    • Name
      depth
      Type
      Decimal
      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
    width
    Type
    Decimal
    Value

    = Decimal()

    Description

  • Name
    depth
    Type
    Decimal
    Value

    = Decimal()

    Description

  • Name
    height
    Type
    Decimal
    Value

    = Decimal()

    Description

  • Name
    max_fitting_volume
    Type
    decimal.Decimal
    Value

    = None

    Description

    The maximum volume that fits into this shape.

Copyright © 2024