NurbsSharp 0.0.1-beta2
.NET 8.0
This package targets .NET 8.0. The package is compatible with this framework or higher.
.NET Standard 2.1
This package targets .NET Standard 2.1. The package is compatible with this framework or higher.
This is a prerelease version of NurbsSharp.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package NurbsSharp --version 0.0.1-beta2
NuGet\Install-Package NurbsSharp -Version 0.0.1-beta2
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="NurbsSharp" Version="0.0.1-beta2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NurbsSharp" Version="0.0.1-beta2" />
<PackageReference Include="NurbsSharp" />
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 NurbsSharp --version 0.0.1-beta2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NurbsSharp, 0.0.1-beta2"
#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 NurbsSharp@0.0.1-beta2
#: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=NurbsSharp&version=0.0.1-beta2&prerelease
#tool nuget:?package=NurbsSharp&version=0.0.1-beta2&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
NURBS Sharp
NURBS Sharp is a NURBS (Non-Uniform Rational B-Spline) curve and surface computation library targeting .NET .
It is implemented using only the standard library.
Features
- Generation and evaluation of NURBS curves and surfaces
- Cross-platform support (.NET 8, .NET Standard 2.1)
Installation
You can install NURBS Sharp via NuGet Package Manager:
dotnet add package NurbsSharp
Usage
using NurbsSharp.Core;
using NurbsSharp.Geometry;
using NurbsSharp.Tesselation;
using NurbsSharp.IO;
// Create a NURBS Surface
// Define degrees
int degreeU = 3;
int degreeV = 3;
// Define knot vectors
double[] knotsU = { 0, 0, 0, 0, 1, 1, 1, 1 };
double[] knotsV = { 0, 0, 0, 0, 1, 1, 1, 1 };
KnotVector knotVectorU = new KnotVector(knotsU);
KnotVector knotVectorV = new KnotVector(knotsV);
// Define control points [u][v]
ControlPoint[][] controlPoints = new ControlPoint[4][];
controlPoints[0] = new ControlPoint[] {
// (x, y, z, weight)
new ControlPoint(0.0, 0.0, 0.0, 1),
new ControlPoint(1.0, 0.0, 1.0, 1),
new ControlPoint(2.0, 0.0, 3.0, 1),
new ControlPoint(3.0, 0.0, 3.0, 1)
};
controlPoints[1] = new ControlPoint[] {
new ControlPoint(0.0, 1.0, 0.5, 1),
new ControlPoint(1.0, 1.0, 1.5, 1),
new ControlPoint(2.0, 1.0, 4.0, 1),
new ControlPoint(3.0, 1.0, 3.0, 1)
};
controlPoints[2] = new ControlPoint[] {
new ControlPoint(3.0, 1.0, 0.5, 1),
new ControlPoint(3.0, 1.0, 1.5, 1),
new ControlPoint(3.0, 1.0, 5.0, 1),
new ControlPoint(3.0, 1.0, 6.0, 1)
};
controlPoints[3] = new ControlPoint[] {
new ControlPoint(3.0, 2.0, 0.5, 1),
new ControlPoint(3.0, 2.0, 1.5, 1),
new ControlPoint(3.0, 2.0, 5.0, 1),
new ControlPoint(3.0, 2.0, 7.0, 1)
};
// Create NURBS surface
NurbsSurface nurbsSurface = new NurbsSurface(degreeU, degreeV, knotVectorU, knotVectorV, controlPoints);
// Evaluate a point on the surface at (u, v) = (0.5, 0.5)
var point = nurbsSurface.GetPos(0.5, 0.5);
// It show the evaluated point
Console.WriteLine(point);
// Make a mesh from the NURBS surface
var mesh = SurfaceTessellator.Tessellate(nurbsSurface, 20, 20);
// Export the mesh to an STL file
using (FileStream fs = new FileStream("test_output.stl", FileMode.Create, FileAccess.Write))
{
await STLExporter.ExportAsync(mesh, fs);
}
Documentation
API Docs: https://nyarurato.github.io/NurbsSharp/
Development
Build
dotnet build
Test
dotnet test
License
MIT License
| 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 | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | 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.
-
.NETStandard 2.1
- No dependencies.
-
net8.0
- No dependencies.
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 |
|---|---|---|
| 0.3.0 | 181 | 12/12/2025 |
| 0.2.0 | 514 | 12/1/2025 |
| 0.1.1 | 214 | 11/25/2025 |
| 0.1.0 | 374 | 11/21/2025 |
| 0.0.1-beta5 | 421 | 11/19/2025 |
| 0.0.1-beta4 | 420 | 11/18/2025 |
| 0.0.1-beta3 | 328 | 11/17/2025 |
| 0.0.1-beta2 | 278 | 11/14/2025 |
| 0.0.1-beta | 285 | 11/14/2025 |