Spline 0.2.0
dotnet add package Spline --version 0.2.0
NuGet\Install-Package Spline -Version 0.2.0
<PackageReference Include="Spline" Version="0.2.0" />
<PackageVersion Include="Spline" Version="0.2.0" />
<PackageReference Include="Spline" />
paket add Spline --version 0.2.0
#r "nuget: Spline, 0.2.0"
#:package Spline@0.2.0
#addin nuget:?package=Spline&version=0.2.0
#tool nuget:?package=Spline&version=0.2.0
Spline
Reusable spline geometry and fitting primitives extracted from the DemoSpline
Avalonia application and published as the Spline NuGet package.
Included
- Levien-derived curvature-oriented fair spline solving through
Spline - CAD-style global cubic B-spline interpolation through
GlobalBSpline - canonical non-rational B-spline representation through
BSplineCurve - de Boor evaluation and derivative evaluation
- exact cubic B-spline to Bezier/SVG conversion
- Bezier path and hit-testing helpers
- Cubic and two-parameter spline primitives
- Curve-grid interpolation helpers
- Headless polyline simplification and corner detection
Identity
- Package ID:
Spline - Assembly:
Spline.dll - Namespace:
Spline
Target
Spline currently targets net9.0.
Fair-spline consumer example
The main spline type is also named Spline, so many consumers alias it as
SplinePath:
using Spline;
using SplinePath = global::Spline.Spline;
var spline = new SplinePath(controlPoints, isClosed: false);
spline.Solve();
string svg = spline.RenderSvg();
CAD-style global B-spline example
using Spline;
var fitPoints = new[]
{
new Vec2(0, 0),
new Vec2(30, 50),
new Vec2(80, 40),
new Vec2(120, 0),
};
var result = GlobalBSpline.InterpolateDetailed(
fitPoints,
startTangent: new Vec2(1, 0.25),
endTangent: new Vec2(1, -0.25));
BSplineCurve curve = result.Curve;
Vec2 point = curve.Evaluate(0.5);
Vec2 derivative = curve.EvaluateDerivative(0.5);
string svg = curve.ToSvgPath();
BSplineCurve exposes Degree, ControlPoints, Knots, and unit Weights for
CAD/NURBS-oriented interchange. The input fit points are distinct from the solved
B-spline control points.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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. |
-
net9.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.
Spline 0.2.0 introduces production global cubic B-spline interpolation from fit points and endpoint tangents, canonical CAD B-spline geometry, de Boor evaluation and derivatives, exact cubic Bezier conversion, discontinuous-knot-safe path export, comprehensive tests, samples, and documentation.