HalfSphere

A solid shape with a circular base shape, that arcs smoothly down from the base to the lowest point at a certain height (equivalent to the radius of the base shape).

MRO
Decorators
dataclasses.dataclass

Methods

  • __init__(self, height : Decimal, radius : Decimal) -> None

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      height
      Type
      Decimal
      Default
      Description

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

    = dataclasses.field(init=False, default=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