FastGeoMesh 2.1.1
dotnet add package FastGeoMesh --version 2.1.1
NuGet\Install-Package FastGeoMesh -Version 2.1.1
<PackageReference Include="FastGeoMesh" Version="2.1.1" />
<PackageVersion Include="FastGeoMesh" Version="2.1.1" />
<PackageReference Include="FastGeoMesh" />
paket add FastGeoMesh --version 2.1.1
#r "nuget: FastGeoMesh, 2.1.1"
#:package FastGeoMesh@2.1.1
#addin nuget:?package=FastGeoMesh&version=2.1.1
#tool nuget:?package=FastGeoMesh&version=2.1.1
FastGeoMesh v2.1
🇬🇧 English | 🇫🇷 Français
English
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 likeArgumentException,InvalidOperationException, etc. - 🧪 Comprehensive Test Coverage: 298+ tests covering validation, geometry, and DI integration.
- ⚠️ Breaking Changes:
PrismMeshernow requires dependencies in its constructor. See the migration guide below.
🚀 Quick Start
With Dependency Injection (Recommended)
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 aResult<MesherOptions>.PrismMesher.Mesh()and its async variants return aResult<ImmutableMesh>.
Français
🇬🇧 English | 🇫🇷 Français
Français
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
Exceptiongé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:
PrismMesherrequiert 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 unResult<MesherOptions>.PrismMesher.Mesh()et ses variantes async retournent unResult<ImmutableMesh>.
Licence : MIT
| Product | Versions 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. |
-
net8.0
- FastGeoMesh.Application (>= 2.1.1)
- FastGeoMesh.Domain (>= 2.1.1)
- FastGeoMesh.Infrastructure (>= 2.1.1)
- LibTessDotNet (>= 1.1.15)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- Microsoft.Extensions.ObjectPool (>= 9.0.9)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
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.