ZeroGeometry.Core 1.0.0

dotnet add package ZeroGeometry.Core --version 1.0.0
                    
NuGet\Install-Package ZeroGeometry.Core -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ZeroGeometry.Core" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ZeroGeometry.Core" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="ZeroGeometry.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ZeroGeometry.Core --version 1.0.0
                    
#r "nuget: ZeroGeometry.Core, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ZeroGeometry.Core@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ZeroGeometry.Core&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ZeroGeometry.Core&version=1.0.0
                    
Install as a Cake Tool

ZeroGeometry

License: MIT .NET Multi-Targeting Point Cloud & Spatial Zero External Dependencies NuGet Version

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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