pub fn validate_part(
ring: &[[i64; 2]],
config: &ProtocolConfig,
) -> Option<String>Expand description
Validate a polygon part against the per-part on-chain rules.
Mirrors polygon.move’s per-part checks — the ones enforced by part() and
validate_part_edges/is_convex_vertices. Compactness is deliberately NOT
checked here because on-chain applies it only at the polygon boundary
(validate_multipart_topology). Callers that need the full polygon
validation must also invoke topology::validate_multipart_topology.
Checks (in order):
- At least 3 vertices
- At most
max_vertices_per_partvertices - Weakly convex
- All edges
>= min_edge_length_squared