PolylineKit.Core
0.1.0-alpha.1
See the version list below for details.
dotnet add package PolylineKit.Core --version 0.1.0-alpha.1
NuGet\Install-Package PolylineKit.Core -Version 0.1.0-alpha.1
<PackageReference Include="PolylineKit.Core" Version="0.1.0-alpha.1" />
<PackageVersion Include="PolylineKit.Core" Version="0.1.0-alpha.1" />
<PackageReference Include="PolylineKit.Core" />
paket add PolylineKit.Core --version 0.1.0-alpha.1
#r "nuget: PolylineKit.Core, 0.1.0-alpha.1"
#:package PolylineKit.Core@0.1.0-alpha.1
#addin nuget:?package=PolylineKit.Core&version=0.1.0-alpha.1&prerelease
#tool nuget:?package=PolylineKit.Core&version=0.1.0-alpha.1&prerelease
PolylineKit.Core
.NET methods for numeric area and region overlap, with no external runtime dependencies. Includes self-intersecting paths with explicit fill rules, plus normalization, transforms, resampling and alignment. Targets .NET Standard 2.0 and .NET 10. MIT licensed.
Install the alpha candidate
Version 0.1.0-alpha.1 is prepared for evaluation. Until publication on NuGet.org,
use the verified local feed produced by the
package verification guide:
dotnet add MyApp/MyApp.csproj package PolylineKit.Core --version 0.1.0-alpha.1 --source /absolute/path/to/feed
Measure zone coverage
using PolylineKit;
Point2[] zone = [new(0, 0), new(6, 0), new(6, 2),
new(2, 2), new(2, 6), new(0, 6)];
Point2[] footprint = [new(1, 1), new(5, 1), new(5, 5), new(1, 5)];
const PathFillRule rule = PathFillRule.NonZero;
double zoneArea = PolylineArea.FilledArea(zone, rule); // 20; cache for this zone
double coveredArea = PolylineArea.IntersectionArea(zone, footprint, rule); // 7
double? coverage = zoneArea > 0 ? coveredArea / zoneArea : null; // 0.35
var overlap = PolylineArea.CompareRegions(zone, footprint, rule);
// FirstArea = 20; SecondArea = 16; UnionArea = 29; IoU = 7/29.
The example uses C# 12 collection expressions. Older compilers can use explicit
new Point2[] { new Point2(...), ... } arrays. Paths close implicitly; NonZero
and EvenOdd fill rules are supported. An undefined coverage ratio is represented
by null, not zero. Summing overlapping footprints' individual coverage can
double-count their shared area.
Contracts and limits
Each PolylineArea operand is one ordered walk, with at least three retained vertices. Null,
empty, too-short and nonfinite inputs throw; valid collinear walks may have zero
area. Coordinates are planar, and areas use squared coordinate units. Input is
not quantized, projected, normalized or resampled implicitly. Calculations use
double; tiny features near large coordinates can lose precision.
For holes and disconnected components in the current source, use
PreparedRegion.FromRings and RegionArea.
Preparation copies coordinates without inferring holes or reversing rings.
Empty collections are valid; every supplied ring still needs three retained
vertices. The current alpha candidate includes these APIs; earlier locally built
candidates predate them. Use the verified package pair.
Use CompareRegions for union, XOR, IoU and Jaccard distance; BetweenGraphs
for the integral of absolute vertical separation between increasing-x graphs.
Normalization and alignment are separate operations. For a trusted simple ring
alone, a shoelace sum is cheaper than general fill-aware processing.
See the area guide,
transformations,
and performance and memory.
The assembly retains its PolylineKit.Winding name for binary compatibility;
all public types use the PolylineKit namespace. The core never references
Clipper2. For resolved contours or decimal-grid comparisons, use the optional
PolylineKit.Clipper adapter.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
-
net10.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on PolylineKit.Core:
| Package | Downloads |
|---|---|
|
PolylineKit.Clipper
Optional Clipper2 integration for quantized area comparisons and operations that also need resulting contours. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-alpha.3 | 86 | 10/11/2026 |
| 0.1.0-alpha.2 | 107 | 10/10/2026 |