RingSector

Contents

RingSector#

zeroheliumkit.src.geometries.RingSector(inner_radius: float, outer_radius: float, start_angle: float, end_angle: float, location: tuple | Point = None, num_edges: int = 100)[source]#

Returns the intersection between a ring and a circular sector.

Parameters:
  • inner_radius (float) – The inner radius of the ring.

  • outer_radius (float) – The outer radius of the ring.

  • start_angle (float) – The starting angle of the sector in degrees.

  • end_angle (float) – The ending angle of the sector in degrees.

  • location (tuple | Point, optional) – The location of the center of the ring. Defaults to None.

  • num_edges (int, optional) – The number of edges used to approximate the ring and sector. Defaults to 100.

Example

>>> inner_radius = 2.0
>>> outer_radius = 4.0
>>> start_angle = 0.0
>>> end_angle = math.pi / 2
>>> location = (0, 0)
>>> num_edges = 100
>>> result = RingSector(inner_radius, outer_radius, start_angle, end_angle, location, num_edges)
>>> print(result)
[(4.0, 0.0), (3.9999999999999996, 0.040000000000000036), (3.9999999999999996, 0.08000000000000007), ...]