Shape and hygiene

Shape and hygiene

area and angle report as marker polygons or edge pairs. count / not_empty mark every shape of the layer when the condition holds. empty, and a count limit that an empty layer satisfies, have no geometry to point at and produce one dummy marker at (0,0)–(1,0).

← Language overview

area(a)

Available · yields edge pairs (from the shape)

check "A" : area(m1) < 0.09 um2

Compares the polygon area with the limit. Hits become markers built from the shape.

Input Result

Notes

  • Net area including holes (a hole reduces the area).
  • area(holes(m1)) < x for hole area.
  • > for too-large areas (fat wires).
  • Exact ==: tolerance 0.51 dbu² (not µm²).

ongrid(a) (Check)

Available · yields edge pairs

check "G" : ongrid(m1) != 0.005 um

Fails when vertices do not lie on g. Markers = point pairs like the layer operator. Comparison != with tolerance 0.51 on distance 0 → every off-grid point counts.

Input Result

Notes

  • ongrid(a) == g is rarely useful (the distance is 0, the limit is g in dbu) — the usual form is !=.
  • Without a number in the check: the setup grid is used.

angle(a)

Available · yields edge pairs

check "AN" : angle(m1) < 45

Interior angle under/over the limit. The limit is degrees, not µm.

Input Result

Notes

  • 90° Manhattan: angle < 45 produces no markers.
  • 180° collinear: not a “sharp” corner.
  • A reflex angle >180° at a hole follows the interior-angle measure of the contour orientation.

length(e)

Available · yields edge pairs

check "L" : length(edges(m1)) < 0.05 um

Edge length against the limit. The marker is a pair with the same edge twice.

Input Result Micro-edge at the corner (schematic)

Notes

  • Polygons as input: every contour edge.
  • Very short fabrication burrs after a boolean are typical hits.

empty(a)

Available · yields one dummy marker or none

check "E" : empty(poly)
check "E" : count(poly) == 0

When the layer has no shapes: exactly one marker (0,0)–(1,0), distance 0. Otherwise nothing. Alias of count(a) == 0.

Empty layer Dummy at the origin

Also written as: count(a) == 0

Notes

  • Not anchored in the design geometrically — look for the dummy near the origin.
  • A layer with only zero-area degenerates: emptiness depends on whether those polygons are stored.

not_empty(a)

Available · yields 1 Marker je Shape

check "C" : not_empty(forbidden)
check "C" : count(forbidden) > 0

Sugar for count(a) > 0: forbidden geometry is present. The markers are the shapes of the layer, so the hit can be found in the design.

Input Result

Notes

  • A single dust grain counts.
  • Often combined after a filter: not_empty(with_area(m1, 0, 0.01)).

count(a)

Available · yields 1 Marker je Shape

check "C" : count(poly) > 0
check "C" : count(poly) == 3

shapeCount against the limit. A hit = one marker per shape of the layer; only when an empty layer satisfies the limit (== 0) does the dummy at (0,0)–(1,0) remain. Sugar not_empty = count > 0.

Input Result Three shapes, three markers when the count matches

Notes

  • raw counts unmerged shapes; merged counts components after union.
  • == tolerance 0.51 on the count (so practically integer-exact, 3 vs 3.0).
  • An edge layer: counts edges, not the original polygons — and then marks every edge.

self_intersecting(a)

Available · yields polygons / markers

check "X" : self_intersecting(m1)

Non-simple polygons (bowtie). Alias odd_polygons. A vertex touch without a cross does not count.

Input Result

Also written as: odd_polygons

Notes

  • A touch at a vertex without a cross: usually not self-intersecting.
  • A figure-eight loop: yes.

zero_width(a)

Available · yields polygons / markers

check "Z" : zero_width(path)

Degenerate: consecutive edges collinear and opposite (out and back).

Input Result

Notes

  • Two identical points: edges already skips them.

spikes(a, α)

Available · yields polygons / markers

check "SP" : spikes(m1, 10)

Needles: interior angle at the vertex < α degrees. The marker is the shape.

Input Result

Notes

  • Long sharp triangles vs. 1 dbu burrs: length and angle are intended to be combined.