# GriefPrevention v17.3.5
## Highlights
- Major shaped-claim performance pass: shaped edits and large shaped path creation are now viable at sizes that previously stalled or failed the geometry layer.
- Reduced per-edit CPU cost for nib growth, merges, and boundary tracing on claims with long orthogonal perimeters.
## Shaped Claim Performance
- Replaced the per-cell scan used to measure shaped claims with a closed-form count derived from the boundary polygon, so measuring a shaped claim is now `O(edges)` instead of `O(width * height)`.
- Large shaped paths (winding corridors, perimeter walls, sprawling multi-segment outlines) can now be created and resized without the prior cost wall, because measurement no longer grows with the claim's bounding box.
- Added a cached boundary polygon on each claim so repeated measurement, containment, and overlap queries within the same edit no longer rebuild and re-validate the polygon from scratch.
## Technical Improvements
- New `OrthogonalPolygon.cellCount()` computes the number of integer-lattice cells inside or on the boundary of a shaped claim directly from its corners, using Pick's theorem (`A + B/2 + 1`) with the shoelace formula for the area `A` and the summed Manhattan edge lengths for the boundary count `B`. This is exact for axis-aligned polygons with integer corners, which is always the case for shaped claims.
- `Claim.getClaimBlocks()` now calls `cellCount()` instead of iterating every `(x, z)` in the bounding box and calling `containsColumn`.
- `DataStore.polygonCellArea(...)` no longer builds a throwaway measuring claim and runs a per-cell `contains(...)` test; it also delegates to `cellCount()`.
- Added a transient `cachedBoundaryPolygon` on `Claim`, invalidated on shape mutation and on the copy constructor, and populated from the already-validated polygon in `setShapedCorners` so `getBoundaryPolygon()` does not re-validate on first access.
## Notes
- This release is the recommended base for GPExpansion `v1.0.4`, whose `/claimmap` performance work depends on the shaped-claim geometry speedups shipped here.
- Behavior of existing shaped edits is unchanged; only their cost and upper size limits have improved.
Developer information
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle.
maven { name = "Modrinth"; url = "https://api.modrinth.com/maven" }