Contours and edge pairs. For extended, in is the left normal of the edge (the interior of a counter-clockwise hull).
edges(a)Available · yields edges
layer e = edges(a)
Each contour segment as an open edge. A closed ring is not doubled (the last=first point is omitted once). Zero length (a==b) is skipped.
Notes
edges: identity.first_edges(p)Available · yields edges
layer e1 = first_edges(width(m1) < 0.14 um)
First edge of each edge pair (e1). From polygons: falls back to edges() (the whole contour).
Notes
empty / count: edge (0,0)-(1,0).second_edges is the same for e2 — for width, e2 is the opposite edge.second_edges(p)Available · yields edges
layer e2 = second_edges(p)
Second edge of each pair.
Notes
first_edges, other side.ongrid): e2 identical to e1 (a point edge).extended(e, d)Available · yields polygons
layer p = extended(e, 0.05 um)
Each edge becomes a quad: out and in each d. in = left normal (-uy, ux); on a CCW hull that is the interior. Then merged().
Also written as: extended(e, out=d, in=d)
Notes
out (extended_out / in=0): a band outside; on the inner edge of a hole, in points into the metal.begin / end extend tangentially at the start or end — they can run past corners and overlap neighbour bands, then merge.extended_out / extended_inAvailable · yields polygons
layer o = extended_out(e, 0.05 um)
layer i = extended_in(e, 0.05 um)
Short forms for extended(e, out=d, in=0) and out=0, in=d. Full form: extended(e, out=…, in=…, begin=…, end=…).
Also written as: extended(e, out=d, in=0)
Notes
start_segments / end_segments / centersAvailable · yields edges
layer s = start_segments(e, 0.2 um)
Part of the edge from the start, from the end, or a middle piece of length d. Polygons become edges first.
Notes
corners(a)Available · yields polygons / edges
layer c = corners(a)
layer c = corners(a, 80, 100)
Corners as 2×2 dbu boxes, optionally with an interior-angle window (absolute turn).
Notes
with_angle.bbox_center(a)Available · yields polygons / edges
layer c = bbox_center(a)
Centre of the shape bounding box as a 2×2 dbu box (anchor).
Notes
(min+max)/2.intersections(e1, e2)Available · yields edges / points
layer p = intersections(e1, e2)
Proper crossings of two edge layers as 2×2 dbu boxes. Endpoints on the other edge do not count (open interval).
Notes
with_edge(a, b)Available · yields polygons
layer w = with_edge(a, b)
A-shapes that have at least one collinear edge piece on B. B is converted to edges if needed.
Notes
polygons(x)Available · yields polygons
layer p = polygons(width(m1) < 0.14 um)
layer p = polygons(e, 0.02 um)
Edge pairs → quadrilateral e1.a–e1.b–e2.b–e2.a. Fewer than 3 unique points: a 2×2 dbu box around the point. Optional second argument: then sized(d).
Notes
sized.