MCPcopy Index your code
hub / github.com/CadQuery/cadquery / select_lowest_arc

Function select_lowest_arc

cadquery/hull.py:130–147  ·  view source on GitHub ↗
(arcs: Arcs)

Source from the content-addressed store, hash-verified

128
129
130def select_lowest_arc(arcs: Arcs) -> Tuple[Point, Arc]:
131
132 x = []
133 y = []
134
135 for a in arcs:
136
137 if a.a1 < 1.5 * pi and a.a2 > 1.5 * pi:
138 x.append(a.c.x)
139 y.append(a.c.y - a.r)
140 else:
141 p, _ = select_lowest_point([a.s, a.e])
142 x.append(p.x)
143 y.append(p.y)
144
145 ixs = lexsort((x, y))
146
147 return Point(x[ixs[0]], y[ixs[0]]), arcs[ixs[0]]
148
149
150def select_lowest(arcs: Arcs, points: Points) -> Entity:

Callers 1

select_lowestFunction · 0.85

Calls 3

select_lowest_pointFunction · 0.85
PointClass · 0.85
appendMethod · 0.80

Tested by

no test coverage detected