"""Preserve measured coordinates when there is no geometry to subtract. Fitting another float32 rectangle is not an identity operation in world coordinates. It can shift sampling across a pixel/threshold boundary even when no existing paint occupies the proposed body. Actual fragmentation still uses the original exclusion distance and minimum-section policy. """ from beta_profiles import describe from marking_rules import POLICY from marking_rules import missing_parts as fragmented_parts def missing_parts(polygon, existing): description = describe(polygon) if description is None: return [] occupied = polygon.intersection(existing.buffer(0.10)) if occupied.is_empty: return [polygon] if description["length"] >= POLICY["min_continuous_section_m"] else [] return fragmented_parts(polygon, existing)