FastGeoMesh 2.1.1

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

FastGeoMesh v2.1

🇬🇧 English | 🇫🇷 Français


English

CI Codecov .NET 8 NuGet License: MIT Tests Quality

Fast, safe, quad-dominant meshing for prismatic volumes from 2D footprints and Z elevations.

FastGeoMesh v2.1 is a high-performance .NET 8 library for generating quad-dominant meshes from 2.5D prismatic structures. Built with Clean Architecture principles achieving 10/10 code quality, it offers perfect separation of concerns, full dependency injection support, and enterprise-grade reliability.

🎯 What's New in v2.1 🏆

  • 🏗️ Clean Architecture Perfection (10/10): 100% compliance with zero architectural violations.
  • 💉 Full Dependency Injection Support: services.AddFastGeoMesh() for easy registration in ASP.NET Core, MAUI, etc.
  • 🎯 Specific Exception Handling: No more broad catch (Exception). Catches specific exceptions like ArgumentException, InvalidOperationException, etc.
  • 🧪 Comprehensive Test Coverage: 298+ tests covering validation, geometry, and DI integration.
  • ⚠️ Breaking Changes: PrismMesher now requires dependencies in its constructor. See the migration guide below.

🚀 Quick Start

using FastGeoMesh;
using FastGeoMesh.Domain;
using FastGeoMesh.Application;
using Microsoft.Extensions.DependencyInjection;

// 1. Register FastGeoMesh services
var services = new ServiceCollection();
services.AddFastGeoMesh(); // or AddFastGeoMeshWithMonitoring()
var serviceProvider = services.BuildServiceProvider();

// 2. Resolve mesher via DI
var mesher = serviceProvider.GetRequiredService<IPrismMesher>();

// 3. Define geometry
var polygon = Polygon2D.FromPoints(new[]
{
    new Vec2(0, 0), new Vec2(20, 0), new Vec2(20, 5), new Vec2(0, 5)
});
var structure = new PrismStructureDefinition(polygon, -10, 10);

// 4. Configure options safely
var optionsResult = MesherOptions.CreateBuilder()
    .WithFastPreset()
    .Build();

if (optionsResult.IsFailure)
{
    Console.WriteLine($"Configuration error: {optionsResult.Error.Description}");
    return;
}

// 5. Generate the mesh
var meshResult = await mesher.MeshAsync(structure, optionsResult.Value);

if (meshResult.IsSuccess)
{
    var mesh = meshResult.Value;
    Console.WriteLine($"✓ Generated {mesh.QuadCount} quads, {mesh.TriangleCount} triangles");
}
else
{
    Console.WriteLine($"✗ Meshing failed: {meshResult.Error.Description}");
}

Manual Construction (for simple apps)

using FastGeoMesh.Application.Services;
using FastGeoMesh.Infrastructure.Services;

// Manually create services
var geometryService = new GeometryService();
var zLevelBuilder = new ZLevelBuilder();
var proximityChecker = new ProximityChecker();
var mesher = new PrismMesher(geometryService, zLevelBuilder, proximityChecker);

// Use as normal
var meshResult = await mesher.MeshAsync(structure, options);

💥 Breaking Changes

Breaking Changes in v2.1

The PrismMesher constructor now requires dependencies. The parameterless constructor is obsolete.

OLD (v2.0):

// This no longer compiles
var mesher = new PrismMesher(); 

NEW (v2.1):

// Option A: Use Dependency Injection (Recommended)
services.AddFastGeoMesh();
var mesher = serviceProvider.GetRequiredService<IPrismMesher>();

// Option B: Manual Construction
var geometryService = new GeometryService();
var zLevelBuilder = new ZLevelBuilder();
var proximityChecker = new ProximityChecker();
var mesher = new PrismMesher(geometryService, zLevelBuilder, proximityChecker);

See MIGRATION_GUIDE_DI.md in the repository for detailed instructions.

Breaking Changes in v2.0

FastGeoMesh v2.0 introduced Clean Architecture which requires some namespace changes:

OLD (v1.x):

using FastGeoMesh.Meshing;
using FastGeoMesh.Structures;
using FastGeoMesh.Geometry;

NEW (v2.0+):

using FastGeoMesh.Domain;           // Core types
using FastGeoMesh.Application;      // Meshing logic
using FastGeoMesh.Infrastructure;   // External services

API Changes:

  • MesherOptions.CreateBuilder().Build() returns a Result<MesherOptions>.
  • PrismMesher.Mesh() and its async variants return a Result<ImmutableMesh>.

Français

🇬🇧 English | 🇫🇷 Français


Français

CI Codecov .NET 8 NuGet License: MIT Tests Quality

Maillage rapide, sûr et dominant par quadrilatères pour volumes prismatiques à partir de contours 2D et d'élevations Z.

FastGeoMesh v2.1 est une bibliothèque .NET 8 haute performance pour générer des maillages dominants par quadrilatères. Construite selon les principes de l'Architecture Propre avec une note de qualité de 10/10, elle offre une séparation parfaite des préoccupations, un support complet pour l'injection de dépendances et une fiabilité de niveau entreprise.

🎯 Nouveautés de la v2.1 🏆

  • 🏗️ Perfection de l'Architecture Propre (10/10): 100% de conformité, zéro violation architecturale.
  • 💉 Support Complet de l'Injection de Dépendances: services.AddFastGeoMesh() pour un enregistrement facile dans ASP.NET Core, MAUI, etc.
  • 🎯 Gestion Spécifique des Exceptions: Ne capture plus les Exception génériques, mais des types spécifiques (ArgumentException, InvalidOperationException, etc.).
  • 🧪 Couverture de Test Complète: Plus de 298 tests couvrant la validation, la géométrie et l'intégration DI.
  • ⚠️ Changements Incompatibles: PrismMesher requiert maintenant des dépendances dans son constructeur. Voir le guide de migration ci-dessous.

🚀 Démarrage Rapide

Avec Injection de Dépendances (Recommandé)

using FastGeoMesh;
using FastGeoMesh.Domain;
using FastGeoMesh.Application;
using Microsoft.Extensions.DependencyInjection;

// 1. Enregistrer les services FastGeoMesh
var services = new ServiceCollection();
services.AddFastGeoMesh(); // ou AddFastGeoMeshWithMonitoring()
var serviceProvider = services.BuildServiceProvider();

// 2. Résoudre le mesher via DI
var mesher = serviceProvider.GetRequiredService<IPrismMesher>();

// 3. Définir la géométrie
var polygon = Polygon2D.FromPoints(new[]
{
    new Vec2(0, 0), new Vec2(20, 0), new Vec2(20, 5), new Vec2(0, 5)
});
var structure = new PrismStructureDefinition(polygon, -10, 10);

// 4. Configurer les options
var optionsResult = MesherOptions.CreateBuilder()
    .WithFastPreset()
    .Build();

if (optionsResult.IsFailure)
{
    Console.WriteLine($"Erreur de configuration : {optionsResult.Error.Description}");
    return;
}

// 5. Générer le maillage
var meshResult = await mesher.MeshAsync(structure, optionsResult.Value);

if (meshResult.IsSuccess)
{
    var mesh = meshResult.Value;
    Console.WriteLine($"✓ {mesh.QuadCount} quads, {mesh.TriangleCount} triangles générés");
}
else
{
    Console.WriteLine($"✗ Échec du maillage : {meshResult.Error.Description}");
}

Construction Manuelle (pour applications simples)

using FastGeoMesh.Application.Services;
using FastGeoMesh.Infrastructure.Services;

// Créer les services manuellement
var geometryService = new GeometryService();
var zLevelBuilder = new ZLevelBuilder();
var proximityChecker = new ProximityChecker();
var mesher = new PrismMesher(geometryService, zLevelBuilder, proximityChecker);

// Utiliser comme d'habitude
var meshResult = await mesher.MeshAsync(structure, options);

💥 Changements Incompatibles

Changements Incompatibles en v2.1

Le constructeur de PrismMesher requiert maintenant des dépendances. Le constructeur sans paramètre est obsolète.

ANCIEN (v2.0):

// Ceci ne compile plus
var mesher = new PrismMesher(); 

NOUVEAU (v2.1):

// Option A : Injection de Dépendances (Recommandé)
services.AddFastGeoMesh();
var mesher = serviceProvider.GetRequiredService<IPrismMesher>();

// Option B : Construction Manuelle
var geometryService = new GeometryService();
var zLevelBuilder = new ZLevelBuilder();
var proximityChecker = new ProximityChecker();
var mesher = new PrismMesher(geometryService, zLevelBuilder, proximityChecker);

Consultez MIGRATION_GUIDE_DI.md dans le dépôt pour des instructions détaillées.

Changements Incompatibles en v2.0

FastGeoMesh v2.0 a introduit l'Architecture Propre, ce qui a modifié certains espaces de noms :

ANCIEN (v1.x):

using FastGeoMesh.Meshing;
using FastGeoMesh.Structures;
using FastGeoMesh.Geometry;

NOUVEAU (v2.0+):

using FastGeoMesh.Domain;           // Types cœur
using FastGeoMesh.Application;      // Logique de maillage
using FastGeoMesh.Infrastructure;   // Services externes

**Changements de l'API 😗*

  • MesherOptions.CreateBuilder().Build() retourne un Result<MesherOptions>.
  • PrismMesher.Mesh() et ses variantes async retournent un Result<ImmutableMesh>.

Licence : MIT

Product Compatible and additional computed target framework versions.
.NET 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. 
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
2.1.1 164 11/27/2025
2.1.0 178 10/23/2025
2.0.0 181 10/8/2025
1.4.0 174 10/6/2025
1.3.2 187 10/2/2025
1.3.1 178 9/30/2025
1.3.0 183 9/29/2025
1.1.0 141 9/26/2025
1.0.0 150 9/26/2025

2.0.0: BREAKING CHANGES - Clean Architecture refactoring. Direct access to Domain/Application/Infrastructure layers. Removed compatibility wrappers for cleaner, more maintainable API. Enhanced Result pattern, improved async performance, and better separation of concerns. Migration guide: replace old namespaces with FastGeoMesh.Domain, FastGeoMesh.Application, FastGeoMesh.Infrastructure.