m_n_kappa.geometry.check_width#

m_n_kappa.geometry.check_width(width=None, left_edge=None, right_edge=None)#

make sure all properties corresponding with the width of a Rectangle or Trapezoid are fulfilled.

The corresponding properties are: width, left_edge, right_edge

Parameters:
  • width (float) – width of the Rectangle or Trapezoid (Default: None)

  • left_edge (float) – horizontal position (Y-Axis) of left edge of the Rectangle or Trapezoid (Default: None)

  • right_edge (float = None) – horizontal position (Y-Axis) of the right edge of the Rectangle or Trapezoid (Default: None)

Returns:

  • width (float) – width of the Rectangle or Trapezoid obtained from the given information

  • left_edge (float) – horizontal position (Y-Axis) of left edge of the Rectangle or Trapezoid obtained from the given information

  • right_edge (float) – horizontal position (Y-Axis) of right edge of the Rectangle or Trapezoid obtained from the given information

Raises:
  • ValueError – if all input-values are None

  • ValueError – if all input-values are given, but do not meet each other: right_edge - left_edge != width

Return type:

tuple