C# .NET 3D Library for 2D/3D Geometric Computation

Work with 3D Bitmap, Mesh Creation & Ray-Casting against the Mesh surface via Open Source .NET 3D APIs

Geometry3Sharp is an open source pure C# library for working with geometric computations like 2D/3D Vector Math, Curves and Surfaces, Spatial Queries, and Implicit Surfaces. Geometry3Sharp is fully compatible with Unity. You need to set the G3_USING_UNITY scripting define and after that you will have transparent interop between G3 and Unity vector types.

The library supports several features related to mesh creation and ray-casting against the mesh surface, mesh simplification, Unity re-meshing animations, generating 3D lattices, marching cubes, working with 3d bitmaps, fast mesh, surfacing point sets with fast winding numbers and more.

Previous Next

Getting Started with Geometry3Sharp

The easiest way to install Geometry3Sharp is by using NuGet. Use the following command for a smooth installation.

Install Geometry3Sharp via NuGet

Install-Package geometry3Sharp -Version 1.0.324 

3D Mesh Construction via .NET Library

Geometry3Sharp provides functionality for interactive mesh creation using .NET. First of all, construct a DMesh3 object from lists of vertex x/y/z coordinates. Utility function makes this construction simple. Moreover, the NewVertexInfo type has provided extra constructors for other cases, such as vertex colors and UVs.

Create Bitmap3 Voxelization of a Mesh

Geometry3Sharp enables software developers to create Bitmap3 Voxelization of a mesh inside their own applications. There are several ways to create this Bitmap3 voxelization of a mesh such as Voxelization with the mesh winding number, voxelization with Point-containment queries, creating a Minecraft-style surface mesh and more. The tutorials for the above are provided in the GitHub documentation section.

3D Printer Control

The Geometry3Sharp library allows developers to directly generate GCode for their 3D printer. It only requires geometry3Sharp, gsGCode, and gsSlicer libraries.