Findings and exemptions¶
| Call | Returns / behavior | What it does and why |
|---|---|---|
geometry.violations() |
Check; Regions, Edges, EdgePairs |
Wraps geometry as a finding stream. Use it when you need finding-level helpers such as custom messages before registering the result as a rule. |
findings.with_message("Area {area}", area=a.area) |
Check; fill named fields with Number / String values; no attribute access |
Fills named message fields from runtime numbers or text. Use it to include measured values in findings without storing Python formatting callbacks. |
findings.regions(context=a) |
Collect polygon findings without merging; other marker types fail | Collects polygon findings into a Region without merging them. Use it for later polygon work; context supplies coordinates for an empty result and does not clip it. |
findings.report_grid_scale(factor) |
Check; scale report coordinates |
Multiplies the report grid while retaining integer marker coordinates. Use it after calculations on explicitly magnified geometry to report in the intended coordinate system. |
a.enclosure_markers(b, distance=..., ribbon=..., mode="exterior") |
Region; enclosure markers; mode also "pairs" |
Builds polygon markers for enclosure edge cases, including crossing-ray wedges and thin ribbons on coincident edges. Use it when the rule needs this specific polygon marker recipe. |
a.rescale_markers(factor, collapsed_expansion=0) |
Rescaled marker Region |
Scales marker geometry by the factor, with optional expansion before small area markers collapse. Use it to preserve useful visible markers when changing their scale. |
check(predicate, marker=None) |
Check; a false predicate fails; absent marker uses backend diagnostic-marker policy |
Reports a finding when the condition is false. Use it for numeric or logical requirements that do not already return failing geometry; supply a marker to choose the reporting area. |
geometry.ignore(mask), findings.ignore(mask) |
Check; discard whole interacting findings, including boundary touches |
Removes whole findings touching the mask while leaving surviving geometry and messages unchanged. Use it for exemptions after checking, without introducing new input boundaries. |
These operations have different effects:
Python
# Subtract before checking: creates new boundaries.
checked_input = not_(metal, exemption)
widths = checked_input.min_width(0.20)
# Remove whole findings after checking.
widths = metal.min_width(0.20).ignore(exemption)
# Clip existing polygon markers.
clipped_polygons = and_(polygon_markers, reporting_region)
ignore() preserves surviving marker types, geometry, duplicates, and messages.
Edge/point touches count; pair interaction also tests the filled area between edges.
Repeated calls apply successive filters. It affects this expression only, not
service waivers. Clipping edge pairs changes their measurement; convert to
polygons explicitly when polygon output is intended.
findings.regions(context=a) uses the context only for coordinates of an empty
result; it does not clip. Non-polygon findings raise an execution error.