MCPcopy
hub / github.com/CadQuery/cadquery / pt_arc

Function pt_arc

cadquery/hull.py:199–208  ·  view source on GitHub ↗
(p: Point, a: Arc)

Source from the content-addressed store, hash-verified

197
198
199def pt_arc(p: Point, a: Arc) -> Tuple[float, Segment]:
200
201 x, y = p.x, p.y
202 x1, y1, x2, y2 = _pt_arc(p, a)
203
204 angles = atan2p(x1 - x, y1 - y), atan2p(x2 - x, y2 - y)
205 points = Point(x1, y1), Point(x2, y2)
206 ix = int(argmin(angles))
207
208 return angles[ix], Segment(p, points[ix])
209
210
211def arc_pt(a: Arc, p: Point) -> Tuple[float, Segment]:

Callers 1

get_angleFunction · 0.85

Calls 4

_pt_arcFunction · 0.85
atan2pFunction · 0.85
PointClass · 0.85
SegmentClass · 0.85

Tested by

no test coverage detected