Fidget 0.4.3-preview.1
dotnet add package Fidget --version 0.4.3-preview.1
NuGet\Install-Package Fidget -Version 0.4.3-preview.1
<PackageReference Include="Fidget" Version="0.4.3-preview.1" />
<PackageVersion Include="Fidget" Version="0.4.3-preview.1" />
<PackageReference Include="Fidget" />
paket add Fidget --version 0.4.3-preview.1
#r "nuget: Fidget, 0.4.3-preview.1"
#:package Fidget@0.4.3-preview.1
#addin nuget:?package=Fidget&version=0.4.3-preview.1&prerelease
#tool nuget:?package=Fidget&version=0.4.3-preview.1&prerelease
Fidget C#
C# bindings for the Fidget implicit modeling library.
Fidget is a library of infrastructure and algorithms for implicit surfaces, powered by bytecode evaluation and JIT compilation. This package provides .NET bindings via the C API (fidget-capi).
Installation
dotnet add package Fidget
The NuGet package includes native binaries for:
win-x64linux-x64osx-x64osx-arm64
The correct native library for your platform is automatically copied to the output directory at build time.
Quick Start
using Fidget;
// Create a context for building math expressions
using var ctx = new Context();
var x = ctx.X;
var y = ctx.Y;
var z = ctx.Z;
// Build a sphere SDF: sqrt(x² + y² + z²) - 1.0
var r2 = ctx.Add(ctx.Add(ctx.Square(x), ctx.Square(y)), ctx.Square(z));
var sphere = ctx.Sub(ctx.Sqrt(r2), ctx.Constant(1.0));
// Compile into a shape
using var shape = new Shape(ctx, sphere);
// Evaluate at a point
using var tape = shape.CreatePointTape();
using var eval = new PointEvaluator();
float value = eval.Evaluate(tape, 0.5f, 0.0f, 0.0f);
Console.WriteLine(value); // negative = inside, positive = outside
// Generate a mesh
using var mesh = new Mesh(shape, depth: 8);
Console.WriteLine($"Triangles: {mesh.TriangleCount}");
Documentation
Comprehensive documentation is available in English and Chinese:
| Chapter | EN | ZH |
|---|---|---|
| Introduction to Implicit Modeling | en | zh |
| Getting Started | en | zh |
| Context & Node API Reference | en | zh |
| Building Implicit Shapes | en | zh |
| Evaluation & Debugging | en | zh |
| Mesh Generation | en | zh |
| 2D Rendering | en | zh |
| Advanced Examples | en | zh |
Building from Source
# Clone with submodules
git clone --recurse-submodules https://github.com/weianweigan/fidget-csharp.git
cd fidget-csharp
# Build and test
./build.sh
Or step by step:
# 1. Build the Rust native library
cd fidget-capi
cargo build --release
# 2. Build and test the C# project
cd ..
dotnet test Fidget.slnx -c Release
License
This project is licensed under the Mozilla Public License 2.0, matching the upstream Fidget 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 was computed. 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. |
-
.NETStandard 2.0
-
net8.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 |
|---|---|---|
| 0.4.3-preview.1 | 37 | 5/22/2026 |