Skip to content

Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel

Document M2 quad atlas reconstruction milestone

Yuechen Lia1c1bb355e4b
diff --git a/.gitignore b/.gitignore
index 5da3af0b..579fd1c3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -52,6 +52,9 @@ Aetheris.Firmament.FrictionLab/Reports/*.json
# Keep the manifest, validation/quality summaries, and compact reports eligible for source control.
docs/geometry/artifacts/bunny-m1/*.obj
docs/geometry/artifacts/bunny-m1/surface-mesh-document.json
+docs/geometry/artifacts/bunny-m2/surface-mesh-document.json
+docs/geometry/artifacts/bunny-m2/*.obj
+docs/geometry/artifacts/bunny-m2/*.ply
docs/geometry/artifacts/bunny-m1/seam-network.json
docs/geometry/artifacts/bunny-m1/seam-fit-candidates.json
docs/geometry/artifacts/bunny-m1/judgment-traces.json
diff --git a/Aetheris.Reconstruction.Tests/ReconstructionTests.cs b/Aetheris.Reconstruction.Tests/ReconstructionTests.cs
index d88b744d..c28be8ad 100644
--- a/Aetheris.Reconstruction.Tests/ReconstructionTests.cs
+++ b/Aetheris.Reconstruction.Tests/ReconstructionTests.cs
@@ -1,6 +1,7 @@
using System.Text;
using Aetheris.Kernel.Core.Brep.Tessellation;
using Aetheris.Kernel.Core.Math;
+using Aetheris.Surfacing;
using Xunit;
namespace Aetheris.Reconstruction.Tests;
@@ -117,9 +118,78 @@ end_header
Assert.Equal(seam.JudgmentWinner, second.Seams.Single(item => item.StableId == seam.StableId).JudgmentWinner);
}
+ [Fact]
+ public void Quad_atlas_square_has_four_authoritative_sides_and_strict_panel()
+ {
+ var mesh = Square(); var (field, _) = StructuredSurfaceRecovery.EstimateField(mesh);
+ var atlas = QuadAtlasRecovery.Build(mesh, field); var chart = Assert.Single(atlas.Charts);
+
+ Assert.Empty(atlas.UnresolvedTriangles);
+ Assert.Equal(4, chart.OrderedSides.Count);
+ Assert.Equal(4, chart.CornerVertices.Count);
+ Assert.True(PanelConcept.Validate(chart.StrictPanel).Satisfies);
+ Assert.All(chart.OrderedSides, use => Assert.Equal(use.SeamId, chart.StrictPanel[use.Side.ToString()].SourceCurveStableId));
+ Assert.Single(atlas.OpenBoundaryLoops);
+ Assert.Equal(0, atlas.UnintendedBoundaryLoops);
+ Assert.True(atlas.IsGloballyValid);
+ }
+
+ [Fact]
+ public void Quad_atlas_preserves_intentional_hole()
+ {
+ var mesh = Ring(); var report = TriangleSurfaceValidator.Validate(mesh); var (field, _) = StructuredSurfaceRecovery.EstimateField(mesh);
+ var atlas = QuadAtlasRecovery.Build(mesh, field);
+
+ Assert.Equal(2, report.BoundaryLoopCount);
+ Assert.Equal(2, atlas.OpenBoundaryLoops.Count);
+ Assert.All(atlas.Seams.Where(s => s.IsSourceBoundary), s => Assert.Single(s.ChartUses));
+ Assert.All(atlas.Charts, c => Assert.Equal(4, c.OrderedSides.Count));
+ }
+
+ [Fact]
+ public void Ambiguous_quad_routing_uses_stable_judgment_winner_after_hard_topology_filter()
+ {
+ var mesh = Grid(4); var (field, _) = StructuredSurfaceRecovery.EstimateField(mesh);
+ var first = QuadAtlasRecovery.Build(mesh, field); var second = QuadAtlasRecovery.Build(mesh, field);
+
+ Assert.NotEmpty(first.JudgmentTraces);
+ Assert.All(first.JudgmentTraces, t => Assert.InRange(t.TopCandidates.Count, 1, 3));
+ Assert.Equal(first.DeterministicHash, second.DeterministicHash);
+ Assert.Equal(first.JudgmentTraces.Select(t => t.Winner), second.JudgmentTraces.Select(t => t.Winner));
+ }
+
+ [Fact]
+ public void Quarter_turn_fixture_recovers_extraordinary_singularity_and_four_sided_charts()
+ {
+ var mesh = Fan(); var directions = new[] { 0d, 22.5, 45, 67.5 }.Select(x => x * Math.PI / 180).ToArray();
+ var field = Enumerable.Range(0, 4).Select(i =>
+ {
+ var t = mesh.Triangles[i]; var a = mesh.Vertices[t.A]; var b = mesh.Vertices[t.B]; var c = mesh.Vertices[t.C];
+ return new DifferentialSample(i, new((a.X+b.X+c.X)/3,(a.Y+b.Y+c.Y)/3,0), new(0,0,1),
+ new(Math.Cos(directions[i]),Math.Sin(directions[i]),0), new(Math.Cos(directions[i]),Math.Sin(directions[i]),0), 0, 1, true, "fixture");
+ }).ToArray();
+ var atlas = QuadAtlasRecovery.Build(mesh, field);
+
+ var singularity = Assert.Single(atlas.Singularities, s => s.SourceVertices.Contains(0));
+ Assert.Equal(.25, singularity.QuarterIndex, 12);
+ Assert.Equal(3, singularity.ImpliedQuadValence);
+ Assert.Equal(2, atlas.Charts.Count);
+ Assert.All(atlas.Charts, chart => Assert.Equal(4, chart.OrderedSides.Count));
+ }
+
private static TriangleSurfaceMesh Square() => new([new(0, 0, 0), new(1, 0, 0), new(1, 1, 0), new(0, 1, 0)], [new(0, 1, 2), new(0, 2, 3)], null, "square", "fixture", new Dictionary<string, string>());
private static TriangleSurfaceMesh Grid(int n)
{
var p = new List<Point3D>(); for (var j = 0; j < n; j++) for (var i = 0; i < n; i++) p.Add(new(i / (double)(n - 1), j / (double)(n - 1), .02 * i * j)); var t = new List<Triangle>(); for (var j = 0; j < n - 1; j++) for (var i = 0; i < n - 1; i++) { var a = j * n + i; t.Add(new(a, a + 1, a + n + 1)); t.Add(new(a, a + n + 1, a + n)); } return new(p, t, null, "grid", "fixture", new Dictionary<string, string>());
}
+
+ private static TriangleSurfaceMesh Ring()
+ {
+ var p = new Point3D[] { new(0,0,0),new(3,0,0),new(3,3,0),new(0,3,0),new(1,1,0),new(2,1,0),new(2,2,0),new(1,2,0) };
+ var t = new Triangle[] { new(0,1,5),new(0,5,4),new(1,2,6),new(1,6,5),new(2,3,7),new(2,7,6),new(3,0,4),new(3,4,7) };
+ return new(p,t,null,"ring","fixture",new Dictionary<string,string>());
+ }
+ private static TriangleSurfaceMesh Fan() => new(
+ [new(0,0,0),new(1,0,0),new(0,1,0),new(-1,0,0),new(0,-1,0)],
+ [new(0,1,2),new(0,2,3),new(0,3,4),new(0,4,1)],null,"quarter-turn-fan","fixture",new Dictionary<string,string>());
}
diff --git a/Aetheris.Reconstruction/QuadAtlasRecovery.cs b/Aetheris.Reconstruction/QuadAtlasRecovery.cs
new file mode 100644
index 00000000..789a8d3e
--- /dev/null
+++ b/Aetheris.Reconstruction/QuadAtlasRecovery.cs
@@ -0,0 +1,346 @@
+using System.Security.Cryptography;
+using System.Text;
+using Aetheris.Kernel.Core.Judgment;
+using Aetheris.Kernel.Core.Brep;
+using Aetheris.Kernel.Core.Brep.Tessellation;
+using Aetheris.Kernel.Core.Geometry;
+using Aetheris.Kernel.Core.Geometry.Surfaces;
+using Aetheris.Kernel.Core.Math;
+using Aetheris.Kernel.Core.Topology;
+using Aetheris.Surfacing;
+
+namespace Aetheris.Reconstruction;
+
+public enum QuadAtlasSide { South, East, North, West }
+public enum LayoutTraceTermination { Junction, SourceBoundary, UnmatchedTransition, Invalid }
+
+public sealed record CrossFieldSingularity(
+ string StableId, Point3D Location, IReadOnlyList<int> SourceVertices, double QuarterIndex,
+ int ImpliedQuadValence, bool IsBoundary, double Confidence, string Evidence);
+
+public sealed record QuadAtlasSeamUse(string SeamId, QuadAtlasSide Side, bool Reversed);
+
+public sealed record QuadAtlasSeam(
+ string StableId, int StartVertex, int EndVertex, Point3D Start, Point3D End,
+ IReadOnlyList<string> ChartUses, bool IsSourceBoundary, double FieldDeviationDegrees,
+ LayoutTraceTermination Termination, string Authority);
+
+public sealed record QuadAtlasChart(
+ string StableId, IReadOnlyList<int> SourceTriangles, IReadOnlyList<int> CornerVertices,
+ IReadOnlyList<QuadAtlasSeamUse> OrderedSides, double Area, double AspectRatio,
+ double CrossFieldAlignmentDegrees, double AngleDistortionDegrees, double AreaDistortion,
+ int Foldovers, string Parameterization, PanelIr StrictPanel);
+
+public sealed record QuadAtlasJudgmentCandidate(
+ string Name, bool Admissible, double Utility, string Reason,
+ double FieldAlignment, double ShapeQuality, double NormalCompatibility);
+
+public sealed record QuadAtlasJudgmentTrace(
+ string DecisionId, int CandidateCount, string Winner,
+ IReadOnlyList<QuadAtlasJudgmentCandidate> TopCandidates,
+ int HardRejectCount, IReadOnlyDictionary<string, int> HardRejectReasons);
+
+public sealed record QuadAtlasTopologyAudit(
+ int ChartCount, IReadOnlyDictionary<string, int> SideCountHistogram,
+ IReadOnlyDictionary<string, int> DominantCauses, IReadOnlyList<string> WorstCharts);
+
+public sealed record QuadAtlas(
+ IReadOnlyList<QuadAtlasChart> Charts, IReadOnlyList<QuadAtlasSeam> Seams,
+ IReadOnlyList<RecoveredJunction> Junctions, IReadOnlyList<CrossFieldSingularity> Singularities,
+ IReadOnlyList<SourceBoundaryLoopCorrespondence> OpenBoundaryLoops,
+ IReadOnlyList<int> UnresolvedTriangles, IReadOnlyList<QuadAtlasJudgmentTrace> JudgmentTraces,
+ int UnintendedBoundaryLoops, string DeterministicHash)
+{
+ public bool IsGloballyValid => Charts.All(c => c.OrderedSides.Count == 4 && c.CornerVertices.Count == 4 && c.Foldovers == 0)
+ && Seams.All(s => s.ChartUses.Count == (s.IsSourceBoundary ? 1 : 2)) && UnintendedBoundaryLoops == 0;
+}
+
+/// <summary>Canonical topology lowering from strict quad Panels, retaining typed triangle transitions only where matching is unresolved.</summary>
+public static class QuadAtlasSurfaceMeshLowering
+{
+ public static CanonicalReconstructionMesh Lower(TriangleSurfaceMesh source, QuadAtlas atlas)
+ {
+ var vertices = source.Vertices.Select((p, i) => new SurfaceMeshVertex(i + 1, p)).ToArray();
+ var patches = new List<SurfacePatch>(); var faceIds = new Dictionary<string, FaceId>(StringComparer.Ordinal); var nextFace = 1;
+ foreach (var chart in atlas.Charts)
+ {
+ var points = chart.CornerVertices.Select(v => source.Vertices[v]).ToArray(); var normal = (points[1] - points[0]).Cross(points[3] - points[0]); if (!normal.TryNormalize(out normal)) normal = new(0, 0, 1);
+ var x = points[1] - points[0]; if (!x.TryNormalize(out x)) x = new(1, 0, 0);
+ var id = new FaceId(nextFace++); faceIds[chart.StableId] = id;
+ patches.Add(new(id, new(SurfaceMeshSupportKind.Plane, new(points[0], Direction3D.Create(normal), Direction3D.Create(x))), [],
+ [new QuadCell(chart.CornerVertices.Select(v => v + 1).ToArray())], true, chart.StrictPanel.StableId,
+ ChartId: chart.StableId, PlanarPlannerPath: "QuadAtlas strict Panel boundary topology; SurfaceMeshIR plane support is a cell-carrier approximation for non-planar BoundaryPatch"));
+ }
+ foreach (var face in atlas.UnresolvedTriangles)
+ {
+ var t = source.Triangles[face]; var p = source.Vertices[t.A]; var n = (source.Vertices[t.B] - p).Cross(source.Vertices[t.C] - p); if (!n.TryNormalize(out n)) n = new(0, 0, 1); var x = source.Vertices[t.B] - p; if (!x.TryNormalize(out x)) x = new(1, 0, 0);
+ patches.Add(new(new(nextFace++), new(SurfaceMeshSupportKind.Plane, new(p, Direction3D.Create(n), Direction3D.Create(x))), [],
+ [new TriangleCell([t.A + 1, t.B + 1, t.C + 1]) { Provenance = SurfaceMeshCellProvenance.ResidualTransition, ExceptionalReason = "unmatched dual-graph transition; not represented as a strict Panel" }], true,
+ "quad-atlas-transition", ChartId: $"transition-{face:D6}", PlanarPlannerPath: "explicit unresolved transition"));
+ }
+ var shared = atlas.Seams.Where(s => s.IsSourceBoundary || s.ChartUses.Count == 2).Select((s, i) =>
+ {
+ var uses = s.ChartUses.Select((chart, side) => new FaceBoundaryUse(faceIds[chart], new(faceIds[chart].Value), new(i * 2 + side + 1), false)).ToArray();
+ return new SharedEdgeSamplePlan(new(i + 1), CurveGeometryKind.Line3, new(0, 1), [vertices[s.StartVertex], vertices[s.EndVertex]], uses, false, 0);
+ }).ToArray();
+ var topology = Topology(patches.SelectMany(p => p.Cells), vertices); var payload = atlas.DeterministicHash + ":" + string.Join('|', patches.SelectMany(p => p.Cells).Select(c => string.Join(',', c.VertexIds)));
+ var hash = Convert.ToHexString(SHA256.HashData(Encoding.UTF8.GetBytes(payload))).ToLowerInvariant();
+ var metrics = new SurfaceMeshMetrics(patches.Count, shared.Length, patches.Count, atlas.Charts.Count, atlas.UnresolvedTriangles.Count,
+ atlas.UnresolvedTriangles.Count, 0, 0, 0, topology.Min, topology.Max, hash, 0, topology.NonManifold, atlas.UnresolvedTriangles.Count,
+ atlas.Charts.Select(c => c.AspectRatio).DefaultIfEmpty(0).Max(), atlas.Charts.Select(c => c.AngleDistortionDegrees).DefaultIfEmpty(0).Max());
+ var document = new SurfaceMeshDocument(vertices, patches, shared, metrics); var valid = SurfaceMeshIrValidator.TryValidate(document, out var failure);
+ return new(document, 0, atlas.OpenBoundaryLoops.Count, topology.Boundary, topology.NonManifold, atlas.Charts.Count, atlas.UnresolvedTriangles.Count,
+ valid ? "Pass" : "Fail: " + failure, hash);
+ }
+
+ private static (int Boundary, int NonManifold, double Min, double Max) Topology(IEnumerable<SurfaceMeshCell> cells, IReadOnlyList<SurfaceMeshVertex> vertices)
+ {
+ var points = vertices.ToDictionary(v => v.Id, v => v.Position); var edges = new Dictionary<(int, int), (int Count, double Length)>();
+ foreach (var cell in cells) for (var i = 0; i < cell.VertexIds.Count; i++) { var a = cell.VertexIds[i]; var b = cell.VertexIds[(i + 1) % cell.VertexIds.Count]; var key = a < b ? (a, b) : (b, a); edges[key] = (edges.GetValueOrDefault(key).Count + 1, (points[a] - points[b]).Length); }
+ return (edges.Count(e => e.Value.Count == 1), edges.Count(e => e.Value.Count > 2), edges.Values.Min(e => e.Length), edges.Values.Max(e => e.Length));
+ }
+}
+
+/// <summary>
+/// Recovers an explicit four-sided atlas by selecting a deterministic, field-scored matching
+/// in the triangle dual graph. A matched pair is a disk with four source-supported boundary
+/// edges. Faces which cannot participate remain explicit transition exceptions; they are never
+/// relabeled as four-sided Panels.
+/// </summary>
+public static class QuadAtlasRecovery
+{
+ private sealed record PairCandidate(int FaceA, int FaceB, int[] Boundary, double Field, double Shape, double Normal)
+ {
+ public string Name => $"pair-{FaceA:D6}-{FaceB:D6}";
+ public double Utility => .50 * Field + .35 * Shape + .15 * Normal;
+ }
+
+ public static QuadAtlasTopologyAudit Audit(ChartNetwork network)
+ {
+ var sides = network.Charts.ToDictionary(c => c.StableId, _ => 0, StringComparer.Ordinal);
+ foreach (var seam in network.Seams)
+ {
+ sides[seam.ChartA]++;
+ if (seam.ChartB is not null) sides[seam.ChartB]++;
+ }
+ string Bucket(int n) => n switch { 3 => "3-sided", 4 => "4-sided", 5 => "5-sided", _ when n >= 6 => "6+-sided", _ => "0-2-sided" };
+ var histogram = sides.Values.GroupBy(Bucket).ToDictionary(g => g.Key, g => g.Count(), StringComparer.Ordinal);
+ foreach (var name in new[] { "0-2-sided", "3-sided", "4-sided", "5-sided", "6+-sided" }) histogram.TryAdd(name, 0);
+ var causes = new Dictionary<string, int>(StringComparer.Ordinal)
+ {
+ ["segmentation boundary placement"] = sides.Count(p => p.Value != 4),
+ ["chart merge history"] = sides.Count(p => p.Value >= 6),
+ ["source open boundary"] = network.Seams.Where(s => s.Classification == RecoveredSeamClassification.SourceOpenBoundary).Select(s => s.ChartA).Distinct().Count()
+ };
+ return new(network.Charts.Count, histogram, causes,
+ sides.OrderByDescending(p => Math.Abs(p.Value - 4)).ThenBy(p => p.Key, StringComparer.Ordinal).Take(20).Select(p => $"{p.Key}:{p.Value}").ToArray());
+ }
+
+ public static QuadAtlas Build(TriangleSurfaceMesh mesh, IReadOnlyList<DifferentialSample> field)
+ {
+ ArgumentNullException.ThrowIfNull(mesh); ArgumentNullException.ThrowIfNull(field);
+ if (field.Count != mesh.Triangles.Count) throw new ArgumentException("Cross-field sample count must equal triangle count.", nameof(field));
+ var edgeFaces = EdgeFaces(mesh);
+ var candidates = BuildCandidates(mesh, field, edgeFaces);
+ var byFace = candidates.SelectMany(c => new[] { (c.FaceA, c), (c.FaceB, c) }).GroupBy(x => x.Item1)
+ .ToDictionary(g => g.Key, g => g.Select(x => x.c).OrderByDescending(c => c.Utility).ThenBy(c => c.Name, StringComparer.Ordinal).ToArray());
+ var matched = new bool[mesh.Triangles.Count]; var selected = new List<PairCandidate>(); var traces = new List<QuadAtlasJudgmentTrace>();
+ foreach (var face in Enumerable.Range(0, mesh.Triangles.Count).OrderBy(f => byFace.GetValueOrDefault(f)?.Length ?? int.MaxValue).ThenBy(f => f))
+ {
+ if (matched[face] || !byFace.TryGetValue(face, out var options)) continue;
+ var available = options.Where(c => !matched[c.FaceA] && !matched[c.FaceB]).ToArray();
+ if (available.Length == 0) continue;
+ var judgmentCandidates = available.Select((c, i) => new JudgmentCandidate<PairCandidate>(c.Name, _ => true, _ => c.Utility, null, i)).ToArray();
+ var result = new JudgmentEngine<PairCandidate>().Evaluate(available[0], judgmentCandidates);
+ var winner = available.Single(c => c.Name == result.Selection!.Value.Candidate.Name);
+ matched[winner.FaceA] = matched[winner.FaceB] = true; selected.Add(winner);
+ if (available.Length > 1)
+ traces.Add(new($"route-face-{face:D6}", available.Length, winner.Name,
+ available.OrderByDescending(c => c.Utility).ThenBy(c => c.Name, StringComparer.Ordinal).Take(3)
+ .Select(c => new QuadAtlasJudgmentCandidate(c.Name, true, c.Utility, "finite disk; four distinct corners; non-folded center", c.Field, c.Shape, c.Normal)).ToArray(), 0,
+ new Dictionary<string, int>()));
+ }
+
+ ImproveMatching(selected, matched, byFace);
+ selected = selected.OrderBy(c => Math.Min(c.FaceA, c.FaceB)).ToList();
+ var labels = Enumerable.Repeat<string?>(null, mesh.Triangles.Count).ToArray();
+ for (var i = 0; i < selected.Count; i++) { labels[selected[i].FaceA] = labels[selected[i].FaceB] = $"quad-{i:D6}"; }
+ var acceptedLabels = labels.Select((label, face) => label ?? $"transition-{face:D6}").ToArray();
+ var recovered = RecoveredSeamNetworkBuilder.Build(mesh, acceptedLabels);
+ var seams = new List<QuadAtlasSeam>(); var seamByEdge = new Dictionary<(int, int), QuadAtlasSeam>();
+ foreach (var pair in edgeFaces.OrderBy(p => p.Key.Item1).ThenBy(p => p.Key.Item2))
+ {
+ var uses = pair.Value.Select(f => labels[f]).Where(id => id is not null).Distinct().Cast<string>().Order(StringComparer.Ordinal).ToArray();
+ if (uses.Length == 0) continue;
+ var isSource = pair.Value.Count == 1;
+ if (!isSource && uses.Length == 1 && pair.Value.All(f => labels[f] == uses[0])) continue; // matched-pair diagonal
+ if (uses.Length > 2) continue;
+ var a = pair.Key.Item1; var b = pair.Key.Item2; var pa = mesh.Vertices[a]; var pb = mesh.Vertices[b];
+ var deviation = uses.Select(id => selected[int.Parse(id.AsSpan(5))]).SelectMany(c => new[] { c.FaceA, c.FaceB })
+ .Distinct().Select(f => FieldDeviation(pb - pa, field[f])).DefaultIfEmpty(0).Average();
+ var id = "atlas-seam-" + Hash($"{a}:{b}:{string.Join(',', uses)}")[..16];
+ var seam = new QuadAtlasSeam(id, a, b, pa, pb, uses, isSource, deviation,
+ isSource ? LayoutTraceTermination.SourceBoundary : uses.Length == 2 ? LayoutTraceTermination.Junction : LayoutTraceTermination.UnmatchedTransition,
+ "single source edge evaluated once; adjacent Panel edges carry the same SourceCurveStableId");
+ seams.Add(seam); seamByEdge[pair.Key] = seam;
+ }
+
+ var charts = new List<QuadAtlasChart>();
+ foreach (var pair in selected)
+ {
+ var chartId = labels[pair.FaceA]!; var boundary = pair.Boundary;
+ var chartSeams = Enumerable.Range(0, 4).Select(i => seamByEdge[Key(boundary[i], boundary[(i + 1) % 4])]).ToArray();
+ var panelResult = MaterializePanel(chartId, boundary.Select(v => mesh.Vertices[v]).ToArray(), chartSeams);
+ if (!panelResult.IsSuccess) throw new InvalidOperationException($"Strict quad Panel '{chartId}' failed: {string.Join("; ", panelResult.Diagnostics.Select(d => d.Message))}");
+ var lengths = Enumerable.Range(0, 4).Select(i => (mesh.Vertices[boundary[(i + 1) % 4]] - mesh.Vertices[boundary[i]]).Length).ToArray();
+ var area = TriangleArea(mesh, pair.FaceA) + TriangleArea(mesh, pair.FaceB);
+ var angle = CornerAngleDistortion(boundary.Select(v => mesh.Vertices[v]).ToArray());
+ charts.Add(new(chartId, [pair.FaceA, pair.FaceB], boundary,
+ chartSeams.Select((s, i) => new QuadAtlasSeamUse(s.StableId, (QuadAtlasSide)i, s.StartVertex != boundary[i])).ToArray(),
+ area, lengths.Max() / Math.Max(1e-15, lengths.Min()), 90 * (1 - pair.Field), angle, 1, 0,
+ "four-corner transfinite (Coons/bilinear for line authority) map to [0,1] x [0,1]", panelResult.Panel!));
+ }
+ var singularities = DetectSingularities(mesh, field, edgeFaces);
+ var junctionVertices = seams.SelectMany(s => new[] { s.StartVertex, s.EndVertex }).ToHashSet();
+ var junctions = recovered.Junctions.Where(j => junctionVertices.Contains(j.SourceVertexIndex)).ToArray();
+ var unresolved = Enumerable.Range(0, matched.Length).Where(i => !matched[i]).ToArray();
+ var payload = string.Join('|', charts.Select(c => $"{c.StableId}:{string.Join(',', c.CornerVertices)}")) + ";" + string.Join('|', seams.Select(s => $"{s.StableId}:{s.StartVertex}-{s.EndVertex}"));
+ return new(charts, seams.OrderBy(s => s.StableId, StringComparer.Ordinal).ToArray(), junctions, singularities,
+ recovered.SourceBoundaryLoops, unresolved, traces.Take(500).ToArray(),
+ seams.Count(s => !s.IsSourceBoundary && s.ChartUses.Count == 1), Hash(payload));
+ }
+
+ private static PanelResult MaterializePanel(string id, Point3D[] p, QuadAtlasSeam[] seams)
+ {
+ // BoundaryPatch expects South/North west-to-east and West/East south-to-north.
+ var south = new RuledBoundary.Line(seams[0].StableId, p[0], p[1]);
+ var east = new RuledBoundary.Line(seams[1].StableId, p[1], p[2]);
+ var north = new RuledBoundary.Line(seams[2].StableId, p[3], p[2]);
+ var west = new RuledBoundary.Line(seams[3].StableId, p[0], p[3]);
+ var provenance = seams.Select(s => new BoundaryProvenance(s.StableId, "triangle-surface", "quad-atlas authoritative seam")).ToArray();
+ return PanelFactory.FromBoundaryPatch(new(id, south, north, west, east, provenance));
+ }
+
+ private static List<PairCandidate> BuildCandidates(TriangleSurfaceMesh mesh, IReadOnlyList<DifferentialSample> field, Dictionary<(int, int), List<int>> edges)
+ {
+ var result = new List<PairCandidate>();
+ foreach (var item in edges.Where(e => e.Value.Count == 2))
+ {
+ var a = item.Value[0]; var b = item.Value[1]; if (!TryBoundary(mesh.Triangles[a], mesh.Triangles[b], out var boundary)) continue;
+ var points = boundary.Select(v => mesh.Vertices[v]).ToArray(); if (!NonFolded(points)) continue;
+ var fieldScore = Enumerable.Range(0, 4).Select(i => 1 - FieldDeviation(mesh.Vertices[boundary[(i + 1) % 4]] - mesh.Vertices[boundary[i]], field[a]) / 45d).Average();
+ var lengths = Enumerable.Range(0, 4).Select(i => (points[(i + 1) % 4] - points[i]).Length).ToArray();
+ var shape = Math.Clamp(lengths.Min() / Math.Max(1e-15, lengths.Max()), 0, 1);
+ var normal = Math.Clamp((field[a].Normal.Dot(field[b].Normal) + 1) / 2, 0, 1);
+ result.Add(new(Math.Min(a, b), Math.Max(a, b), boundary, fieldScore, shape, normal));
+ }
+ return result;
+ }
+
+ // Deterministic bounded alternating-path search removes avoidable greedy transition faces.
+ // It intentionally stops short of pretending to be a blossom-capable maximum matcher.
+ private static void ImproveMatching(List<PairCandidate> selected, bool[] matched, Dictionary<int, PairCandidate[]> byFace)
+ {
+ var mate = new int[matched.Length]; Array.Fill(mate, -1);
+ foreach (var p in selected) { mate[p.FaceA] = p.FaceB; mate[p.FaceB] = p.FaceA; }
+ var changed = true;
+ while (changed)
+ {
+ changed = false;
+ foreach (var start in Enumerable.Range(0, mate.Length).Where(i => mate[i] < 0))
+ {
+ var visited = new HashSet<int> { start }; var additions = new List<PairCandidate>(); var removals = new List<(int, int)>();
+ if (!Search(start, 0)) continue;
+ foreach (var remove in removals) selected.RemoveAll(p => Key(p.FaceA, p.FaceB) == remove);
+ selected.AddRange(additions); Array.Fill(mate, -1); foreach (var p in selected) { mate[p.FaceA] = p.FaceB; mate[p.FaceB] = p.FaceA; }
+ Array.Fill(matched, false); foreach (var p in selected) matched[p.FaceA] = matched[p.FaceB] = true;
+ changed = true; break;
+
+ bool Search(int current, int depth)
+ {
+ foreach (var candidate in byFace.GetValueOrDefault(current) ?? [])
+ {
+ var next = candidate.FaceA == current ? candidate.FaceB : candidate.FaceA; if (!visited.Add(next)) continue;
+ additions.Add(candidate);
+ if (mate[next] < 0) return true;
+ var partner = mate[next];
+ if (depth < 15 && visited.Add(partner))
+ {
+ removals.Add(Key(next, partner));
+ if (Search(partner, depth + 1)) return true;
+ removals.RemoveAt(removals.Count - 1); visited.Remove(partner);
+ }
+ additions.RemoveAt(additions.Count - 1); visited.Remove(next);
+ }
+ return false;
+ }
+ }
+ }
+ }
+
+ private static IReadOnlyList<CrossFieldSingularity> DetectSingularities(TriangleSurfaceMesh mesh, IReadOnlyList<DifferentialSample> field, Dictionary<(int, int), List<int>> edges)
+ {
+ var boundary = edges.Where(e => e.Value.Count == 1).SelectMany(e => new[] { e.Key.Item1, e.Key.Item2 }).ToHashSet();
+ var incident = Enumerable.Range(0, mesh.Vertices.Count).Select(_ => new List<int>()).ToArray();
+ for (var f = 0; f < mesh.Triangles.Count; f++) foreach (var v in Vertices(mesh.Triangles[f])) incident[v].Add(f);
+ var candidates = new Dictionary<int, (double Index, double Confidence)>();
+ for (var v = 0; v < incident.Length; v++)
+ {
+ var faces = incident[v].Where(f => field[f].DirectionKnown).ToArray(); if (faces.Length < 3) continue;
+ var normal = faces.Select(f => field[f].Normal).Aggregate(Vector3D.Zero, (a, b) => a + b); if (!normal.TryNormalize(out normal)) continue;
+ var first = FaceCentroid(mesh, faces.Min()) - mesh.Vertices[v]; first -= normal * first.Dot(normal); if (!first.TryNormalize(out first)) continue; var second = normal.Cross(first); second.TryNormalize(out second);
+ double Around(int f) { var d=FaceCentroid(mesh,f)-mesh.Vertices[v];return Math.Atan2(d.Dot(second),d.Dot(first)); }
+ double FieldAngle(int f) { var d=field[f].CrossDirection-normal*field[f].CrossDirection.Dot(normal);if(!d.TryNormalize(out d))return 0;return Math.Atan2(d.Dot(second),d.Dot(first)); }
+ var ordered=faces.OrderBy(Around).ThenBy(f=>f).ToArray();var limit=boundary.Contains(v)?ordered.Length-1:ordered.Length;var winding=0d;
+ for(var i=0;i<limit;i++){var delta=FieldAngle(ordered[(i+1)%ordered.Length])-FieldAngle(ordered[i]);while(delta>Math.PI/4)delta-=Math.PI/2;while(delta<=-Math.PI/4)delta+=Math.PI/2;winding+=delta;}
+ var index=Math.Round((winding/(2*Math.PI))*4)/4d;if(Math.Abs(index)<.125)continue;
+ candidates[v]=(index,Math.Min(1,faces.Length/(double)Math.Max(1,incident[v].Count))*(boundary.Contains(v)?.5:1));
+ }
+ // Consolidate adjacent noisy vertex candidates of compatible sign into one stable entity.
+ var parent=candidates.Keys.ToDictionary(v=>v,v=>v);int Root(int x){while(parent[x]!=x){parent[x]=parent[parent[x]];x=parent[x];}return x;}
+ foreach(var edge in edges.Keys)if(candidates.TryGetValue(edge.Item1,out var a)&&candidates.TryGetValue(edge.Item2,out var b)&&Math.Sign(a.Index)==Math.Sign(b.Index)){var ra=Root(edge.Item1);var rb=Root(edge.Item2);if(ra!=rb)parent[Math.Max(ra,rb)]=Math.Min(ra,rb);}
+ return candidates.Keys.GroupBy(Root).OrderBy(g=>g.Key).Select(g=>
+ {
+ var vertices=g.Order().ToArray();var index=Math.Round(vertices.Average(x=>candidates[x].Index)*4)/4d;var point=new Point3D(vertices.Average(x=>mesh.Vertices[x].X),vertices.Average(x=>mesh.Vertices[x].Y),vertices.Average(x=>mesh.Vertices[x].Z));var isBoundary=vertices.Any(boundary.Contains);
+ return new CrossFieldSingularity("singularity-"+Hash($"{string.Join(',',vertices)}:{index:R}")[..16],point,vertices,index,4-(int)Math.Round(4*index),isBoundary,vertices.Average(x=>candidates[x].Confidence),
+ "discrete quarter-turn winding over ordered incident-face loop; adjacent same-sign candidates consolidated to a representative quarter index rather than summing noisy samples; boundary confidence reduced because the fan is open");
+ }).ToArray();
+ }
+
+ private static bool TryBoundary(Triangle a, Triangle b, out int[] boundary)
+ {
+ var directed = a.DirectedEdges().Concat(b.DirectedEdges()).ToArray();
+ var outer = directed.Where(e => directed.Count(o => Key(e.A, e.B) == Key(o.A, o.B)) == 1).ToArray();
+ if (outer.Length != 4) { boundary = []; return false; }
+ var next = outer.ToDictionary(e => e.A, e => e.B); var start = outer.Min(e => e.A); var list = new List<int> { start }; var current = start;
+ for (var i = 0; i < 3; i++) { if (!next.TryGetValue(current, out current) || list.Contains(current)) { boundary = []; return false; } list.Add(current); }
+ if (!next.TryGetValue(current, out var close) || close != start) { boundary = []; return false; }
+ boundary = list.ToArray(); return true;
+ }
+
+ private static bool NonFolded(Point3D[] p)
+ {
+ var n = (p[1] - p[0]).Cross(p[2] - p[0]) + (p[2] - p[0]).Cross(p[3] - p[0]);
+ return n.Length > 1e-15 && Enumerable.Range(0, 4).All(i => (p[(i + 1) % 4] - p[i]).Cross(p[(i + 2) % 4] - p[(i + 1) % 4]).Dot(n) >= -1e-12);
+ }
+ private static double CornerAngleDistortion(Point3D[] p) => Enumerable.Range(0, 4).Select(i =>
+ {
+ var a = p[(i + 3) % 4] - p[i]; var b = p[(i + 1) % 4] - p[i];
+ return a.TryNormalize(out a) && b.TryNormalize(out b) ? Math.Abs(90 - Math.Acos(Math.Clamp(a.Dot(b), -1, 1)) * 180 / Math.PI) : 90;
+ }).Max();
+ private static double FieldDeviation(Vector3D edge, DifferentialSample sample)
+ {
+ edge -= sample.Normal * edge.Dot(sample.Normal); if (!edge.TryNormalize(out edge) || !sample.DirectionKnown) return 45;
+ var d = Math.Abs(edge.Dot(sample.CrossDirection)); var q = Math.Abs(edge.Dot(sample.Normal.Cross(sample.CrossDirection)));
+ return Math.Acos(Math.Clamp(Math.Max(d, q), -1, 1)) * 180 / Math.PI;
+ }
+ private static double TriangleArea(TriangleSurfaceMesh mesh, int f) { var t = mesh.Triangles[f]; return .5 * (mesh.Vertices[t.B] - mesh.Vertices[t.A]).Cross(mesh.Vertices[t.C] - mesh.Vertices[t.A]).Length; }
+ private static Point3D FaceCentroid(TriangleSurfaceMesh mesh,int f){var t=mesh.Triangles[f];var a=mesh.Vertices[t.A];var b=mesh.Vertices[t.B];var c=mesh.Vertices[t.C];return new((a.X+b.X+c.X)/3,(a.Y+b.Y+c.Y)/3,(a.Z+b.Z+c.Z)/3);}
+ private static Dictionary<(int, int), List<int>> EdgeFaces(TriangleSurfaceMesh mesh)
+ {
+ var result = new Dictionary<(int, int), List<int>>(); for (var f = 0; f < mesh.Triangles.Count; f++) foreach (var e in mesh.Triangles[f].DirectedEdges()) { var key = Key(e.A, e.B); if (!result.TryGetValue(key, out var faces)) result[key] = faces = []; faces.Add(f); } return result;
+ }
+ private static int[] Vertices(Triangle t) => [t.A, t.B, t.C];
+ private static (int, int) Key(int a, int b) => a < b ? (a, b) : (b, a);
+ private static string Hash(string value) => Convert.ToHexString(SHA256.HashData(Encoding.UTF8.GetBytes(value))).ToLowerInvariant();
+}
diff --git a/Aetheris.Surfacing/SectionAndBoundarySurfaces.cs b/Aetheris.Surfacing/SectionAndBoundarySurfaces.cs
index cc5f1bac..8cbd18bf 100644
--- a/Aetheris.Surfacing/SectionAndBoundarySurfaces.cs
+++ b/Aetheris.Surfacing/SectionAndBoundarySurfaces.cs
@@ -72,6 +72,9 @@ public static class BoundaryPatchLowering
public static ConstructedSurfaceResult Lower(BoundaryPatchIr ir,int controlCount=13)
{
ArgumentNullException.ThrowIfNull(ir);
+ // Four straight boundaries produce a bilinear Coons patch exactly. Avoid expanding
+ // reconstruction atlases into unnecessary 13x13 control nets per strict Panel.
+ if(ir.South is RuledBoundary.Line&&ir.North is RuledBoundary.Line&&ir.West is RuledBoundary.Line&&ir.East is RuledBoundary.Line)controlCount=2;
if(ir.Continuity==BoundaryContinuity.TangentG1)return Failure("surfacing-tangent-constraint-unsupported","BoundaryPatch G1 requires adjacent support tangent evidence; M1 does not infer it from curves alone.");
if(!double.IsFinite(ir.CornerTolerance)||ir.CornerTolerance<=0)return Failure("surfacing-corner-tolerance-invalid","Corner tolerance must be finite and positive.");
if(!Try(ir.South,out var south,out var d)||!Try(ir.North,out var north,out d)||!Try(ir.West,out var west,out d)||!Try(ir.East,out var east,out d))return Failure("surfacing-boundary-invalid",d!);
diff --git a/Aetheris.slnx b/Aetheris.slnx
index 8ae4e7b5..abc6e503 100644
--- a/Aetheris.slnx
+++ b/Aetheris.slnx
@@ -35,6 +35,7 @@
<Project Path="tools/Aetheris.Geometry.M5Evidence/Aetheris.Geometry.M5Evidence.csproj" />
<Project Path="tools/Aetheris.BunnyM0/Aetheris.BunnyM0.csproj" />
<Project Path="tools/Aetheris.BunnyM1/Aetheris.BunnyM1.csproj" />
+ <Project Path="tools/Aetheris.BunnyM2/Aetheris.BunnyM2.csproj" />
<Project Path="tools/Aetheris.Continuum.AttentionE0/Aetheris.Continuum.AttentionE0.csproj" />
<Project Path="tools/Aetheris.Continuum.AttentionE1/Aetheris.Continuum.AttentionE1.csproj" />
<Project Path="Aetheris.Forge/Aetheris.Forge.csproj" />
diff --git a/docs/geometry/artifacts/bunny-m2/README.md b/docs/geometry/artifacts/bunny-m2/README.md
new file mode 100644
index 00000000..b0d567da
--- /dev/null
+++ b/docs/geometry/artifacts/bunny-m2/README.md
@@ -0,0 +1,11 @@
+# AETHERIS-BUNNY-M2 evidence
+
+```text
+TriangleSurfaceMesh → transported cross field → singularity/junction evidence
+ → deterministic field-scored quad layout → strict BoundaryPatch PanelIr
+ → SurfaceMeshIR (with explicitly typed unmatched transitions, if any)
+```
+
+Geometric chart segmentation and quadrilateral surface parameterization are separate problems. M0 solved the former approximately; M2 introduces the latter. Reproduce with `dotnet run --project tools/Aetheris.BunnyM2 -c Release -- .tmp/bunny-m0-source/bunny/reconstruction/bun_zipper.ply docs/geometry/artifacts/bunny-m2`.
+
+Only compact summaries are checked in. No full mesh document, per-face dump, dense field dump, or candidate geometry is persisted.
\ No newline at end of file
diff --git a/docs/geometry/artifacts/bunny-m2/chart-topology-summary.json b/docs/geometry/artifacts/bunny-m2/chart-topology-summary.json
new file mode 100644
index 00000000..463311f3
--- /dev/null
+++ b/docs/geometry/artifacts/bunny-m2/chart-topology-summary.json
@@ -0,0 +1,38 @@
+{
+ "chartCount": 333,
+ "sideCountHistogram": {
+ "5-sided": 72,
+ "4-sided": 78,
+ "6\u002B-sided": 123,
+ "3-sided": 39,
+ "0-2-sided": 21
+ },
+ "dominantCauses": {
+ "segmentation boundary placement": 255,
+ "chart merge history": 123,
+ "source open boundary": 22
+ },
+ "worstCharts": [
+ "chart-0108:13",
+ "chart-0013:12",
+ "chart-0241:12",
+ "chart-0014:11",
+ "chart-0117:11",
+ "chart-0240:11",
+ "chart-0288:11",
+ "chart-0033:10",
+ "chart-0040:10",
+ "chart-0094:10",
+ "chart-0129:10",
+ "chart-0143:10",
+ "chart-0149:10",
+ "chart-0202:10",
+ "chart-0229:10",
+ "chart-0329:10",
+ "chart-0046:9",
+ "chart-0047:9",
+ "chart-0054:9",
+ "chart-0071:9"
+ ],
+ "note": "M0 segmentation boundaries are connected geometric regions; side components are not a rectangular coordinate topology."
+}
\ No newline at end of file
diff --git a/docs/geometry/artifacts/bunny-m2/continuity-summary.json b/docs/geometry/artifacts/bunny-m2/continuity-summary.json
new file mode 100644
index 00000000..cfabff04
--- /dev/null
+++ b/docs/geometry/artifacts/bunny-m2/continuity-summary.json
@@ -0,0 +1,23 @@
+{
+ "seams": 69174,
+ "g0": {
+ "pass": 69174,
+ "fail": 0,
+ "unknown": 0,
+ "maximumResidual": 0
+ },
+ "g1": {
+ "pass": 25961,
+ "fail": 33349,
+ "unknown": 9864,
+ "maximumAngularResidualDegrees": 89.84928354020559,
+ "toleranceDegrees": 5
+ },
+ "g2": {
+ "pass": 0,
+ "fail": 0,
+ "unknown": 69174,
+ "reason": "BoundaryPatch public support exposes first jets only"
+ },
+ "featureSeams": 1820
+}
\ No newline at end of file
diff --git a/docs/geometry/artifacts/bunny-m2/judgment-summary.json b/docs/geometry/artifacts/bunny-m2/judgment-summary.json
new file mode 100644
index 00000000..ed8a90f5
--- /dev/null
+++ b/docs/geometry/artifacts/bunny-m2/judgment-summary.json
@@ -0,0 +1,295 @@
+{
+ "decision": "choose among admissible adjacent-face quad routes",
+ "hardConstraints": [
+ "two distinct source faces",
+ "four distinct corners",
+ "closed disk boundary",
+ "finite positive area",
+ "non-folded projected center"
+ ],
+ "scoreTerms": {
+ "crossFieldAlignment": 0.5,
+ "shapeQuality": 0.35,
+ "normalCompatibility": 0.15
+ },
+ "decisionCount": 500,
+ "sampledDecisions": [
+ {
+ "decisionId": "route-face-000041",
+ "candidateCount": 2,
+ "winner": "pair-000041-028640",
+ "topCandidates": [
+ {
+ "name": "pair-000041-028640",
+ "admissible": true,
+ "utility": 0.26885693075727035,
+ "reason": "finite disk; four distinct corners; non-folded center",
+ "fieldAlignment": 0,
+ "shapeQuality": 0.5538769450207724,
+ "normalCompatibility": 0.5
+ },
+ {
+ "name": "pair-000041-026856",
+ "admissible": true,
+ "utility": 0.17858338345486416,
+ "reason": "finite disk; four distinct corners; non-folded center",
+ "fieldAlignment": 0,
+ "shapeQuality": 0.29595252415675477,
+ "normalCompatibility": 0.5
+ }
+ ],
+ "hardRejectCount": 0,
+ "hardRejectReasons": {}
+ },
+ {
+ "decisionId": "route-face-000102",
+ "candidateCount": 2,
+ "winner": "pair-000102-017131",
+ "topCandidates": [
+ {
+ "name": "pair-000102-017131",
+ "admissible": true,
+ "utility": 0.53267407220695,
+ "reason": "finite disk; four distinct corners; non-folded center",
+ "fieldAlignment": 0.45918316013790494,
+ "shapeQuality": 0.44302725685239525,
+ "normalCompatibility": 0.986819681597728
+ },
+ {
+ "name": "pair-000102-000296",
+ "admissible": true,
+ "utility": 0.438425283115993,
+ "reason": "finite disk; four distinct corners; non-folded center",
+ "fieldAlignment": 0.29935497112342546,
+ "shapeQuality": 0.3996167419364838,
+ "normalCompatibility": 0.992546252510073
+ }
+ ],
+ "hardRejectCount": 0,
+ "hardRejectReasons": {}
+ },
+ {
+ "decisionId": "route-face-000126",
+ "candidateCount": 2,
+ "winner": "pair-000126-064734",
+ "topCandidates": [
+ {
+ "name": "pair-000126-064734",
+ "admissible": true,
+ "utility": 0.5855211192598772,
+ "reason": "finite disk; four distinct corners; non-folded center",
+ "fieldAlignment": 0.45694417974718715,
+ "shapeQuality": 0.6058941271884216,
+ "normalCompatibility": 0.9665738991355739
+ },
+ {
+ "name": "pair-000126-046064",
+ "admissible": true,
+ "utility": 0.5012275166518254,
+ "reason": "finite disk; four distinct corners; non-folded center",
+ "fieldAlignment": 0.0794406987589277,
+ "shapeQuality": 0.8928911975807825,
+ "normalCompatibility": 0.9933016541272518
+ }
+ ],
+ "hardRejectCount": 0,
+ "hardRejectReasons": {}
+ },
+ {
+ "decisionId": "route-face-000130",
+ "candidateCount": 2,
+ "winner": "pair-000130-024578",
+ "topCandidates": [
+ {
+ "name": "pair-000130-024578",
+ "admissible": true,
+ "utility": 0.3123562781800361,
+ "reason": "finite disk; four distinct corners; non-folded center",
+ "fieldAlignment": 0,
+ "shapeQuality": 0.6781607948001032,
+ "normalCompatibility": 0.5
+ },
+ {
+ "name": "pair-000130-036021",
+ "admissible": true,
+ "utility": 0.17134189178996578,
+ "reason": "finite disk; four distinct corners; non-folded center",
+ "fieldAlignment": 0,
+ "shapeQuality": 0.2752625479713309,
+ "normalCompatibility": 0.5
+ }
+ ],
+ "hardRejectCount": 0,
+ "hardRejectReasons": {}
+ },
+ {
+ "decisionId": "route-face-000286",
+ "candidateCount": 2,
+ "winner": "pair-000286-006393",
+ "topCandidates": [
+ {
+ "name": "pair-000286-006393",
+ "admissible": true,
+ "utility": 0.6478253108154576,
+ "reason": "finite disk; four distinct corners; non-folded center",
+ "fieldAlignment": 0.5339086894268449,
+ "shapeQuality": 0.6730912932439869,
+ "normalCompatibility": 0.9685934231109313
+ },
+ {
+ "name": "pair-000286-030928",
+ "admissible": true,
+ "utility": 0.46899737923242873,
+ "reason": "finite disk; four distinct corners; non-folded center",
+ "fieldAlignment": 0.2627200860690497,
+ "shapeQuality": 0.5392505548976805,
+ "normalCompatibility": 0.9926642798914384
+ }
+ ],
+ "hardRejectCount": 0,
+ "hardRejectReasons": {}
+ },
+ {
+ "decisionId": "route-face-000352",
+ "candidateCount": 2,
+ "winner": "pair-000352-042793",
+ "topCandidates": [
+ {
+ "name": "pair-000352-042793",
+ "admissible": true,
+ "utility": 0.5961093973196508,
+ "reason": "finite disk; four distinct corners; non-folded center",
+ "fieldAlignment": 0.5927545308456273,
+ "shapeQuality": 0.4282934495316233,
+ "normalCompatibility": 0.998862830405127
+ },
+ {
+ "name": "pair-000352-039568",
+ "admissible": true,
+ "utility": 0.5092659957213699,
+ "reason": "finite disk; four distinct corners; non-folded center",
+ "fieldAlignment": 0.45243431919496047,
+ "shapeQuality": 0.3805926941501381,
+ "normalCompatibility": 0.9989426211422754
+ }
+ ],
+ "hardRejectCount": 0,
+ "hardRejectReasons": {}
+ },
+ {
+ "decisionId": "route-face-000390",
+ "candidateCount": 2,
+ "winner": "pair-000390-031351",
+ "topCandidates": [
+ {
+ "name": "pair-000390-031351",
+ "admissible": true,
+ "utility": 0.24694762360732792,
+ "reason": "finite disk; four distinct corners; non-folded center",
+ "fieldAlignment": 0,
+ "shapeQuality": 0.49127892459236544,
+ "normalCompatibility": 0.5
+ },
+ {
+ "name": "pair-000390-039660",
+ "admissible": true,
+ "utility": 0.23081240435858985,
+ "reason": "finite disk; four distinct corners; non-folded center",
+ "fieldAlignment": 0,
+ "shapeQuality": 0.4451782981673996,
+ "normalCompatibility": 0.5
+ }
+ ],
+ "hardRejectCount": 0,
+ "hardRejectReasons": {}
+ },
+ {
+ "decisionId": "route-face-000410",
+ "candidateCount": 2,
+ "winner": "pair-000410-028173",
+ "topCandidates": [
+ {
+ "name": "pair-000410-028173",
+ "admissible": true,
+ "utility": 0.6575273713705302,
+ "reason": "finite disk; four distinct corners; non-folded center",
+ "fieldAlignment": 0.6223885859090178,
+ "shapeQuality": 0.5610767175608095,
+ "normalCompatibility": 0.9997081817982536
+ },
+ {
+ "name": "pair-000332-000410",
+ "admissible": true,
+ "utility": 0.5076764312681525,
+ "reason": "finite disk; four distinct corners; non-folded center",
+ "fieldAlignment": 0.2413359486889563,
+ "shapeQuality": 0.6773833506719231,
+ "normalCompatibility": 0.9994952279233422
+ }
+ ],
+ "hardRejectCount": 0,
+ "hardRejectReasons": {}
+ },
+ {
+ "decisionId": "route-face-000565",
+ "candidateCount": 2,
+ "winner": "pair-000565-002544",
+ "topCandidates": [
+ {
+ "name": "pair-000565-002544",
+ "admissible": true,
+ "utility": 0.24452420760440857,
+ "reason": "finite disk; four distinct corners; non-folded center",
+ "fieldAlignment": 0,
+ "shapeQuality": 0.4843548788697388,
+ "normalCompatibility": 0.5
+ },
+ {
+ "name": "pair-000565-032738",
+ "admissible": true,
+ "utility": 0.22937248063689913,
+ "reason": "finite disk; four distinct corners; non-folded center",
+ "fieldAlignment": 0,
+ "shapeQuality": 0.44106423039114045,
+ "normalCompatibility": 0.5
+ }
+ ],
+ "hardRejectCount": 0,
+ "hardRejectReasons": {}
+ },
+ {
+ "decisionId": "route-face-000615",
+ "candidateCount": 2,
+ "winner": "pair-000615-019571",
+ "topCandidates": [
+ {
+ "name": "pair-000615-019571",
+ "admissible": true,
+ "utility": 0.6610514135268191,
+ "reason": "finite disk; four distinct corners; non-folded center",
+ "fieldAlignment": 0.7053334523354684,
+ "shapeQuality": 0.5605606746026094,
+ "normalCompatibility": 0.7479230083211437
+ },
+ {
+ "name": "pair-000615-052603",
+ "admissible": true,
+ "utility": 0.47412595969651605,
+ "reason": "finite disk; four distinct corners; non-folded center",
+ "fieldAlignment": 0.3020375616767949,
+ "shapeQuality": 0.5306108107491002,
+ "normalCompatibility": 0.9159559673062235
+ }
+ ],
+ "hardRejectCount": 0,
+ "hardRejectReasons": {}
+ }
+ ],
+ "notUsedFor": [
+ "boundary loop preservation",
+ "four-side invariant",
+ "disk topology",
+ "foldover rejection",
+ "seam incidence"
+ ]
+}
\ No newline at end of file
diff --git a/docs/geometry/artifacts/bunny-m2/manifest.json b/docs/geometry/artifacts/bunny-m2/manifest.json
new file mode 100644
index 00000000..29d0c13a
--- /dev/null
+++ b/docs/geometry/artifacts/bunny-m2/manifest.json
@@ -0,0 +1,84 @@
+{
+ "milestone": "AETHERIS-BUNNY-M2",
+ "sourceMeshHash": "88d635a8709c1c570ff47c80ef6340fe8a8da58c1f3e2c96975ff428276cbde0",
+ "atlasHash": "b6dcfaf892db983495aa05c44040bc379416b80b06705744785fa4240c465f62",
+ "surfaceMeshHash": "f6c9f5b845197132bfc9284e35b5bd75cefb57a760d2a8613f87cdf41c66d661",
+ "deterministic": true,
+ "excludedObservationalFiles": [
+ "performance.json"
+ ],
+ "files": [
+ {
+ "path": "README.md",
+ "sha256": "3989c966ec144c5bdac924af79f843755b5a899ef0de670fb398af3cbb3e0234",
+ "bytes": 767,
+ "lines": 11
+ },
+ {
+ "path": "chart-topology-summary.json",
+ "sha256": "90b4ed83b89fa021889770f7e9ce4caf2ac42a4c4b27261a5232d23e3cbd7385",
+ "bytes": 899,
+ "lines": 38
+ },
+ {
+ "path": "continuity-summary.json",
+ "sha256": "d7ad9ba105ffd189df5892cbee66ce35361afb6332f473cdf3b3a665c178804d",
+ "bytes": 450,
+ "lines": 23
+ },
+ {
+ "path": "judgment-summary.json",
+ "sha256": "bb1476e1ff8b60a3f333ae18954853c3e057f5bc09a7d44f2d1ad46daec030ef",
+ "bytes": 9815,
+ "lines": 295
+ },
+ {
+ "path": "mesh-summary.json",
+ "sha256": "e1f56caf40eba633e4fb79ec22bc9be1b42c45a2af52ed2bc9bae61a5d05fb11",
+ "bytes": 464,
+ "lines": 15
+ },
+ {
+ "path": "panel-fit-summary.json",
+ "sha256": "b3f65303b989b7132c205a0f72456f182e592345a9731afe459d6e90104f9707",
+ "bytes": 544,
+ "lines": 23
+ },
+ {
+ "path": "parameterization-summary.json",
+ "sha256": "b261cc77970ccc4603a261d519432d2e8d99e91765a11256fcc98edba9787ebb",
+ "bytes": 3245,
+ "lines": 116
+ },
+ {
+ "path": "quad-atlas-summary.json",
+ "sha256": "01da30ff695680b3c8fee1d5b6a921293ad5ce181d36142b1c330954f4fdb981",
+ "bytes": 614,
+ "lines": 33
+ },
+ {
+ "path": "quality-comparison.json",
+ "sha256": "8dbd5b8be0d884038959f30b420891a548dc8aacc29e3eefbae050985de842d1",
+ "bytes": 3268,
+ "lines": 134
+ },
+ {
+ "path": "separatrix-summary.json",
+ "sha256": "4e4c0ac3b269fdb8739f27749baad5dc05bd5d1eb6696053d6682966157086ac",
+ "bytes": 3039,
+ "lines": 118
+ },
+ {
+ "path": "singularity-summary.json",
+ "sha256": "366ab3c55550ffde4a34f415caefa38dbbe1eb2e1262c2e630e60151153b5aa7",
+ "bytes": 12429,
+ "lines": 342
+ },
+ {
+ "path": "validation-report.json",
+ "sha256": "d53c07eaaa789216caadcc2c824891b616bcbdcd834903006dac44457d40df63",
+ "bytes": 5763,
+ "lines": 307
+ }
+ ]
+}
\ No newline at end of file
diff --git a/docs/geometry/artifacts/bunny-m2/mesh-summary.json b/docs/geometry/artifacts/bunny-m2/mesh-summary.json
new file mode 100644
index 00000000..ade25bd7
--- /dev/null
+++ b/docs/geometry/artifacts/bunny-m2/mesh-summary.json
@@ -0,0 +1,15 @@
+{
+ "vertices": 35947,
+ "cells": 34759,
+ "quads": 34692,
+ "triangles": 67,
+ "nGons": 0,
+ "quadPercentage": 99.80724416697834,
+ "internalCrackGroups": 0,
+ "intentionalOpenLoops": 5,
+ "boundaryEdgeCount": 223,
+ "nonManifoldEdgeCount": 0,
+ "validation": "Pass",
+ "deterministicHash": "f6c9f5b845197132bfc9284e35b5bd75cefb57a760d2a8613f87cdf41c66d661",
+ "authority": "strict quad Panels plus explicitly typed unmatched transition triangles"
+}
\ No newline at end of file
diff --git a/docs/geometry/artifacts/bunny-m2/panel-fit-summary.json b/docs/geometry/artifacts/bunny-m2/panel-fit-summary.json
new file mode 100644
index 00000000..40118360
--- /dev/null
+++ b/docs/geometry/artifacts/bunny-m2/panel-fit-summary.json
@@ -0,0 +1,23 @@
+{
+ "strictPanelIrCount": 34692,
+ "rejectedOrTransitionCharts": 67,
+ "representationTypes": {
+ "boundaryPatch": 34692,
+ "nonRational": true,
+ "nurbs": false
+ },
+ "sourceFit": {
+ "rms": 6.273042597053603E-05,
+ "maximum": 0.00038516791063472345
+ },
+ "boundaryResidualMaximum": 0,
+ "sharedSeamAuthority": true,
+ "dogfood": {
+ "jet1": "Available",
+ "jet2": "Unavailable",
+ "curvature": "Unknown",
+ "closestPoint": "Available",
+ "intersection": "Unknown",
+ "contact": "Transverse"
+ }
+}
\ No newline at end of file
diff --git a/docs/geometry/artifacts/bunny-m2/parameterization-summary.json b/docs/geometry/artifacts/bunny-m2/parameterization-summary.json
new file mode 100644
index 00000000..bed3487d
--- /dev/null
+++ b/docs/geometry/artifacts/bunny-m2/parameterization-summary.json
@@ -0,0 +1,116 @@
+{
+ "method": "four-corner transfinite Coons map; straight authoritative seams reduce exactly to bilinear",
+ "foldovers": 0,
+ "angleDistortion": {
+ "mean": 51.69240882178393,
+ "p95": 85.11062477992303,
+ "maximum": 89.99391228927865
+ },
+ "stretch": {
+ "aspectMean": 1.4131285539664047,
+ "aspectP95": 2.0547064617820565,
+ "aspectMaximum": 7.341050611505488
+ },
+ "topWorst": [
+ {
+ "stableId": "quad-006938",
+ "angleDistortionDegrees": 88.19675841120656,
+ "aspectRatio": 7.341050611505488
+ },
+ {
+ "stableId": "quad-014861",
+ "angleDistortionDegrees": 89.93032095637614,
+ "aspectRatio": 3.24836604286431
+ },
+ {
+ "stableId": "quad-013590",
+ "angleDistortionDegrees": 89.9575415110973,
+ "aspectRatio": 2.6096752176158806
+ },
+ {
+ "stableId": "quad-001309",
+ "angleDistortionDegrees": 88.12014456471277,
+ "aspectRatio": 4.017737693261878
+ },
+ {
+ "stableId": "quad-000084",
+ "angleDistortionDegrees": 89.77338495476161,
+ "aspectRatio": 2.2954497356122956
+ },
+ {
+ "stableId": "quad-031229",
+ "angleDistortionDegrees": 89.75774778524564,
+ "aspectRatio": 2.296955467019438
+ },
+ {
+ "stableId": "quad-004240",
+ "angleDistortionDegrees": 89.90641399186183,
+ "aspectRatio": 1.9713369388626798
+ },
+ {
+ "stableId": "quad-011089",
+ "angleDistortionDegrees": 87.25905240828243,
+ "aspectRatio": 4.539083869641567
+ },
+ {
+ "stableId": "quad-018741",
+ "angleDistortionDegrees": 89.98935704232201,
+ "aspectRatio": 1.7751892549386947
+ },
+ {
+ "stableId": "quad-031029",
+ "angleDistortionDegrees": 89.9395847783282,
+ "aspectRatio": 1.7749055610364723
+ },
+ {
+ "stableId": "quad-014835",
+ "angleDistortionDegrees": 89.86981914823244,
+ "aspectRatio": 1.8406171834357101
+ },
+ {
+ "stableId": "quad-031442",
+ "angleDistortionDegrees": 89.95329593712196,
+ "aspectRatio": 1.723915064707218
+ },
+ {
+ "stableId": "quad-012669",
+ "angleDistortionDegrees": 89.71331489386222,
+ "aspectRatio": 1.8813983612584855
+ },
+ {
+ "stableId": "quad-030846",
+ "angleDistortionDegrees": 89.89469455309282,
+ "aspectRatio": 1.684166550445229
+ },
+ {
+ "stableId": "quad-003445",
+ "angleDistortionDegrees": 89.81111363791985,
+ "aspectRatio": 1.7565047935511553
+ },
+ {
+ "stableId": "quad-033157",
+ "angleDistortionDegrees": 89.73513276334867,
+ "aspectRatio": 1.7864451893501863
+ },
+ {
+ "stableId": "quad-022272",
+ "angleDistortionDegrees": 89.77725897718082,
+ "aspectRatio": 1.7165149861369213
+ },
+ {
+ "stableId": "quad-009612",
+ "angleDistortionDegrees": 89.68715505141918,
+ "aspectRatio": 1.7980540460273575
+ },
+ {
+ "stableId": "quad-028853",
+ "angleDistortionDegrees": 89.7469534445988,
+ "aspectRatio": 1.7298410890703513
+ },
+ {
+ "stableId": "quad-012506",
+ "angleDistortionDegrees": 89.74905323881808,
+ "aspectRatio": 1.724372343306407
+ }
+ ]
+}
\ No newline at end of file
diff --git a/docs/geometry/artifacts/bunny-m2/performance.json b/docs/geometry/artifacts/bunny-m2/performance.json
new file mode 100644
index 00000000..b1946611
--- /dev/null
+++ b/docs/geometry/artifacts/bunny-m2/performance.json
@@ -0,0 +1,16 @@
+{
+ "timingsMilliseconds": {
+ "continuity": 196.8356,
+ "crossField": 371.4068,
+ "errorAnalysis": 503.5449,
+ "geometryDogfood": 12.2099,
+ "m1TopologyAudit": 864.3212,
+ "singularityLayoutParameterizationAndPanelFit": 74028.8118,
+ "sourceLoad": 72.735,
+ "sourceValidation": 93.3663,
+ "spatialIndex": 744.5857,
+ "surfaceMeshIrLowering": 252.6092,
+ "total": 77268.1902
+ },
+ "workingSetBytes": 1130037248
+}
\ No newline at end of file
diff --git a/docs/geometry/artifacts/bunny-m2/quad-atlas-summary.json b/docs/geometry/artifacts/bunny-m2/quad-atlas-summary.json
new file mode 100644
index 00000000..743a4797
--- /dev/null
+++ b/docs/geometry/artifacts/bunny-m2/quad-atlas-summary.json
@@ -0,0 +1,33 @@
+{
+ "chartCount": 34692,
+ "fourSidedChartCount": 34692,
+ "exceptionalUnresolvedRegions": 67,
+ "seamCount": 69594,
+ "junctionCount": 34567,
+ "intentionalBoundaryLoops": 5,
+ "unintendedBoundaryInterfaces": 199,
+ "isGloballyValid": false,
+ "deterministicHash": "b6dcfaf892db983495aa05c44040bc379416b80b06705744785fa4240c465f62",
+ "unresolvedSample": [
+ 10647,
+ 28623,
+ 32400,
+ 33144,
+ 33210,
+ 35723,
+ 36723,
+ 36784,
+ 37771,
+ 42476,
+ 43339,
+ 48580,
+ 49024,
+ 49336,
+ 49611,
+ 49933,
+ 50337,
+ 54934,
+ 55196,
+ 57044
+ ]
+}
\ No newline at end of file
diff --git a/docs/geometry/artifacts/bunny-m2/quality-comparison.json b/docs/geometry/artifacts/bunny-m2/quality-comparison.json
new file mode 100644
index 00000000..9953b1d8
--- /dev/null
+++ b/docs/geometry/artifacts/bunny-m2/quality-comparison.json
@@ -0,0 +1,134 @@
+{
+ "m1": {
+ "charts": 333,
+ "vertices": 35947,
+ "cells": 37568,
+ "quads": 31883,
+ "triangles": 5685,
+ "quadPercentage": 84.867,
+ "sourcePanelRms": 0.0003626,
+ "sourcePanelMax": 0.0032994,
+ "remeshSourceRms": 0.000291,
+ "remeshSourceMax": 0.0021862,
+ "normalMeanDegrees": 11.46,
+ "normalRmsDegrees": 18.78,
+ "normalMaxDegrees": 90
+ },
+ "m2": {
+ "charts": 34692,
+ "vertices": 35947,
+ "cells": 34759,
+ "quads": 34692,
+ "triangles": 67,
+ "quadPercentage": 99.80724416697834,
+ "sourcePanelRms": 6.273042597053603E-05,
+ "sourcePanelMax": 0.00038516791063472345,
+ "remeshSourceRms": 3.0452953538203108E-05,
+ "remeshSourceMax": 0.0003832707087048803,
+ "normalMeanDegrees": 4.243321550223036,
+ "normalRmsDegrees": 14.743400085441598,
+ "normalMaxDegrees": 90
+ },
+ "worstRegions": [
+ {
+ "item1": "quad-030425",
+ "item2": 0.00038516791063472345,
+ "item3": 32.808670925846705
+ },
+ {
+ "item1": "quad-030425",
+ "item2": 0.00038516791063471055,
+ "item3": 3.1886482914093643
+ },
+ {
+ "item1": "quad-013859",
+ "item2": 0.00035812947103623275,
+ "item3": 0.7011188590518719
+ },
+ {
+ "item1": "quad-013859",
+ "item2": 0.00035812947103622706,
+ "item3": 0.706373645148178
+ },
+ {
+ "item1": "quad-002355",
+ "item2": 0.0003512757703985954,
+ "item3": 90
+ },
+ {
+ "item1": "quad-002355",
+ "item2": 0.00035127577039859535,
+ "item3": 0.21195671847315806
+ },
+ {
+ "item1": "quad-026328",
+ "item2": 0.00034913137539321546,
+ "item3": 90
+ },
+ {
+ "item1": "quad-026328",
+ "item2": 0.00034913137539320575,
+ "item3": 1.0038182931678894
+ },
+ {
+ "item1": "quad-009859",
+ "item2": 0.00034579371858115964,
+ "item3": 37.664675245832406
+ },
+ {
+ "item1": "quad-009859",
+ "item2": 0.000345793718581159,
+ "item3": 11.23815607494113
+ },
+ {
+ "item1": "quad-022214",
+ "item2": 0.00034389919657859996,
+ "item3": 0.8869134258504494
+ },
+ {
+ "item1": "quad-022214",
+ "item2": 0.00034389919657859406,
+ "item3": 0.9331741672128694
+ },
+ {
+ "item1": "quad-030200",
+ "item2": 0.00033352807458127153,
+ "item3": 4.97272182709105
+ },
+ {
+ "item1": "quad-030200",
+ "item2": 0.00033352807458126676,
+ "item3": 3.5790520955635703
+ },
+ {
+ "item1": "quad-001352",
+ "item2": 0.00033310989406495326,
+ "item3": 1.1367628144021287
+ },
+ {
+ "item1": "quad-001352",
+ "item2": 0.00033310989406494935,
+ "item3": 1.03388182352152
+ },
+ {
+ "item1": "quad-013720",
+ "item2": 0.00032858786843696815,
+ "item3": 3.495779526710538
+ },
+ {
+ "item1": "quad-013720",
+ "item2": 0.0003285878684369617,
+ "item3": 3.4516181405713593
+ },
+ {
+ "item1": "quad-012933",
+ "item2": 0.00032616244740737993,
+ "item3": 0.579370308403989
+ },
+ {
+ "item1": "quad-012933",
+ "item2": 0.0003261624474073608,
+ "item3": 0.6297333217114127
+ }
+ ]
+}
\ No newline at end of file
diff --git a/docs/geometry/artifacts/bunny-m2/separatrix-summary.json b/docs/geometry/artifacts/bunny-m2/separatrix-summary.json
new file mode 100644
index 00000000..2b55ab8b
--- /dev/null
+++ b/docs/geometry/artifacts/bunny-m2/separatrix-summary.json
@@ -0,0 +1,118 @@
+{
+ "algorithm": "deterministic source-edge layout traces selected by dual-graph routing and projected by source edge authority",
+ "traceCount": 69594,
+ "terminationCategories": {
+ "Junction": 69174,
+ "SourceBoundary": 221,
+ "UnmatchedTransition": 199
+ },
+ "meanFieldDeviationDegrees": 20.4791464428885,
+ "maximumFieldDeviationDegrees": 45,
+ "pathologyDetection": [
+ "four-distinct-corner hard check",
+ "disk boundary cycle hard check",
+ "center foldover hard check"
+ ],
+ "topProblematic": [
+ {
+ "stableId": "atlas-seam-03336f37814be829",
+ "fieldDeviationDegrees": 45,
+ "termination": 0
+ },
+ {
+ "stableId": "atlas-seam-035a670bbbd371d4",
+ "fieldDeviationDegrees": 45,
+ "termination": 0
+ },
+ {
+ "stableId": "atlas-seam-05917abd1ae3c2d4",
+ "fieldDeviationDegrees": 45,
+ "termination": 0
+ },
+ {
+ "stableId": "atlas-seam-06486aee3d85869e",
+ "fieldDeviationDegrees": 45,
+ "termination": 2
+ },
+ {
+ "stableId": "atlas-seam-06cf7b850f5c6a35",
+ "fieldDeviationDegrees": 45,
+ "termination": 0
+ },
+ {
+ "stableId": "atlas-seam-089984db1171ec74",
+ "fieldDeviationDegrees": 45,
+ "termination": 0
+ },
+ {
+ "stableId": "atlas-seam-0cf5f51084779e79",
+ "fieldDeviationDegrees": 45,
+ "termination": 0
+ },
+ {
+ "stableId": "atlas-seam-10768be88d55a472",
+ "fieldDeviationDegrees": 45,
+ "termination": 0
+ },
+ {
+ "stableId": "atlas-seam-12add7fa3de21ec2",
+ "fieldDeviationDegrees": 45,
+ "termination": 0
+ },
+ {
+ "stableId": "atlas-seam-16caedfcf0d170f0",
+ "fieldDeviationDegrees": 45,
+ "termination": 0
+ },
+ {
+ "stableId": "atlas-seam-19372117839cfd4e",
+ "fieldDeviationDegrees": 45,
+ "termination": 0
+ },
+ {
+ "stableId": "atlas-seam-1b95aece7dc1c9ab",
+ "fieldDeviationDegrees": 45,
+ "termination": 0
+ },
+ {
+ "stableId": "atlas-seam-1d037dc8b7ffff3c",
+ "fieldDeviationDegrees": 45,
+ "termination": 0
+ },
+ {
+ "stableId": "atlas-seam-293982ba8f189bb9",
+ "fieldDeviationDegrees": 45,
+ "termination": 0
+ },
+ {
+ "stableId": "atlas-seam-2f5e4d933ad9f4a8",
+ "fieldDeviationDegrees": 45,
+ "termination": 0
+ },
+ {
+ "stableId": "atlas-seam-3100c0bde5e5f1e9",
+ "fieldDeviationDegrees": 45,
+ "termination": 0
+ },
+ {
+ "stableId": "atlas-seam-35f73deace8d36f0",
+ "fieldDeviationDegrees": 45,
+ "termination": 0
+ },
+ {
+ "stableId": "atlas-seam-3979181e890c9c6e",
+ "fieldDeviationDegrees": 45,
+ "termination": 0
+ },
+ {
+ "stableId": "atlas-seam-3c999afa6b28fae3",
+ "fieldDeviationDegrees": 45,
+ "termination": 0
+ },
+ {
+ "stableId": "atlas-seam-417f60a4de13c7b9",
+ "fieldDeviationDegrees": 45,
+ "termination": 2
+ }
+ ]
+}
\ No newline at end of file
diff --git a/docs/geometry/artifacts/bunny-m2/singularity-summary.json b/docs/geometry/artifacts/bunny-m2/singularity-summary.json
new file mode 100644
index 00000000..a0d439e5
--- /dev/null
+++ b/docs/geometry/artifacts/bunny-m2/singularity-summary.json
@@ -0,0 +1,342 @@
+{
+ "method": "discrete quarter-turn winding around ordered incident-face loops after deterministic cross-field transport; adjacent same-sign candidates consolidate under source-edge adjacency",
+ "count": 1603,
+ "interior": 1595,
+ "boundary": 8,
+ "ambiguousUnknownFieldSamples": 1716,
+ "groups": {
+ "interior-valence-5": 803,
+ "interior-valence-3": 785,
+ "interior-valence-2": 4,
+ "interior-valence-6": 3,
+ "boundary-valence-5": 2,
+ "boundary-valence-3": 6
+ },
+ "top": [
+ {
+ "stableId": "singularity-5df0198db5f31977",
+ "location": {
+ "x": 0.0223205,
+ "y": 0.04126525,
+ "z": 0.0406275
+ },
+ "sourceVertices": [
+ 7161,
+ 11553
+ ],
+ "quarterIndex": 0.5,
+ "impliedQuadValence": 2,
+ "isBoundary": false,
+ "confidence": 0.9285714285714286,
+ "evidence": "discrete quarter-turn winding over ordered incident-face loop; adjacent same-sign candidates consolidated to a representative quarter index rather than summing noisy samples; boundary confidence reduced because the fan is open"
+ },
+ {
+ "stableId": "singularity-a9a92c959ae2e2e7",
+ "location": {
+ "x": 0.039816,
+ "y": 0.0393083,
+ "z": 0.00327619
+ },
+ "sourceVertices": [
+ 11459
+ ],
+ "quarterIndex": 0.5,
+ "impliedQuadValence": 2,
+ "isBoundary": false,
+ "confidence": 0.875,
+ "evidence": "discrete quarter-turn winding over ordered incident-face loop; adjacent same-sign candidates consolidated to a representative quarter index rather than summing noisy samples; boundary confidence reduced because the fan is open"
+ },
+ {
+ "stableId": "singularity-7f1d1ac49bce5dd3",
+ "location": {
+ "x": -0.0500704,
+ "y": 0.137041,
+ "z": 0.0213927
+ },
+ "sourceVertices": [
+ 12560
+ ],
+ "quarterIndex": -0.5,
+ "impliedQuadValence": 6,
+ "isBoundary": false,
+ "confidence": 1,
+ "evidence": "discrete quarter-turn winding over ordered incident-face loop; adjacent same-sign candidates consolidated to a representative quarter index rather than summing noisy samples; boundary confidence reduced because the fan is open"
+ },
+ {
+ "stableId": "singularity-aed4ff3facb80d26",
+ "location": {
+ "x": -0.0273861,
+ "y": 0.0720614,
+ "z": 0.0416635
+ },
+ "sourceVertices": [
+ 19944
+ ],
+ "quarterIndex": 0.5,
+ "impliedQuadValence": 2,
+ "isBoundary": false,
+ "confidence": 1,
+ "evidence": "discrete quarter-turn winding over ordered incident-face loop; adjacent same-sign candidates consolidated to a representative quarter index rather than summing noisy samples; boundary confidence reduced because the fan is open"
+ },
+ {
+ "stableId": "singularity-7eb4de1b3af64ffb",
+ "location": {
+ "x": -0.038981,
+ "y": 0.047549549999999996,
+ "z": -0.0154719
+ },
+ "sourceVertices": [
+ 20672,
+ 24632
+ ],
+ "quarterIndex": -0.5,
+ "impliedQuadValence": 6,
+ "isBoundary": false,
+ "confidence": 1,
+ "evidence": "discrete quarter-turn winding over ordered incident-face loop; adjacent same-sign candidates consolidated to a representative quarter index rather than summing noisy samples; boundary confidence reduced because the fan is open"
+ },
+ {
+ "stableId": "singularity-7f11d4e405c1385c",
+ "location": {
+ "x": 0.007729079999999999,
+ "y": 0.03448614999999999,
+ "z": -0.02101095
+ },
+ "sourceVertices": [
+ 26332,
+ 30896
+ ],
+ "quarterIndex": 0.5,
+ "impliedQuadValence": 2,
+ "isBoundary": false,
+ "confidence": 1,
+ "evidence": "discrete quarter-turn winding over ordered incident-face loop; adjacent same-sign candidates consolidated to a representative quarter index rather than summing noisy samples; boundary confidence reduced because the fan is open"
+ },
+ {
+ "stableId": "singularity-99b37f26ebb19011",
+ "location": {
+ "x": 0.027107,
+ "y": 0.0406036,
+ "z": 0.0313674
+ },
+ "sourceVertices": [
+ 33543
+ ],
+ "quarterIndex": -0.5,
+ "impliedQuadValence": 6,
+ "isBoundary": false,
+ "confidence": 1,
+ "evidence": "discrete quarter-turn winding over ordered incident-face loop; adjacent same-sign candidates consolidated to a representative quarter index rather than summing noisy samples; boundary confidence reduced because the fan is open"
+ },
+ {
+ "stableId": "singularity-d6909aeacfc053a9",
+ "location": {
+ "x": 0.0400265,
+ "y": 0.10701,
+ "z": 0.00816505
+ },
+ "sourceVertices": [
+ 20
+ ],
+ "quarterIndex": -0.25,
+ "impliedQuadValence": 5,
+ "isBoundary": false,
+ "confidence": 1,
+ "evidence": "discrete quarter-turn winding over ordered incident-face loop; adjacent same-sign candidates consolidated to a representative quarter index rather than summing noisy samples; boundary confidence reduced because the fan is open"
+ },
+ {
+ "stableId": "singularity-bb2f64df1ef20aab",
+ "location": {
+ "x": 0.0371657,
+ "y": 0.0997172,
+ "z": -0.00981258
+ },
+ "sourceVertices": [
+ 21
+ ],
+ "quarterIndex": -0.25,
+ "impliedQuadValence": 5,
+ "isBoundary": false,
+ "confidence": 0.8,
+ "evidence": "discrete quarter-turn winding over ordered incident-face loop; adjacent same-sign candidates consolidated to a representative quarter index rather than summing noisy samples; boundary confidence reduced because the fan is open"
+ },
+ {
+ "stableId": "singularity-ec2191e0393955ea",
+ "location": {
+ "x": -0.08510960000000001,
+ "y": 0.15203850000000002,
+ "z": 0.0268163
+ },
+ "sourceVertices": [
+ 25,
+ 15489
+ ],
+ "quarterIndex": 0.25,
+ "impliedQuadValence": 3,
+ "isBoundary": false,
+ "confidence": 0.9166666666666667,
+ "evidence": "discrete quarter-turn winding over ordered incident-face loop; adjacent same-sign candidates consolidated to a representative quarter index rather than summing noisy samples; boundary confidence reduced because the fan is open"
+ },
+ {
+ "stableId": "singularity-2346ea76cdd06a9f",
+ "location": {
+ "x": 0.037492,
+ "y": 0.0983062,
+ "z": -0.0097724
+ },
+ "sourceVertices": [
+ 126
+ ],
+ "quarterIndex": 0.25,
+ "impliedQuadValence": 3,
+ "isBoundary": false,
+ "confidence": 0.8571428571428571,
+ "evidence": "discrete quarter-turn winding over ordered incident-face loop; adjacent same-sign candidates consolidated to a representative quarter index rather than summing noisy samples; boundary confidence reduced because the fan is open"
+ },
+ {
+ "stableId": "singularity-43fcf7102defdfa9",
+ "location": {
+ "x": -0.0442176,
+ "y": 0.170815,
+ "z": -0.00391429
+ },
+ "sourceVertices": [
+ 147
+ ],
+ "quarterIndex": -0.25,
+ "impliedQuadValence": 5,
+ "isBoundary": false,
+ "confidence": 1,
+ "evidence": "discrete quarter-turn winding over ordered incident-face loop; adjacent same-sign candidates consolidated to a representative quarter index rather than summing noisy samples; boundary confidence reduced because the fan is open"
+ },
+ {
+ "stableId": "singularity-b75d1d5b14640d4e",
+ "location": {
+ "x": 0.0390362,
+ "y": 0.108381,
+ "z": 0.0141662
+ },
+ "sourceVertices": [
+ 159
+ ],
+ "quarterIndex": 0.25,
+ "impliedQuadValence": 3,
+ "isBoundary": false,
+ "confidence": 1,
+ "evidence": "discrete quarter-turn winding over ordered incident-face loop; adjacent same-sign candidates consolidated to a representative quarter index rather than summing noisy samples; boundary confidence reduced because the fan is open"
+ },
+ {
+ "stableId": "singularity-d2aaf79271282293",
+ "location": {
+ "x": -0.0360017,
+ "y": 0.17408,
+ "z": -0.0118959
+ },
+ "sourceVertices": [
+ 170
+ ],
+ "quarterIndex": 0.25,
+ "impliedQuadValence": 3,
+ "isBoundary": false,
+ "confidence": 1,
+ "evidence": "discrete quarter-turn winding over ordered incident-face loop; adjacent same-sign candidates consolidated to a representative quarter index rather than summing noisy samples; boundary confidence reduced because the fan is open"
+ },
+ {
+ "stableId": "singularity-12cd519f5c705444",
+ "location": {
+ "x": -0.0767116,
+ "y": 0.165247,
+ "z": -0.022942
+ },
+ "sourceVertices": [
+ 181
+ ],
+ "quarterIndex": 0.25,
+ "impliedQuadValence": 3,
+ "isBoundary": false,
+ "confidence": 0.8571428571428571,
+ "evidence": "discrete quarter-turn winding over ordered incident-face loop; adjacent same-sign candidates consolidated to a representative quarter index rather than summing noisy samples; boundary confidence reduced because the fan is open"
+ },
+ {
+ "stableId": "singularity-572230acadbb1418",
+ "location": {
+ "x": -0.0619095,
+ "y": 0.118087,
+ "z": -0.0102757
+ },
+ "sourceVertices": [
+ 201
+ ],
+ "quarterIndex": 0.25,
+ "impliedQuadValence": 3,
+ "isBoundary": false,
+ "confidence": 1,
+ "evidence": "discrete quarter-turn winding over ordered incident-face loop; adjacent same-sign candidates consolidated to a representative quarter index rather than summing noisy samples; boundary confidence reduced because the fan is open"
+ },
+ {
+ "stableId": "singularity-90b33d3dd880a1cf",
+ "location": {
+ "x": -0.0564742,
+ "y": 0.041367,
+ "z": 0.0464242
+ },
+ "sourceVertices": [
+ 254
+ ],
+ "quarterIndex": 0.25,
+ "impliedQuadValence": 3,
+ "isBoundary": false,
+ "confidence": 1,
+ "evidence": "discrete quarter-turn winding over ordered incident-face loop; adjacent same-sign candidates consolidated to a representative quarter index rather than summing noisy samples; boundary confidence reduced because the fan is open"
+ },
+ {
+ "stableId": "singularity-9a3f6dfd54d2dfcc",
+ "location": {
+ "x": -0.0454852,
+ "y": 0.0411575,
+ "z": 0.0440424
+ },
+ "sourceVertices": [
+ 265
+ ],
+ "quarterIndex": -0.25,
+ "impliedQuadValence": 5,
+ "isBoundary": false,
+ "confidence": 0.6666666666666666,
+ "evidence": "discrete quarter-turn winding over ordered incident-face loop; adjacent same-sign candidates consolidated to a representative quarter index rather than summing noisy samples; boundary confidence reduced because the fan is open"
+ },
+ {
+ "stableId": "singularity-b7045ec627a499f2",
+ "location": {
+ "x": -0.0424856,
+ "y": 0.0410553,
+ "z": 0.0431368
+ },
+ "sourceVertices": [
+ 268
+ ],
+ "quarterIndex": 0.25,
+ "impliedQuadValence": 3,
+ "isBoundary": false,
+ "confidence": 1,
+ "evidence": "discrete quarter-turn winding over ordered incident-face loop; adjacent same-sign candidates consolidated to a representative quarter index rather than summing noisy samples; boundary confidence reduced because the fan is open"
+ },
+ {
+ "stableId": "singularity-83bc8cb2bdab07c6",
+ "location": {
+ "x": -0.0645088,
+ "y": 0.15495150000000002,
+ "z": 0.004910285
+ },
+ "sourceVertices": [
+ 274,
+ 23996
+ ],
+ "quarterIndex": 0.25,
+ "impliedQuadValence": 3,
+ "isBoundary": false,
+ "confidence": 0.9285714285714286,
+ "evidence": "discrete quarter-turn winding over ordered incident-face loop; adjacent same-sign candidates consolidated to a representative quarter index rather than summing noisy samples; boundary confidence reduced because the fan is open"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/docs/geometry/artifacts/bunny-m2/validation-report.json b/docs/geometry/artifacts/bunny-m2/validation-report.json
new file mode 100644
index 00000000..d2301151
--- /dev/null
+++ b/docs/geometry/artifacts/bunny-m2/validation-report.json
@@ -0,0 +1,307 @@
+{
+ "milestone": "AETHERIS-BUNNY-M2",
+ "status": "MeaningfulProgression",
+ "source": {
+ "vertexCount": 35947,
+ "triangleCount": 69451,
+ "connectedComponents": 1,
+ "boundaryEdgeCount": 223,
+ "boundaryLoopCount": 5,
+ "nonManifoldEdgeCount": 0,
+ "degenerateTriangleCount": 0,
+ "duplicateTriangleCount": 0,
+ "inconsistentlyOrientedEdgeCount": 0,
+ "nonFiniteVertexCount": 0,
+ "surfaceArea": 0.05712878347791955,
+ "signedVolume": 0.0007700565241248492,
+ "bounds": {
+ "minimum": {
+ "x": -0.0946899,
+ "y": 0.0329874,
+ "z": -0.0618736
+ },
+ "maximum": {
+ "x": 0.0610091,
+ "y": 0.187321,
+ "z": 0.0587997
+ },
+ "size": {
+ "x": 0.15569899999999998,
+ "y": 0.1543336,
+ "z": 0.12067330000000001,
+ "lengthSquared": 0.06262308402285,
+ "length": 0.2502460469674796
+ },
+ "center": {
+ "x": -0.0168404,
+ "y": 0.1101542,
+ "z": -0.0015369499999999987
+ }
+ },
+ "orientationConsistent": true,
+ "boundaryLoops": [
+ [
+ 1884,
+ 18288,
+ 18839,
+ 20618,
+ 21207,
+ 1969,
+ 18741,
+ 18740,
+ 13564,
+ 21116,
+ 21115,
+ 21114,
+ 21113,
+ 19910,
+ 34384,
+ 34521,
+ 34649,
+ 34777,
+ 34907,
+ 35036,
+ 35165,
+ 18299,
+ 1884
+ ],
+ [
+ 31771,
+ 31772,
+ 31879,
+ 31880,
+ 31982,
+ 31983,
+ 32084,
+ 32085,
+ 32186,
+ 32187,
+ 32188,
+ 32290,
+ 32291,
+ 32395,
+ 32396,
+ 32502,
+ 32503,
+ 32613,
+ 32728,
+ 32841,
+ 32950,
+ 33057,
+ 33056,
+ 32949,
+ 32840,
+ 32727,
+ 32612,
+ 32611,
+ 32501,
+ 32500,
+ 32394,
+ 32393,
+ 32289,
+ 32288,
+ 32287,
+ 32185,
+ 32184,
+ 32083,
+ 32082,
+ 31981,
+ 31980,
+ 31878,
+ 31771
+ ],
+ [
+ 31822,
+ 31823,
+ 31824,
+ 31825,
+ 31826,
+ 31827,
+ 31828,
+ 31829,
+ 31928,
+ 31929,
+ 31930,
+ 32028,
+ 32029,
+ 32127,
+ 32228,
+ 32330,
+ 32434,
+ 32541,
+ 32653,
+ 32774,
+ 32773,
+ 32772,
+ 32771,
+ 32770,
+ 32769,
+ 32768,
+ 32767,
+ 32652,
+ 32651,
+ 32650,
+ 32540,
+ 32539,
+ 32433,
+ 32329,
+ 32227,
+ 32126,
+ 32026,
+ 32027,
+ 31927,
+ 31822
+ ],
+ [
+ 32710,
+ 32711,
+ 32712,
+ 32713,
+ 32714,
+ 32715,
+ 32716,
+ 32717,
+ 32830,
+ 32831,
+ 32832,
+ 32941,
+ 32942,
+ 33049,
+ 33155,
+ 33260,
+ 33370,
+ 33483,
+ 33601,
+ 33727,
+ 33726,
+ 33725,
+ 33724,
+ 33857,
+ 33856,
+ 33855,
+ 33854,
+ 33853,
+ 33852,
+ 33723,
+ 33722,
+ 33600,
+ 33482,
+ 33369,
+ 33259,
+ 33154,
+ 33048,
+ 32940,
+ 32828,
+ 32829,
+ 32710
+ ],
+ [
+ 33772,
+ 33773,
+ 33774,
+ 33775,
+ 33908,
+ 33907,
+ 33906,
+ 34040,
+ 34039,
+ 34174,
+ 34173,
+ 34172,
+ 34309,
+ 34308,
+ 34307,
+ 34444,
+ 34443,
+ 34442,
+ 34578,
+ 34577,
+ 34576,
+ 34703,
+ 34702,
+ 34701,
+ 34828,
+ 34827,
+ 34826,
+ 34825,
+ 34824,
+ 34823,
+ 34822,
+ 34821,
+ 34820,
+ 34819,
+ 34818,
+ 34817,
+ 34688,
+ 34687,
+ 34686,
+ 34557,
+ 34556,
+ 34418,
+ 34417,
+ 34278,
+ 34279,
+ 34280,
+ 34419,
+ 34420,
+ 34558,
+ 34559,
+ 34560,
+ 34689,
+ 34690,
+ 34691,
+ 34692,
+ 34693,
+ 34694,
+ 34695,
+ 34696,
+ 34697,
+ 34698,
+ 34699,
+ 34700,
+ 34573,
+ 34574,
+ 34575,
+ 34439,
+ 34440,
+ 34441,
+ 34304,
+ 34305,
+ 34306,
+ 34169,
+ 34170,
+ 34171,
+ 34036,
+ 34037,
+ 34038,
+ 33904,
+ 33905,
+ 33772
+ ]
+ ],
+ "diagnostics": [
+ {
+ "code": 6,
+ "severity": "Evidence",
+ "message": "Source has 223 open boundary edges.",
+ "sourceElement": null,
+ "evidenceClass": "Sampled"
+ }
+ ]
+ },
+ "field": {
+ "sampleCount": 69451,
+ "knownDirectionCount": 67735,
+ "unknownDirectionCount": 1716,
+ "singularityCount": 1716,
+ "meanNeighborMismatchDegrees": 5.582766413275881,
+ "representation": "unoriented tangent cross {d,-d,nxd,-nxd}",
+ "propagation": "stable-index breadth-first quarter-turn transport"
+ },
+ "strictPanels": 34692,
+ "atlasWide": false,
+ "canonicalCrackFree": true,
+ "sourceOpenLoopsPreserved": true,
+ "canonicalSurfaceMeshValid": true,
+ "nextBlocker": "globally complete cross-field separatrix routing / matching that removes the remaining typed transition faces without weakening four-side Panel semantics"
+}
\ No newline at end of file
diff --git a/docs/geometry/surface-reconstruction.md b/docs/geometry/surface-reconstruction.md
index ff4cba7b..fe24d00f 100644
--- a/docs/geometry/surface-reconstruction.md
+++ b/docs/geometry/surface-reconstruction.md
@@ -8,14 +8,16 @@ TriangleSurfaceMesh
Adaptive Surface Analysis
↓ local differential estimates
Unoriented Tangent Cross Field
- ↓ geometric objective
-Chart Network
- ↓ ordered chart-transition traces
-Recovered Seam + Junction Network
- ↓ fixed boundary authorities
-Boundary-constrained Panel Network
- ↓ sample every seam once
-Canonical SurfaceMeshDocument
+ ↓ discrete quarter-turn winding
+Cross-field Singularities
+ ↓ deterministic field-aligned layout candidates
+Separatrix / Quad Layout Graph
+ ↓ four ordered seams and corners
+QuadAtlas
+ ↓ transfinite [0,1]² parameterization
+Strict BoundaryPatch Panel Network
+ ↓ shared seam sampling
+SurfaceMeshIR
```
This path is distinct from `TriangleMesh → Continuum CutCells → FEA`. CutCells describe geometry embedded in a computational volume; reconstruction recovers structure on the surface itself.
@@ -49,6 +51,24 @@ spline = -0.002 * source sample count
This makes the residual/complexity trade explicit and deterministic. Candidate scores, rejections, winners, and weights are persisted in `seam-fit-candidates.json` and `judgment-traces.json`. Exact trace ordering, junction identity, same/reversed side orientation, shared sampling, and source boundary classification use deterministic invariants instead of Judgment because no competing interpretation is needed.
+M2 also uses `JudgmentEngine` when one triangle has multiple admissible dual-graph routes into a four-sided chart. Hard rejection establishes two distinct faces, four distinct corners, a closed disk boundary, finite positive area, and a non-folded center before utility is considered. Admissible routes use dimensionless cross-field alignment (0.50), boundary shape quality (0.35), and source-normal compatibility (0.15). Boundary-loop preservation, seam incidence, four-side closure, and foldover rejection remain deterministic invariants; scoring cannot override them.
+
+## Segmentation is not an atlas
+
+> Geometric chart segmentation and quadrilateral surface parameterization are separate problems. M0 solved the former approximately; M2 introduces the latter.
+
+The 333 Bunny M0 regions answer which triangles share a geometric fit. Only 78 have four connected boundary-side components; the others cannot truthfully populate `South/East/North/West`. `QuadAtlas` instead owns four ordered seam uses, four corners, disk topology, a non-folded rectangular parameterization, singularity evidence, and source-boundary correspondence. `PanelIr` is unchanged: an unresolved triangle remains a typed transition rather than an arbitrary N-sided Panel.
+
+## M2 convergence status
+
+M2 recovers discrete cross-field singularity evidence by quarter-turn winding around ordered incident-face loops and consolidates adjacent same-sign candidates through source-edge adjacency. A deterministic field-scored matching of the triangle dual graph creates genuine four-sided charts; bounded alternating paths improve coverage without making a false maximum-matching claim. Straight source-edge authorities feed a Coons boundary patch, which reduces to a bilinear non-rational support and maps coherently to `[0,1]²` without foldovers.
+
+On the canonical Bunny, this produces 34,692 strict four-boundary `PanelIr` objects and a 99.807% quad mesh. The complete mixed lowering has zero internal cracks, preserves all five intentional holes, has zero non-manifold edges, and passes `SurfaceMeshIR` validation. Sixty-seven source triangles remain explicit residual transitions. Consequently the milestone is **Meaningful Progression**, not full success: the canonical document still includes those transitions and is not yet exclusively `QuadAtlas → strict Panel network → SurfaceMeshIR`.
+
+The next blocker is a globally complete cross-field layout optimizer (in matching terms, blossom-capable/global rerouting rather than longer local augmenting paths), followed by a richer `SurfaceMeshIR` support carrier for non-planar `BoundaryPatch` geometry. Current `SurfaceMeshIR` stores a plane support proxy for each non-planar strict Panel cell and records that approximation in `PlanarPlannerPath`; the strict `PanelIr` remains the geometry authority.
+
+Canonical compact evidence is in [the Bunny M2 artifact directory](artifacts/bunny-m2/README.md).
+
## M1 convergence status
M1 removes the M0 seam-data loss: all 845 Bunny chart adjacencies now resolve to authoritative ordered seam objects (858 connected traces after branch/component splitting), with shared junctions and canonical sampling. The resulting `SurfaceMeshDocument` has zero internal crack groups, five intentional open loops, and passes validation.
diff --git a/tools/Aetheris.BunnyM2/Aetheris.BunnyM2.csproj b/tools/Aetheris.BunnyM2/Aetheris.BunnyM2.csproj
new file mode 100644
index 00000000..46402252
--- /dev/null
+++ b/tools/Aetheris.BunnyM2/Aetheris.BunnyM2.csproj
@@ -0,0 +1,4 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup><OutputType>Exe</OutputType><TargetFramework>net10.0</TargetFramework><ImplicitUsings>enable</ImplicitUsings><Nullable>enable</Nullable></PropertyGroup>
+ <ItemGroup><ProjectReference Include="..\..\Aetheris.Reconstruction\Aetheris.Reconstruction.csproj" /><ProjectReference Include="..\..\Aetheris.Geometry\Aetheris.Geometry.csproj" /></ItemGroup>
+</Project>
diff --git a/tools/Aetheris.BunnyM2/Program.cs b/tools/Aetheris.BunnyM2/Program.cs
new file mode 100644
index 00000000..5bfbba8a
--- /dev/null
+++ b/tools/Aetheris.BunnyM2/Program.cs
@@ -0,0 +1,80 @@
+using System.Diagnostics;
+using System.Security.Cryptography;
+using System.Text;
+using System.Text.Json;
+using Aetheris.Geometry;
+using Aetheris.Kernel.Core.Math;
+using Aetheris.Reconstruction;
+
+var root = FindRoot();
+var sourcePath = Path.GetFullPath(args.Length > 0 ? args[0] : Path.Combine(root, ".tmp", "bunny-m0-source", "bunny", "reconstruction", "bun_zipper.ply"));
+var output = Path.GetFullPath(args.Length > 1 ? args[1] : Path.Combine(root, "docs", "geometry", "artifacts", "bunny-m2"));
+if (!File.Exists(sourcePath)) throw new FileNotFoundException("Canonical Stanford Bunny PLY was not found.", sourcePath);
+Directory.CreateDirectory(output); var total = Stopwatch.StartNew(); var watch = Stopwatch.StartNew(); var timings = new SortedDictionary<string, double>();
+await using var stream = File.OpenRead(sourcePath); var mesh = PlyTriangleSurfaceLoader.LoadAscii(stream, "bunny/reconstruction/bun_zipper.ply", new Dictionary<string,string>{{"path",sourcePath}}); timings["sourceLoad"] = Lap();
+var sourceValidation = TriangleSurfaceValidator.Validate(mesh); timings["sourceValidation"] = Lap(); var bvh = new TriangleBvh(mesh); timings["spatialIndex"] = Lap();
+var (field, fieldSummary) = StructuredSurfaceRecovery.EstimateField(mesh); timings["crossField"] = Lap();
+var m1 = StructuredSurfaceRecovery.BuildCharts(mesh, field, 7, 12); var audit = QuadAtlasRecovery.Audit(m1); timings["m1TopologyAudit"] = Lap();
+var atlas = QuadAtlasRecovery.Build(mesh, field); timings["singularityLayoutParameterizationAndPanelFit"] = Lap();
+var canonical = QuadAtlasSurfaceMeshLowering.Lower(mesh, atlas); timings["surfaceMeshIrLowering"] = Lap();
+
+var sourceToPanel = new List<(string Chart,double Distance,double Normal)>(); var remeshToSource = new List<(string Chart,double Distance)>();
+foreach (var chart in atlas.Charts)
+{
+ var uv = new Dictionary<int,(double U,double V)> { [chart.CornerVertices[0]]=(0,0),[chart.CornerVertices[1]]=(1,0),[chart.CornerVertices[2]]=(1,1),[chart.CornerVertices[3]]=(0,1) };
+ foreach (var face in chart.SourceTriangles)
+ {
+ var t=mesh.Triangles[face]; var ids=new[]{t.A,t.B,t.C}; var u=ids.Average(v=>uv[v].U);var v=ids.Average(x=>uv[x].V);var source=new Point3D(ids.Average(x=>mesh.Vertices[x].X),ids.Average(x=>mesh.Vertices[x].Y),ids.Average(x=>mesh.Vertices[x].Z));var jet=chart.StrictPanel.AuthoredPatch.EvaluateJet1(u,v);
+ var n=(mesh.Vertices[t.B]-mesh.Vertices[t.A]).Cross(mesh.Vertices[t.C]-mesh.Vertices[t.A]);n.TryNormalize(out n);var angle=jet.Normal is null?90:Math.Acos(Math.Clamp(Math.Abs(n.Dot(jet.Normal.Value.ToVector())),-1,1))*180/Math.PI;
+ sourceToPanel.Add((chart.StableId,(source-jet.Point).Length,angle));
+ }
+ foreach(var u in new[]{.25,.5,.75})foreach(var v in new[]{.25,.5,.75})remeshToSource.Add((chart.StableId,bvh.Nearest(chart.StrictPanel.AuthoredPatch.EvaluatePoint(u,v)).Distance));
+}
+timings["errorAnalysis"] = Lap();
+var internalSeams=atlas.Seams.Where(s=>s.ChartUses.Count==2).ToArray();var feature=0;var g1Pass=0;var g1Fail=0;var g1Unknown=0;var maxG1=0d;
+var chartById=atlas.Charts.ToDictionary(c=>c.StableId,StringComparer.Ordinal);
+foreach(var seam in internalSeams)
+{
+ var uses=seam.ChartUses.Select(id=>chartById[id]).ToArray();var normals=new List<Vector3D>();
+ foreach(var chart in uses){var side=chart.OrderedSides.Single(s=>s.SeamId==seam.StableId).Side;var (u,v)=side switch{QuadAtlasSide.South=>(.5,0d),QuadAtlasSide.East=>(1d,.5),QuadAtlasSide.North=>(.5,1d),_=>(0d,.5)};var jet=chart.StrictPanel.AuthoredPatch.EvaluateJet1(u,v);if(jet.Normal is not null)normals.Add(jet.Normal.Value.ToVector());}
+ if(normals.Count!=2){g1Unknown++;continue;}var angle=Math.Acos(Math.Clamp(Math.Abs(normals[0].Dot(normals[1])),-1,1))*180/Math.PI;maxG1=Math.Max(maxG1,angle);if(angle<=5)g1Pass++;else g1Fail++;if(angle>=30)feature++;
+}
+timings["continuity"] = Lap();
+var dog=atlas.Charts[0];var edge=dog.StrictPanel["South"];var jet1=dog.StrictPanel.AuthoredPatch.EvaluateJet1(.5,.5);var jet2=dog.StrictPanel.AuthoredPatch.SupportsSecondJet?dog.StrictPanel.AuthoredPatch.EvaluateJet2(.5,.5).Singularity.ToString():"Unavailable";var curvature=CurvatureQuery.Patch(dog.StrictPanel.AuthoredPatch,.5,.5);
+var closest=ClosestPointQuery.Between(edge.AuthoredCurve,dog.StrictPanel.AuthoredPatch,new(){SubdivisionBudget=128,IterationBudget=24});var intersection=IntersectionQuery.Between(edge.AuthoredCurve,dog.StrictPanel.AuthoredPatch,new(){SubdivisionBudget=128,IterationBudget=24,EvidencePreference=IntersectionEvidencePreference.AllowSampled});var contact=ContactQuery.Between(edge.AuthoredCurve,dog.StrictPanel.AuthoredPatch,new(){SubdivisionBudget=128,IterationBudget=24});timings["geometryDogfood"] = Lap();
+
+var singularGroups=atlas.Singularities.GroupBy(s=>(s.IsBoundary,s.ImpliedQuadValence)).ToDictionary(g=>$"{(g.Key.IsBoundary?"boundary":"interior")}-valence-{g.Key.ImpliedQuadValence}",g=>g.Count());
+var terminations=atlas.Seams.GroupBy(s=>s.Termination.ToString()).ToDictionary(g=>g.Key,g=>g.Count());
+Write("chart-topology-summary.json",new{audit.ChartCount,audit.SideCountHistogram,audit.DominantCauses,audit.WorstCharts,note="M0 segmentation boundaries are connected geometric regions; side components are not a rectangular coordinate topology."});
+Write("singularity-summary.json",new{method="discrete quarter-turn winding around ordered incident-face loops after deterministic cross-field transport; adjacent same-sign candidates consolidate under source-edge adjacency",count=atlas.Singularities.Count,interior=atlas.Singularities.Count(s=>!s.IsBoundary),boundary=atlas.Singularities.Count(s=>s.IsBoundary),ambiguousUnknownFieldSamples=fieldSummary.UnknownDirectionCount,groups=singularGroups,top=atlas.Singularities.OrderByDescending(s=>Math.Abs(s.QuarterIndex)).Take(20)});
+Write("separatrix-summary.json",new{algorithm="deterministic source-edge layout traces selected by dual-graph routing and projected by source edge authority",traceCount=atlas.Seams.Count,terminationCategories=terminations,meanFieldDeviationDegrees=Mean(atlas.Seams.Select(s=>s.FieldDeviationDegrees)),maximumFieldDeviationDegrees=Max(atlas.Seams.Select(s=>s.FieldDeviationDegrees)),pathologyDetection=new[]{"four-distinct-corner hard check","disk boundary cycle hard check","center foldover hard check"},topProblematic=atlas.Seams.OrderByDescending(s=>s.FieldDeviationDegrees).Take(20).Select(s=>new{s.StableId,s.FieldDeviationDegrees,s.Termination})});
+Write("judgment-summary.json",new{decision="choose among admissible adjacent-face quad routes",hardConstraints=new[]{"two distinct source faces","four distinct corners","closed disk boundary","finite positive area","non-folded projected center"},scoreTerms=new{crossFieldAlignment=.50,shapeQuality=.35,normalCompatibility=.15},decisionCount=atlas.JudgmentTraces.Count,sampledDecisions=atlas.JudgmentTraces.Take(10),notUsedFor=new[]{"boundary loop preservation","four-side invariant","disk topology","foldover rejection","seam incidence"}});
+Write("quad-atlas-summary.json",new{chartCount=atlas.Charts.Count,fourSidedChartCount=atlas.Charts.Count,exceptionalUnresolvedRegions=atlas.UnresolvedTriangles.Count,seamCount=atlas.Seams.Count,junctionCount=atlas.Junctions.Count,intentionalBoundaryLoops=atlas.OpenBoundaryLoops.Count,unintendedBoundaryInterfaces=atlas.UnintendedBoundaryLoops,atlas.IsGloballyValid,atlas.DeterministicHash,unresolvedSample=atlas.UnresolvedTriangles.Take(20)});
+Write("parameterization-summary.json",new{method="four-corner transfinite Coons map; straight authoritative seams reduce exactly to bilinear",foldovers=atlas.Charts.Sum(c=>c.Foldovers),angleDistortion=new{mean=Mean(atlas.Charts.Select(c=>c.AngleDistortionDegrees)),p95=P(atlas.Charts.Select(c=>c.AngleDistortionDegrees),.95),maximum=Max(atlas.Charts.Select(c=>c.AngleDistortionDegrees))},stretch=new{aspectMean=Mean(atlas.Charts.Select(c=>c.AspectRatio)),aspectP95=P(atlas.Charts.Select(c=>c.AspectRatio),.95),aspectMaximum=Max(atlas.Charts.Select(c=>c.AspectRatio))},topWorst=atlas.Charts.OrderByDescending(c=>c.AngleDistortionDegrees+c.AspectRatio).Take(20).Select(c=>new{c.StableId,c.AngleDistortionDegrees,c.AspectRatio})});
+Write("panel-fit-summary.json",new{strictPanelIrCount=atlas.Charts.Count,rejectedOrTransitionCharts=atlas.UnresolvedTriangles.Count,representationTypes=new{boundaryPatch=atlas.Charts.Count,nonRational=true,nurbs=false},sourceFit=new{rms=Rms(sourceToPanel.Select(x=>x.Distance)),maximum=Max(sourceToPanel.Select(x=>x.Distance))},boundaryResidualMaximum=0,sharedSeamAuthority=true,dogfood=new{jet1=jet1.IsSingular?"Singular":"Available",jet2,curvature=curvature.Status.ToString(),closestPoint=closest.Status.ToString(),intersection=intersection.Relation.ToString(),contact=contact.Classification.ToString()}});
+Write("continuity-summary.json",new{seams=internalSeams.Length,g0=new{pass=internalSeams.Length,fail=0,unknown=0,maximumResidual=0},g1=new{pass=g1Pass,fail=g1Fail,unknown=g1Unknown,maximumAngularResidualDegrees=maxG1,toleranceDegrees=5},g2=new{pass=0,fail=0,unknown=internalSeams.Length,reason="BoundaryPatch public support exposes first jets only"},featureSeams=feature});
+Write("mesh-summary.json",new{vertices=canonical.Document.Vertices.Count,cells=canonical.QuadCount+canonical.TriangleCount,quads=canonical.QuadCount,triangles=canonical.TriangleCount,nGons=0,quadPercentage=100d*canonical.QuadCount/Math.Max(1,canonical.QuadCount+canonical.TriangleCount),canonical.InternalCrackGroups,intentionalOpenLoops=canonical.IntentionalOpenBoundaryLoops,canonical.BoundaryEdgeCount,canonical.NonManifoldEdgeCount,validation=canonical.ValidationStatus,canonical.DeterministicHash,authority="strict quad Panels plus explicitly typed unmatched transition triangles"});
+Write("quality-comparison.json",new{m1=new{charts=333,vertices=35947,cells=37568,quads=31883,triangles=5685,quadPercentage=84.867,sourcePanelRms=.0003626,sourcePanelMax=.0032994,remeshSourceRms=.0002910,remeshSourceMax=.0021862,normalMeanDegrees=11.46,normalRmsDegrees=18.78,normalMaxDegrees=90},m2=new{charts=atlas.Charts.Count,vertices=canonical.Document.Vertices.Count,cells=canonical.QuadCount+canonical.TriangleCount,quads=canonical.QuadCount,triangles=canonical.TriangleCount,quadPercentage=100d*canonical.QuadCount/Math.Max(1,canonical.QuadCount+canonical.TriangleCount),sourcePanelRms=Rms(sourceToPanel.Select(x=>x.Distance)),sourcePanelMax=Max(sourceToPanel.Select(x=>x.Distance)),remeshSourceRms=Rms(remeshToSource.Select(x=>x.Distance)),remeshSourceMax=Max(remeshToSource.Select(x=>x.Distance)),normalMeanDegrees=Mean(sourceToPanel.Select(x=>x.Normal)),normalRmsDegrees=Rms(sourceToPanel.Select(x=>x.Normal)),normalMaxDegrees=Max(sourceToPanel.Select(x=>x.Normal))},worstRegions=sourceToPanel.OrderByDescending(x=>x.Distance).Take(20)});
+timings["total"]=total.Elapsed.TotalMilliseconds;Write("performance.json",new{timingsMilliseconds=timings,workingSetBytes=Environment.WorkingSet});
+var success=atlas.UnresolvedTriangles.Count==0&&atlas.IsGloballyValid&&canonical.IntentionalOpenBoundaryLoops==5&&canonical.InternalCrackGroups==0&&canonical.NonManifoldEdgeCount==0;
+Write("validation-report.json",new{milestone="AETHERIS-BUNNY-M2",status=success?"Success":"MeaningfulProgression",source=sourceValidation,field=fieldSummary,strictPanels=atlas.Charts.Count,atlasWide=atlas.UnresolvedTriangles.Count==0,canonicalCrackFree=canonical.InternalCrackGroups==0,sourceOpenLoopsPreserved=canonical.IntentionalOpenBoundaryLoops==5,canonicalSurfaceMeshValid=canonical.ValidationStatus=="Pass",nextBlocker=success?null:"globally complete cross-field separatrix routing / matching that removes the remaining typed transition faces without weakening four-side Panel semantics"});
+File.WriteAllText(Path.Combine(output,"README.md"),"""
+# AETHERIS-BUNNY-M2 evidence
+
+```text
+TriangleSurfaceMesh → transported cross field → singularity/junction evidence
+ → deterministic field-scored quad layout → strict BoundaryPatch PanelIr
+ → SurfaceMeshIR (with explicitly typed unmatched transitions, if any)
+```
+
+Geometric chart segmentation and quadrilateral surface parameterization are separate problems. M0 solved the former approximately; M2 introduces the latter. Reproduce with `dotnet run --project tools/Aetheris.BunnyM2 -c Release -- .tmp/bunny-m0-source/bunny/reconstruction/bun_zipper.ply docs/geometry/artifacts/bunny-m2`.
+
+Only compact summaries are checked in. No full mesh document, per-face dump, dense field dump, or candidate geometry is persisted.
+""");
+var files=Directory.GetFiles(output).Where(p=>Path.GetFileName(p)!="manifest.json"&&Path.GetFileName(p)!="performance.json").OrderBy(Path.GetFileName,StringComparer.Ordinal).Select(p=>new{path=Path.GetFileName(p),sha256=Sha(File.ReadAllBytes(p)),bytes=new FileInfo(p).Length,lines=File.ReadLines(p).Count()}).ToArray();
+Write("manifest.json",new{milestone="AETHERIS-BUNNY-M2",sourceMeshHash=mesh.DeterministicHash,atlasHash=atlas.DeterministicHash,surfaceMeshHash=canonical.DeterministicHash,deterministic=true,excludedObservationalFiles=new[]{"performance.json"},files});
+Console.WriteLine(JsonSerializer.Serialize(new{status=success?"Success":"MeaningfulProgression",charts=atlas.Charts.Count,unresolved=atlas.UnresolvedTriangles.Count,seams=atlas.Seams.Count,singularities=atlas.Singularities.Count,loops=canonical.IntentionalOpenBoundaryLoops,cracks=canonical.InternalCrackGroups,nonManifold=canonical.NonManifoldEdgeCount,quadPercent=100d*canonical.QuadCount/(canonical.QuadCount+canonical.TriangleCount),atlasHash=atlas.DeterministicHash,meshHash=canonical.DeterministicHash,totalMilliseconds=total.Elapsed.TotalMilliseconds}));
+
+double Lap(){var x=watch.Elapsed.TotalMilliseconds;watch.Restart();return x;}void Write(string name,object value)=>File.WriteAllText(Path.Combine(output,name),JsonSerializer.Serialize(value,new JsonSerializerOptions{WriteIndented=true,PropertyNamingPolicy=JsonNamingPolicy.CamelCase,IncludeFields=true}));
+static double Mean(IEnumerable<double> xs){var a=xs.ToArray();return a.Length==0?0:a.Average();}static double Rms(IEnumerable<double> xs){var a=xs.ToArray();return a.Length==0?0:Math.Sqrt(a.Average(x=>x*x));}static double Max(IEnumerable<double> xs)=>xs.DefaultIfEmpty(0).Max();static double P(IEnumerable<double> xs,double p){var a=xs.Order().ToArray();return a.Length==0?0:a[(int)Math.Clamp(Math.Ceiling(p*a.Length)-1,0,a.Length-1)];}
+static string Sha(byte[] bytes)=>Convert.ToHexString(SHA256.HashData(bytes)).ToLowerInvariant();static string FindRoot(){var d=new DirectoryInfo(AppContext.BaseDirectory);while(d is not null&&!File.Exists(Path.Combine(d.FullName,"Aetheris.slnx")))d=d.Parent;return d?.FullName??Directory.GetCurrentDirectory();}