![]() |
VOOZH | about |
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" />Directory.Packages.props
<PackageReference Include="FastGeoMesh" />Project file
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.1Install as a Cake Addin
#tool nuget:?package=FastGeoMesh&version=2.1.1Install as a Cake Tool
🇬🇧 English | 🇫🇷 Français
👁 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.
services.AddFastGeoMesh() for easy registration in ASP.NET Core, MAUI, etc.catch (Exception). Catches specific exceptions like ArgumentException, InvalidOperationException, etc.PrismMesher now requires dependencies in its constructor. See the migration guide below.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}");
}
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);
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.
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>.🇬🇧 English | 🇫🇷 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.
services.AddFastGeoMesh() pour un enregistrement facile dans ASP.NET Core, MAUI, etc.Exception génériques, mais des types spécifiques (ArgumentException, InvalidOperationException, etc.).PrismMesher requiert maintenant des dépendances dans son constructeur. Voir le guide de migration ci-dessous.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}");
}
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);
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.
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 | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
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.