Fidget 0.4.3-preview.1

This is a prerelease version of Fidget.
dotnet add package Fidget --version 0.4.3-preview.1
                    
NuGet\Install-Package Fidget -Version 0.4.3-preview.1
                    
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="Fidget" Version="0.4.3-preview.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Fidget" Version="0.4.3-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="Fidget" />
                    
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 Fidget --version 0.4.3-preview.1
                    
#r "nuget: Fidget, 0.4.3-preview.1"
                    
#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 Fidget@0.4.3-preview.1
                    
#: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=Fidget&version=0.4.3-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Fidget&version=0.4.3-preview.1&prerelease
                    
Install as a Cake Tool

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-x64
  • linux-x64
  • osx-x64
  • osx-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 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. 
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
0.4.3-preview.1 37 5/22/2026