MCPcopy Create free account
hub / github.com/CadQuery/cadquery / arc_pt

Function arc_pt

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

Source from the content-addressed store, hash-verified

209
210
211def arc_pt(a: Arc, p: Point) -> Tuple[float, Segment]:
212
213 x, y = p.x, p.y
214 x1, y1, x2, y2 = _pt_arc(p, a)
215
216 angles = atan2p(x - x1, y - y1), atan2p(x - x2, y - y2)
217 points = Point(x1, y1), Point(x2, y2)
218
219 ix = int(argmax(angles))
220
221 return angles[ix], Segment(points[ix], p)
222
223
224def arc_arc(a1: Arc, a2: Arc) -> 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