get_intersection_withoffset#
- zeroheliumkit.src.utils.get_intersection_withoffset(pts: Tuple[Point, Point, Point], width: Tuple[float, float, float]) Point[source]#
Given three points and offset distances, calculates the coordinate of the offset point from the middle point.
- Parameters:
pts (Tuple[Point, Point, Point]) – A tuple of three points.
width (Tuple[float, float, float]) – A tuple of three offset distances.
- Returns:
The intersection point of the offset lines.
- Return type:
Point
Example
>>> pts = (Point(0, 0), Point(1, 1), Point(2, 0)) >>> width = (1, 2, 1) >>> result = get_centerpoint_offset(pts, width) >>> print(result) POINT (1.5 0.5)