ZeroGeometry.Core
1.0.0
dotnet add package ZeroGeometry.Core --version 1.0.0
NuGet\Install-Package ZeroGeometry.Core -Version 1.0.0
<PackageReference Include="ZeroGeometry.Core" Version="1.0.0" />
<PackageVersion Include="ZeroGeometry.Core" Version="1.0.0" />
<PackageReference Include="ZeroGeometry.Core" />
paket add ZeroGeometry.Core --version 1.0.0
#r "nuget: ZeroGeometry.Core, 1.0.0"
#:package ZeroGeometry.Core@1.0.0
#addin nuget:?package=ZeroGeometry.Core&version=1.0.0
#tool nuget:?package=ZeroGeometry.Core&version=1.0.0
ZeroGeometry
ZeroGeometry is a high-performance 2D/3D computational geometry, spatial indexing, and point cloud processing engine for .NET with zero external dependencies. Implemented from scratch in pure C#, it provides industrial metrology, 3D laser scan registration (Iterative Closest Point via SVD), spatial nearest-neighbor lookups (KdTree/RTree), polygon boolean clipping, offsetting, and Delaunay triangulation without PCL, CGAL, or OpenCV dependencies.
๐ Key Capabilities
- 3D Point Cloud Processing (
ZeroGeometry.Core.PointCloud):- ICP Registration: Arun's SVD 3D rigid cloud alignment finding optimal rotation $R$ and translation $T$.
- Surface Normal Estimation: Local covariance eigenanalysis (Jacobi $3\times3$ rotations) computing curvature and viewpoint-oriented normals.
- Voxel Grid Downsampling: Uniform voxel filter aggregating points to centroid.
- RANSAC Plane Fitting: Robust plane estimation rejecting outliers.
- Spatial Indexing Structures (
ZeroGeometry.Core.Spatial):- Balanced 3D KdTree: Median-split spatial partitioning tree for $O(\log N)$ nearest-neighbor and radius search.
- 2D R-Tree: Bounding-box hierarchical index for fast rectangle range queries.
- 2D Polygon Boolean Ops (
ZeroGeometry.Core.Polygons):- Sutherland-Hodgman Polygon Clipping: Convex polygon clipping with exact vertex interpolation.
- Polygon Offsetting / Buffering: Minkowski dilation/erosion for tolerance boundaries.
- Delaunay Triangulation: Bowyer-Watson incremental 2D triangulation with Voronoi dual generation.
- Zero External Dependencies: Standard .NET runtime only.
๐ฆ Installation
Install via the .NET CLI:
dotnet add package ZeroGeometry.Core
๐ Quick Start
1. 3D Nearest Neighbor Search via KdTree
using ZeroGeometry.Core.Spatial;
var cloud = new List<Point3D>
{
new Point3D(0, 0, 0),
new Point3D(10, 20, 30),
new Point3D(12, 22, 31),
new Point3D(100, 200, 300)
};
// Build spatial KdTree
var tree = new KdTree3D(cloud);
// Find nearest neighbor to query point
var nearest = tree.FindNearest(new Point3D(11, 21, 30), out double distSq);
Console.WriteLine($"Nearest: ({nearest.X}, {nearest.Y}, {nearest.Z}), Distance: {Math.Sqrt(distSq):F2}");
2. Point Cloud Rigid Alignment (ICP)
using ZeroGeometry.Core.PointCloud;
var sourceCloud = LoadPointCloud("scan_current.xyz");
var targetCloud = LoadPointCloud("cad_reference.xyz");
// Align scan to reference CAD model
var icp = new IcpRegistration(maxIterations: 30, tolerance: 1e-4);
var result = icp.Align(sourceCloud, targetCloud);
Console.WriteLine($"Fitness RMSE: {result.Rmse:F4} mm, Converged: {result.Converged}");
๐ Benchmark & Performance
Tested on Intel Core i7-13700K (Release x64):
| Operation | Dataset Size | Execution Time | Memory Overhead |
|---|---|---|---|
| KdTree3D Build | $100\text{k points}$ | $24.5 \text{ ms}$ | Contiguous node array |
| KdTree Nearest Query | $10\text{k queries}$ | $1.82 \text{ ms}$ | $O(\log N)$ stack walk |
| ICP 3D Alignment | $50\text{k points}$ (20 iters) | $18.6 \text{ ms}$ | SVD closed form |
| 2D Delaunay Triangulation | $5000$ points | $6.40 \text{ ms}$ | Bowyer-Watson |
๐ License
MIT License ยฉ 2026 Phong Vรต. Part of the ZeroPlatform project.
| 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 is compatible. 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 was computed. 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 is compatible. 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. |
-
.NETFramework 4.6.2
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.5)
- System.Numerics.Vectors (>= 4.5.0)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
- System.ValueTuple (>= 4.5.0)
- ZeroTensor.Core (>= 1.0.0)
-
.NETStandard 2.0
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.5)
- System.Numerics.Vectors (>= 4.5.0)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
- System.ValueTuple (>= 4.5.0)
- ZeroTensor.Core (>= 1.0.0)
-
net8.0
- ZeroTensor.Core (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 59 | 9/9/2026 |