create_boundary_anchors

create_boundary_anchors#

zeroheliumkit.src.functions.create_boundary_anchors(polygon: Polygon, locs_cfg: list) list[source]#
Returns anchors on the boundary of the polygon with normal to the surface

orientation and given offset.

Parameters:
  • polygon (Polygon) – anchors will be located on the boundary of this polygon

  • locs_cfg (list) –

    list containing config dicts for the new anchors with the following items: label (str): anchor label loc (tuple): xy coordinates for the point of intersection with boundary line dir (str): direction of the anchor

    options are ‘top’, ‘bottom’, ‘left’, and ‘right’

    offset (float): distance from the boundary of the anchor

Returns:

A list of Anchor objects, each containing the point, normal angle, and label

Return type:

list

Raises:

TypeError – If the direction is not one of the allowed directions.