Skip to content

Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel

Add prismatic X5 artifact corpus

Yuechen Li9d4a88428be7
diff --git a/Aetheris.CLI.Tests/ExperimentalPrismaticCorpusTests.cs b/Aetheris.CLI.Tests/ExperimentalPrismaticCorpusTests.cs
new file mode 100644
index 00000000..e78f916b
--- /dev/null
+++ b/Aetheris.CLI.Tests/ExperimentalPrismaticCorpusTests.cs
@@ -0,0 +1,174 @@
+using System.Text.Json;
+
+namespace Aetheris.CLI.Tests;
+
+public sealed class ExperimentalPrismaticCorpusTests
+{
+ [Fact]
+ public void Experimental_Prismatic_Corpus_Help_Is_Discoverable_And_Explicitly_Lab_Only()
+ {
+ var stdout = new StringWriter();
+ var stderr = new StringWriter();
+
+ var exitCode = Aetheris.CLI.CliRunner.Run(["experimental", "prismatic-corpus", "--help"], stdout, stderr);
+
+ Assert.Equal(0, exitCode);
+ Assert.True(string.IsNullOrWhiteSpace(stderr.ToString()));
+ var text = stdout.ToString();
+ Assert.Contains("Usage: aetheris experimental prismatic-corpus --out-dir <dir> [--json]", text, StringComparison.Ordinal);
+ Assert.Contains("EDGE-PRISMATIC-X5", text, StringComparison.Ordinal);
+ Assert.Contains("Experimental/lab-only", text, StringComparison.Ordinal);
+ Assert.Contains("no production route replacement", text, StringComparison.OrdinalIgnoreCase);
+ Assert.Contains("no coplanar merge", text, StringComparison.OrdinalIgnoreCase);
+ }
+
+ [Fact]
+ public void Experimental_Prismatic_Corpus_Writes_Split_Preserving_Steps_Json_And_Diagnostics()
+ {
+ var outputDir = Path.Combine(Path.GetTempPath(), $"edge-prismatic-x5-corpus-{Guid.NewGuid():N}");
+ var stdout = new StringWriter();
+ var stderr = new StringWriter();
+
+ try
+ {
+ var exitCode = Aetheris.CLI.CliRunner.Run(["experimental", "prismatic-corpus", "--out-dir", outputDir, "--json"], stdout, stderr);
+
+ Assert.Equal(0, exitCode);
+ Assert.True(string.IsNullOrWhiteSpace(stderr.ToString()));
+
+ var expectedArtifacts = new[]
+ {
+ "edge-prismatic-x5-rectangle-inset.step",
+ "edge-prismatic-x5-top-edge-chamfer.step",
+ "edge-prismatic-x5-pentagon-scaled.step",
+ "edge-prismatic-x5-hexagon-scaled.step",
+ "edge-prismatic-x5-pentagon-asymmetric.step",
+ };
+
+ foreach (var artifact in expectedArtifacts)
+ {
+ var path = Path.Combine(outputDir, artifact);
+ Assert.True(File.Exists(path), artifact);
+ Assert.True(new FileInfo(path).Length > 0, artifact);
+ AssertStepMarkers(File.ReadAllText(path));
+ }
+
+ Assert.False(File.Exists(Path.Combine(outputDir, "edge-prismatic-x5-mismatched-vertex-count.step")));
+ Assert.False(File.Exists(Path.Combine(outputDir, "edge-prismatic-x5-holes-deferred.step")));
+ var summaryPath = Path.Combine(outputDir, "edge-prismatic-x5-corpus.json");
+ Assert.True(File.Exists(summaryPath));
+
+ using var stdoutDoc = JsonDocument.Parse(stdout.ToString());
+ using var fileDoc = JsonDocument.Parse(File.ReadAllText(summaryPath));
+ Assert.Equal(stdoutDoc.RootElement.GetProperty("milestone").GetString(), fileDoc.RootElement.GetProperty("milestone").GetString());
+
+ var root = stdoutDoc.RootElement;
+ Assert.Equal("EDGE-PRISMATIC-X5", root.GetProperty("milestone").GetString());
+ Assert.Equal("experimental", root.GetProperty("route").GetString());
+ Assert.Equal("prismatic-section-transition", root.GetProperty("transitionRoute").GetString());
+ Assert.Equal("PrismaticSectionTransitionEmitter", root.GetProperty("emitterComponentName").GetString());
+ Assert.Equal("preserve-section-splits", root.GetProperty("splitPolicy").GetString());
+
+ AssertGuarantees(root.GetProperty("guarantees"));
+
+ var cases = root.GetProperty("cases").EnumerateArray().ToDictionary(x => x.GetProperty("caseName").GetString()!);
+ Assert.Equal("succeeded", cases["rectangle-inset"].GetProperty("status").GetString());
+ Assert.Equal("succeeded", cases["top-edge-chamfer"].GetProperty("status").GetString());
+ Assert.Equal("succeeded", cases["pentagon-scaled"].GetProperty("status").GetString());
+ Assert.Equal("succeeded", cases["hexagon-scaled"].GetProperty("status").GetString());
+ Assert.Equal("succeeded", cases["pentagon-asymmetric"].GetProperty("status").GetString());
+ Assert.Equal("rejected", cases["mismatched-vertex-count"].GetProperty("status").GetString());
+ Assert.Equal("rejected", cases["non-increasing-sections"].GetProperty("status").GetString());
+ Assert.Equal("rejected", cases["invalid-self-intersecting-profile"].GetProperty("status").GetString());
+ Assert.Equal("deferred", cases["holes-deferred"].GetProperty("status").GetString());
+ Assert.Equal("deferred", cases["arcs-deferred"].GetProperty("status").GetString());
+ Assert.Equal("deferred", cases["multiple-loops-deferred"].GetProperty("status").GetString());
+ Assert.Equal("rejected", cases["missing-correspondence"].GetProperty("status").GetString());
+ Assert.Equal("rejected", cases["non-identity-correspondence"].GetProperty("status").GetString());
+
+ AssertTopology(cases["rectangle-inset"], sectionCount: 2, vertices: 8, edges: 12, faces: 6, transitionFaces: 4, capFaces: 2, loops: 6, coedges: 24);
+ AssertTopology(cases["pentagon-scaled"], sectionCount: 2, vertices: 10, edges: 15, faces: 7, transitionFaces: 5, capFaces: 2, loops: 7, coedges: 30);
+ AssertTopology(cases["hexagon-scaled"], sectionCount: 2, vertices: 12, edges: 18, faces: 8, transitionFaces: 6, capFaces: 2, loops: 8, coedges: 36);
+ AssertTopology(cases["pentagon-asymmetric"], sectionCount: 2, vertices: 10, edges: 15, faces: 7, transitionFaces: 5, capFaces: 2, loops: 7, coedges: 30);
+ AssertTopEdgeChamferTopology(cases["top-edge-chamfer"]);
+
+ foreach (var name in expectedArtifacts.Select(x => x.Replace("edge-prismatic-x5-", string.Empty).Replace(".step", string.Empty)))
+ {
+ var caseName = name == "rectangle-inset" ? "rectangle-inset" : name;
+ var markers = cases[caseName].GetProperty("stepMarkerSummary");
+ Assert.True(markers.GetProperty("requiredMarkersPresent").GetBoolean());
+ Assert.True(markers.GetProperty("forbiddenMarkersAbsent").GetBoolean());
+ }
+
+ foreach (var invalidCase in new[] { "mismatched-vertex-count", "non-increasing-sections", "invalid-self-intersecting-profile", "holes-deferred", "arcs-deferred", "multiple-loops-deferred", "missing-correspondence", "non-identity-correspondence" })
+ {
+ Assert.Equal(JsonValueKind.Null, cases[invalidCase].GetProperty("artifactPath").ValueKind);
+ Assert.Equal(JsonValueKind.Null, cases[invalidCase].GetProperty("stepMarkerSummary").ValueKind);
+ }
+
+ var diagnostics = root.GetProperty("diagnostics").EnumerateArray().Select(x => x.GetString()).ToArray();
+ Assert.Contains("edge-prismatic-x5-no-production-route-replacement", diagnostics);
+ Assert.Contains("edge-prismatic-x5-no-air-edge-sweep-used", diagnostics);
+ Assert.Contains("edge-prismatic-x5-no-brep-bounded-chamfer-used", diagnostics);
+ Assert.Contains("edge-prismatic-x5-no-topology-graft-used", diagnostics);
+ Assert.Contains("edge-prismatic-x5-no-3d-boolean-used", diagnostics);
+ Assert.Contains("edge-prismatic-x5-no-coplanar-merge-used", diagnostics);
+ Assert.Contains("edge-prismatic-x5-step-smoke-succeeded:rectangle-inset", diagnostics);
+ Assert.Contains("edge-prismatic-x5-split-preserving-topology-validated:top-edge-chamfer", diagnostics);
+ Assert.Contains("edge-prismatic-x5-case-rejected:mismatched-vertex-count:mismatched-vertex-count", diagnostics);
+ Assert.Contains("edge-prismatic-x5-case-deferred:holes-deferred:holes", diagnostics);
+ }
+ finally
+ {
+ if (Directory.Exists(outputDir))
+ {
+ Directory.Delete(outputDir, recursive: true);
+ }
+ }
+ }
+
+ private static void AssertTopology(JsonElement corpusCase, int sectionCount, int vertices, int edges, int faces, int transitionFaces, int capFaces, int loops, int coedges)
+ {
+ var topology = corpusCase.GetProperty("topologySummary");
+ Assert.True(topology.GetProperty("bodyProduced").GetBoolean());
+ Assert.Equal(sectionCount, topology.GetProperty("sectionCount").GetInt32());
+ Assert.Equal(vertices, topology.GetProperty("vertexCount").GetInt32());
+ Assert.Equal(edges, topology.GetProperty("edgeCount").GetInt32());
+ Assert.Equal(faces, topology.GetProperty("faceCount").GetInt32());
+ Assert.Equal(faces, topology.GetProperty("planarFaceCount").GetInt32());
+ Assert.Equal(0, topology.GetProperty("cylindricalFaceCount").GetInt32());
+ Assert.Equal(transitionFaces, topology.GetProperty("transitionFaceCount").GetInt32());
+ Assert.Equal(capFaces, topology.GetProperty("capFaceCount").GetInt32());
+ Assert.Equal(loops, topology.GetProperty("loopCount").GetInt32());
+ Assert.Equal(coedges, topology.GetProperty("coedgeCount").GetInt32());
+ }
+
+ private static void AssertTopEdgeChamferTopology(JsonElement corpusCase)
+ {
+ AssertTopology(corpusCase, sectionCount: 3, vertices: 12, edges: 20, faces: 10, transitionFaces: 4, capFaces: 2, loops: 10, coedges: 40);
+ var topology = corpusCase.GetProperty("topologySummary");
+ Assert.Equal(4, topology.GetProperty("lowerPrismSideFaceCount").GetInt32());
+ Assert.Equal(1, topology.GetProperty("chamferTransitionFaceCount").GetInt32());
+ }
+
+ private static void AssertGuarantees(JsonElement guarantees)
+ {
+ Assert.True(guarantees.GetProperty("noProductionRouteReplacement").GetBoolean());
+ Assert.True(guarantees.GetProperty("noAirEdgeSweep").GetBoolean());
+ Assert.True(guarantees.GetProperty("noBrepBoundedChamfer").GetBoolean());
+ Assert.True(guarantees.GetProperty("noTopologyGraft").GetBoolean());
+ Assert.True(guarantees.GetProperty("no3DBoolean").GetBoolean());
+ Assert.True(guarantees.GetProperty("noCoplanarMerge").GetBoolean());
+ }
+
+ private static void AssertStepMarkers(string stepText)
+ {
+ Assert.False(string.IsNullOrWhiteSpace(stepText));
+ Assert.Contains("ISO-10303-21", stepText, StringComparison.Ordinal);
+ Assert.Contains("MANIFOLD_SOLID_BREP", stepText, StringComparison.Ordinal);
+ Assert.Contains("ADVANCED_FACE", stepText, StringComparison.Ordinal);
+ Assert.Contains("PLANE", stepText, StringComparison.Ordinal);
+ Assert.DoesNotContain("CYLINDRICAL_SURFACE", stepText, StringComparison.Ordinal);
+ Assert.DoesNotContain("BREP_WITH_VOIDS", stepText, StringComparison.Ordinal);
+ }
+}
diff --git a/Aetheris.CLI/CliRunner.cs b/Aetheris.CLI/CliRunner.cs
index 0bac12f1..c1ce3afb 100644
--- a/Aetheris.CLI/CliRunner.cs
+++ b/Aetheris.CLI/CliRunner.cs
@@ -27,9 +27,10 @@ public static class CliRunner
private const string CanonUsage = "Usage: aetheris canon <file.step> --out <canonical.step> [--json]";
private const string AsmExecUsage = "Usage: aetheris asm exec <file.firmasm> [--json]";
private const string AsmExportUsage = "Usage: aetheris asm export <file.firmasm> --out <directory> [--json]";
- private const string ExperimentalUsage = "Usage: aetheris experimental <airchamfer-cube|airchamfer-corpus> [options]";
+ private const string ExperimentalUsage = "Usage: aetheris experimental <airchamfer-cube|airchamfer-corpus|prismatic-corpus> [options]";
private const string ExperimentalAirChamferCubeUsage = "Usage: aetheris experimental airchamfer-cube --out <path> [--json]";
private const string ExperimentalAirChamferCorpusUsage = "Usage: aetheris experimental airchamfer-corpus --out-dir <dir> [--json]";
+ private const string ExperimentalPrismaticCorpusUsage = "Usage: aetheris experimental prismatic-corpus --out-dir <dir> [--json]";
private static readonly JsonSerializerOptions JsonOptions = new()
{
@@ -861,6 +862,11 @@ public static class CliRunner
return RunExperimentalAirChamferCorpus(args.Skip(1).ToArray(), stdout, stderr);
}
+ if (string.Equals(args[0], "prismatic-corpus", StringComparison.Ordinal))
+ {
+ return RunExperimentalPrismaticCorpus(args.Skip(1).ToArray(), stdout, stderr);
+ }
+
stderr.WriteLine($"Unknown experimental subcommand '{args[0]}'.");
stderr.WriteLine(ExperimentalUsage);
return 1;
@@ -993,6 +999,61 @@ public static class CliRunner
return corpus.Errors.Count == 0 ? 0 : 1;
}
+
+ private static int RunExperimentalPrismaticCorpus(string[] args, TextWriter stdout, TextWriter stderr)
+ {
+ string? outDir = null;
+ var json = false;
+
+ for (var i = 0; i < args.Length; i++)
+ {
+ switch (args[i])
+ {
+ case "--out-dir" when i + 1 < args.Length:
+ outDir = args[++i];
+ break;
+ case "--out-dir":
+ stderr.WriteLine("Experimental prismatic-corpus option --out-dir requires a directory value.");
+ stderr.WriteLine(ExperimentalPrismaticCorpusUsage);
+ return 1;
+ case "--json":
+ json = true;
+ break;
+ case "-h":
+ case "--help":
+ WriteExperimentalPrismaticCorpusHelp(stdout);
+ return 0;
+ default:
+ stderr.WriteLine($"Unknown experimental prismatic-corpus option '{args[i]}'.");
+ stderr.WriteLine(ExperimentalPrismaticCorpusUsage);
+ return 1;
+ }
+ }
+
+ if (string.IsNullOrWhiteSpace(outDir))
+ {
+ stderr.WriteLine("Experimental prismatic-corpus requires --out-dir <dir>.");
+ stderr.WriteLine(ExperimentalPrismaticCorpusUsage);
+ return 1;
+ }
+
+ var corpus = PrismaticSectionTransitionCorpusLab.WriteEdgePrismaticX5Corpus(outDir);
+ if (json)
+ {
+ stdout.WriteLine(JsonSerializer.Serialize(corpus, JsonOptions));
+ return corpus.Errors.Count == 0 ? 0 : 1;
+ }
+
+ foreach (var diagnostic in corpus.Diagnostics)
+ {
+ stdout.WriteLine(diagnostic);
+ }
+
+ stdout.WriteLine($"Experimental prismatic EDGE-PRISMATIC-X5 corpus summary written: {corpus.SummaryPath}");
+ stdout.WriteLine("Route: experimental/lab prismatic section-transition corpus; production routes remain unchanged.");
+ return corpus.Errors.Count == 0 ? 0 : 1;
+ }
+
private static int RunAsm(string[] args, TextWriter stdout, TextWriter stderr)
{
if (args.Length == 0 || IsHelpFlag(args[0]))
@@ -1704,15 +1765,18 @@ public static class CliRunner
stdout.WriteLine("Subcommands:");
stdout.WriteLine(" airchamfer-cube Export a controlled one-edge AirChamfer candidate cube/box STEP artifact.");
stdout.WriteLine(" airchamfer-corpus Generate the EDGE-X11 tiny AirChamfer STEP regression corpus.");
+ stdout.WriteLine(" prismatic-corpus Generate the EDGE-PRISMATIC-X5 split-preserving prismatic corpus.");
stdout.WriteLine();
stdout.WriteLine("Notes:");
stdout.WriteLine(" - Experimental only; does not route production Firmament chamfer operations through AirChamfer.");
stdout.WriteLine(" - Legacy BrepBoundedChamfer remains production-authoritative.");
stdout.WriteLine(" - The candidate path uses no 3D Boolean fallback.");
+ stdout.WriteLine(" - The prismatic corpus preserves section-boundary split faces and performs no coplanar merge.");
stdout.WriteLine();
stdout.WriteLine("Examples:");
stdout.WriteLine(" aetheris experimental airchamfer-cube --out edge-x10-airchamfer-cube-one-edge.step --json");
stdout.WriteLine(" aetheris experimental airchamfer-corpus --out-dir artifacts/edge-x11 --json");
+ stdout.WriteLine(" aetheris experimental prismatic-corpus --out-dir artifacts/edge-prismatic-x5 --json");
}
private static void WriteExperimentalAirChamferCubeHelp(TextWriter stdout)
@@ -1759,6 +1823,33 @@ public static class CliRunner
stdout.WriteLine(" aetheris experimental airchamfer-corpus --out-dir artifacts/edge-x11 --json");
}
+
+ private static void WriteExperimentalPrismaticCorpusHelp(TextWriter stdout)
+ {
+ stdout.WriteLine("Generate the EDGE-PRISMATIC-X5 split-preserving prismatic section-transition artifact corpus.");
+ stdout.WriteLine();
+ stdout.WriteLine(ExperimentalPrismaticCorpusUsage);
+ stdout.WriteLine();
+ stdout.WriteLine("Options:");
+ stdout.WriteLine(" --out-dir <dir> Required deterministic corpus output directory.");
+ stdout.WriteLine(" --json Emit the corpus JSON summary to stdout after writing it to disk.");
+ stdout.WriteLine(" -h, --help Show this help.");
+ stdout.WriteLine();
+ stdout.WriteLine("Artifacts:");
+ stdout.WriteLine(" edge-prismatic-x5-rectangle-inset.step");
+ stdout.WriteLine(" edge-prismatic-x5-top-edge-chamfer.step");
+ stdout.WriteLine(" edge-prismatic-x5-pentagon-scaled.step");
+ stdout.WriteLine(" edge-prismatic-x5-hexagon-scaled.step");
+ stdout.WriteLine(" edge-prismatic-x5-pentagon-asymmetric.step");
+ stdout.WriteLine($" {PrismaticSectionTransitionCorpusLab.DefaultSummaryFileName}");
+ stdout.WriteLine();
+ stdout.WriteLine("Production safety:");
+ stdout.WriteLine(" Experimental/lab-only route; no production route replacement, AirEdgeSweep, BrepBoundedChamfer, topology graft, 3D Boolean, and no coplanar merge.");
+ stdout.WriteLine();
+ stdout.WriteLine("Example:");
+ stdout.WriteLine(" aetheris experimental prismatic-corpus --out-dir artifacts/edge-prismatic-x5 --json");
+ }
+
private static void WriteAsmHelp(TextWriter stdout)
{
stdout.WriteLine("Execute flattened .firmasm assemblies as rigidly placed body instances, or export STEP interop packages.");
diff --git a/Aetheris.Firmament.FrictionLab/CIRLab/PrismaticSectionTransitionCorpusLab.cs b/Aetheris.Firmament.FrictionLab/CIRLab/PrismaticSectionTransitionCorpusLab.cs
new file mode 100644
index 00000000..1add541a
--- /dev/null
+++ b/Aetheris.Firmament.FrictionLab/CIRLab/PrismaticSectionTransitionCorpusLab.cs
@@ -0,0 +1,390 @@
+using Aetheris.Kernel.Core.Brep;
+using Aetheris.Kernel.Core.Step242;
+using CorePrismatic = Aetheris.Kernel.Core.Brep.Prismatic;
+
+namespace Aetheris.Firmament.FrictionLab.CIRLab;
+
+public sealed record PrismaticCorpusGuarantees(
+ bool NoProductionRouteReplacement,
+ bool NoAirEdgeSweep,
+ bool NoBrepBoundedChamfer,
+ bool NoTopologyGraft,
+ bool No3DBoolean,
+ bool NoCoplanarMerge);
+
+public sealed record PrismaticCorpusStepMarkerSummary(
+ IReadOnlyList<string> RequiredPresent,
+ IReadOnlyList<string> ForbiddenAbsent,
+ bool RequiredMarkersPresent,
+ bool ForbiddenMarkersAbsent,
+ IReadOnlyList<string> PresentMarkers,
+ IReadOnlyList<string> MissingRequiredMarkers,
+ IReadOnlyList<string> AbsentMarkers,
+ IReadOnlyList<string> UnexpectedPresentMarkers);
+
+public sealed record PrismaticCorpusTopologySummary(
+ bool BodyProduced,
+ int SectionCount,
+ int VertexCount,
+ int EdgeCount,
+ int FaceCount,
+ int PlanarFaceCount,
+ int CylindricalFaceCount,
+ int TransitionFaceCount,
+ int CapFaceCount,
+ int LoopCount,
+ int CoedgeCount,
+ int? LowerPrismSideFaceCount,
+ int? ChamferTransitionFaceCount,
+ string Bounds);
+
+public sealed record PrismaticCorpusCaseResult(
+ string CaseName,
+ string Status,
+ string? ArtifactPath,
+ string? ArtifactFileName,
+ string Route,
+ string TransitionRoute,
+ string EmitterComponentName,
+ string SplitPolicy,
+ PrismaticCorpusTopologySummary TopologySummary,
+ PrismaticCorpusStepMarkerSummary? StepMarkerSummary,
+ IReadOnlyList<string> Diagnostics,
+ IReadOnlyList<string> Errors,
+ PrismaticCorpusGuarantees Guarantees);
+
+public sealed record PrismaticSectionTransitionCorpusResult(
+ string Milestone,
+ string OutputDirectory,
+ string SummaryPath,
+ string Route,
+ string TransitionRoute,
+ string EmitterComponentName,
+ string SplitPolicy,
+ IReadOnlyList<PrismaticCorpusCaseResult> Cases,
+ IReadOnlyList<string> Diagnostics,
+ IReadOnlyList<string> Errors,
+ PrismaticCorpusGuarantees Guarantees);
+
+public static class PrismaticSectionTransitionCorpusLab
+{
+ public const string Milestone = "EDGE-PRISMATIC-X5";
+ public const string DefaultSummaryFileName = "edge-prismatic-x5-corpus.json";
+ public const string ExperimentalRoute = "experimental";
+ public const string TransitionRoute = "prismatic-section-transition";
+ public const string EmitterComponentName = "PrismaticSectionTransitionEmitter";
+ public const string SplitPolicy = "preserve-section-splits";
+
+ private static readonly string[] RequiredStepMarkers = ["ISO-10303-21", "MANIFOLD_SOLID_BREP", "ADVANCED_FACE", "PLANE"];
+ private static readonly string[] ForbiddenStepMarkers = ["CYLINDRICAL_SURFACE", "BREP_WITH_VOIDS"];
+ private static readonly PrismaticCorpusGuarantees DefaultGuarantees = new(
+ NoProductionRouteReplacement: true,
+ NoAirEdgeSweep: true,
+ NoBrepBoundedChamfer: true,
+ NoTopologyGraft: true,
+ No3DBoolean: true,
+ NoCoplanarMerge: true);
+
+ public static PrismaticSectionTransitionCorpusResult WriteEdgePrismaticX5Corpus(string outputDirectory)
+ {
+ if (string.IsNullOrWhiteSpace(outputDirectory))
+ {
+ throw new ArgumentException("Output directory is required.", nameof(outputDirectory));
+ }
+
+ var fullDirectory = Path.GetFullPath(outputDirectory);
+ Directory.CreateDirectory(fullDirectory);
+ var diagnostics = new List<string>
+ {
+ "edge-prismatic-x5-corpus-started",
+ "edge-prismatic-x5-no-production-route-replacement",
+ "edge-prismatic-x5-no-air-edge-sweep-used",
+ "edge-prismatic-x5-no-brep-bounded-chamfer-used",
+ "edge-prismatic-x5-no-topology-graft-used",
+ "edge-prismatic-x5-no-3d-boolean-used",
+ "edge-prismatic-x5-no-coplanar-merge-used",
+ };
+
+ var cases = new List<PrismaticCorpusCaseResult>
+ {
+ RunPrismaticCase(fullDirectory, "rectangle-inset", "edge-prismatic-x5-rectangle-inset.step", RectangleSection(0, 10, 8), RectangleSection(1, 8, 6), PrismaticCorrespondenceMap.Identity(4)),
+ RunTopEdgeChamferCase(fullDirectory),
+ RunPrismaticCase(fullDirectory, "pentagon-scaled", "edge-prismatic-x5-pentagon-scaled.step", RegularPolygonSection(0, 5, 5), RegularPolygonSection(2, 4, 5), PrismaticCorrespondenceMap.Identity(5)),
+ RunPrismaticCase(fullDirectory, "hexagon-scaled", "edge-prismatic-x5-hexagon-scaled.step", RegularPolygonSection(0, 6, 6), RegularPolygonSection(2, 4.5, 6), PrismaticCorrespondenceMap.Identity(6)),
+ RunPrismaticCase(fullDirectory, "pentagon-asymmetric", "edge-prismatic-x5-pentagon-asymmetric.step",
+ new PrismaticSection(0, [(-4, -2), (1, -3), (5, 0), (2, 3.5), (-3, 2.5)]),
+ new PrismaticSection(2, [(-3.25, -2.35), (1.75, -3.35), (5.75, -0.35), (2.75, 3.15), (-2.25, 2.15)]),
+ PrismaticCorrespondenceMap.Identity(5)),
+ RunDiagnosticCase("mismatched-vertex-count", [RectangleSection(0, 10, 8), RegularPolygonSection(1, 5, 5)], PrismaticCorrespondenceMap.Identity(4)),
+ RunDiagnosticCase("non-increasing-sections", [RectangleSection(0, 10, 8), RectangleSection(0, 8, 6)], PrismaticCorrespondenceMap.Identity(4)),
+ RunDiagnosticCase("invalid-self-intersecting-profile", [new PrismaticSection(0, [(0, 0), (2, 2), (0, 2), (2, 0)]), RectangleSection(1, 8, 6)], PrismaticCorrespondenceMap.Identity(4)),
+ RunDiagnosticCase("holes-deferred", [RectangleSection(0, 10, 8) with { HasHoles = true }, RectangleSection(1, 8, 6) with { HasHoles = true }], PrismaticCorrespondenceMap.Identity(4)),
+ RunDiagnosticCase("arcs-deferred", [RectangleSection(0, 10, 8) with { HasArcs = true }, RectangleSection(1, 8, 6) with { HasArcs = true }], PrismaticCorrespondenceMap.Identity(4)),
+ RunDiagnosticCase("multiple-loops-deferred", [RectangleSection(0, 10, 8) with { OuterLoopCount = 2 }, RectangleSection(1, 8, 6) with { OuterLoopCount = 2 }], PrismaticCorrespondenceMap.Identity(4)),
+ RunDiagnosticCase("missing-correspondence", [RectangleSection(0, 10, 8), RectangleSection(1, 8, 6)], null),
+ RunDiagnosticCase("non-identity-correspondence", [RectangleSection(0, 10, 8), RectangleSection(1, 8, 6)], new PrismaticCorrespondenceMap([1, 2, 3, 0])),
+ };
+
+ diagnostics.AddRange(cases.SelectMany(c => c.Diagnostics).Where(d => d.StartsWith("edge-prismatic-x5-", StringComparison.Ordinal)));
+ diagnostics.Add("edge-prismatic-x5-json-summary-written");
+
+ var summaryPath = Path.Combine(fullDirectory, DefaultSummaryFileName);
+ var result = new PrismaticSectionTransitionCorpusResult(
+ Milestone,
+ fullDirectory,
+ summaryPath,
+ ExperimentalRoute,
+ TransitionRoute,
+ EmitterComponentName,
+ SplitPolicy,
+ cases,
+ Stable(diagnostics),
+ cases.SelectMany(c => c.Errors).Distinct(StringComparer.Ordinal).OrderBy(x => x, StringComparer.Ordinal).ToArray(),
+ DefaultGuarantees);
+
+ File.WriteAllText(summaryPath, System.Text.Json.JsonSerializer.Serialize(result, new System.Text.Json.JsonSerializerOptions
+ {
+ WriteIndented = true,
+ PropertyNamingPolicy = System.Text.Json.JsonNamingPolicy.CamelCase,
+ Converters = { new System.Text.Json.Serialization.JsonStringEnumConverter() }
+ }));
+
+ return result;
+ }
+
+ private static PrismaticCorpusCaseResult RunPrismaticCase(string outputDirectory, string caseName, string artifactFileName, PrismaticSection bottom, PrismaticSection top, PrismaticCorrespondenceMap correspondence)
+ {
+ var diagnostics = CaseStartDiagnostics(caseName);
+ diagnostics.Add($"edge-prismatic-x5-prismatic-emitter-invoked:{caseName}");
+ var request = new CorePrismatic.PrismaticSectionTransitionRequest(
+ [ToCore(bottom), ToCore(top)],
+ new CorePrismatic.PrismaticCorrespondenceMap(correspondence.VertexMap),
+ new CorePrismatic.PrismaticSectionTransitionOptions(RunStepSmoke: true, TraceLabel: caseName));
+ var result = CorePrismatic.PrismaticSectionTransitionEmitter.Emit(request);
+ diagnostics.AddRange(result.Diagnostics);
+
+ if (result.Status != CorePrismatic.PrismaticSectionTransitionStatus.Succeeded || result.Body is null)
+ {
+ diagnostics.Add($"edge-prismatic-x5-case-failed:{caseName}:{result.Recommendation}");
+ return CreateCase(caseName, "failed", null, null, ToCorpusTopology(result.Topology), null, diagnostics, [result.Recommendation]);
+ }
+
+ var export = Step242Exporter.ExportBody(result.Body);
+ if (!export.IsSuccess || export.Value is null)
+ {
+ diagnostics.Add($"edge-prismatic-x5-case-failed:{caseName}:step-export");
+ return CreateCase(caseName, "failed", null, null, ToCorpusTopology(result.Topology), null, diagnostics, ["step-export-failed"]);
+ }
+
+ var artifactPath = Path.Combine(outputDirectory, artifactFileName);
+ File.WriteAllText(artifactPath, export.Value);
+ diagnostics.Add($"edge-prismatic-x5-step-artifact-written:{caseName}");
+ var step = SummarizeMarkers(export.Value);
+ if (step.RequiredMarkersPresent && step.ForbiddenMarkersAbsent)
+ {
+ diagnostics.Add($"edge-prismatic-x5-step-smoke-succeeded:{caseName}");
+ }
+
+ if (ValidateSplitTopology(result.Topology, bottom.OuterLoop.Count, 2))
+ {
+ diagnostics.Add($"edge-prismatic-x5-split-preserving-topology-validated:{caseName}");
+ }
+
+ return CreateCase(caseName, "succeeded", artifactPath, artifactFileName, ToCorpusTopology(result.Topology), step, diagnostics, []);
+ }
+
+ private static PrismaticCorpusCaseResult RunTopEdgeChamferCase(string outputDirectory)
+ {
+ const string caseName = "top-edge-chamfer";
+ const string artifactFileName = "edge-prismatic-x5-top-edge-chamfer.step";
+ var diagnostics = CaseStartDiagnostics(caseName);
+ diagnostics.Add($"edge-prismatic-x5-prismatic-emitter-invoked:{caseName}");
+ var row = PrismaticTopEdgeChamferLab.Run(new PrismaticTopEdgeChamferCase("canonical-top-pos-x-edge", 10, 8, 6, 1));
+ diagnostics.AddRange(row.Diagnostics);
+ var emitted = PrismaticTopEdgeChamferLab.TryEmitBody(new PrismaticTopEdgeChamferCase("canonical-top-pos-x-edge", 10, 8, 6, 1));
+ if (!row.Succeeded || emitted.Body is null)
+ {
+ diagnostics.Add($"edge-prismatic-x5-case-failed:{caseName}:{row.Recommendation}");
+ return CreateCase(caseName, "failed", null, null, ToCorpusTopology(row.Topology), null, diagnostics, [row.Recommendation]);
+ }
+
+ var export = Step242Exporter.ExportBody(emitted.Body);
+ if (!export.IsSuccess || export.Value is null)
+ {
+ diagnostics.Add($"edge-prismatic-x5-case-failed:{caseName}:step-export");
+ return CreateCase(caseName, "failed", null, null, ToCorpusTopology(row.Topology), null, diagnostics, ["step-export-failed"]);
+ }
+
+ var artifactPath = Path.Combine(outputDirectory, artifactFileName);
+ File.WriteAllText(artifactPath, export.Value);
+ diagnostics.Add($"edge-prismatic-x5-step-artifact-written:{caseName}");
+ var step = SummarizeMarkers(export.Value);
+ if (step.RequiredMarkersPresent && step.ForbiddenMarkersAbsent)
+ {
+ diagnostics.Add($"edge-prismatic-x5-step-smoke-succeeded:{caseName}");
+ }
+
+ if (row.Topology.VertexCount == 12 && row.Topology.EdgeCount == 20 && row.Topology.FaceCount == 10 && row.Topology.PlanarFaceCount == 10 && row.Topology.CylindricalFaceCount == 0 && row.Topology.TransitionFaceCount == 4 && row.Topology.ChamferTransitionFaceCount == 1 && row.Topology.LoopCount == 10 && row.Topology.CoedgeCount == 40)
+ {
+ diagnostics.Add($"edge-prismatic-x5-split-preserving-topology-validated:{caseName}");
+ }
+
+ return CreateCase(caseName, "succeeded", artifactPath, artifactFileName, ToCorpusTopology(row.Topology), step, diagnostics, []);
+ }
+
+ private static PrismaticCorpusCaseResult RunDiagnosticCase(string caseName, IReadOnlyList<PrismaticSection> sections, PrismaticCorrespondenceMap? correspondence)
+ {
+ var diagnostics = CaseStartDiagnostics(caseName);
+ var request = new CorePrismatic.PrismaticSectionTransitionRequest(
+ sections.Select(ToCore).ToArray(),
+ correspondence is null ? null : new CorePrismatic.PrismaticCorrespondenceMap(correspondence.VertexMap),
+ new CorePrismatic.PrismaticSectionTransitionOptions(RunStepSmoke: true, TraceLabel: caseName));
+ var result = CorePrismatic.PrismaticSectionTransitionEmitter.Emit(request);
+ diagnostics.AddRange(result.Diagnostics);
+ var status = result.Status switch
+ {
+ CorePrismatic.PrismaticSectionTransitionStatus.Deferred => "deferred",
+ CorePrismatic.PrismaticSectionTransitionStatus.Rejected => "rejected",
+ CorePrismatic.PrismaticSectionTransitionStatus.Succeeded => "failed",
+ _ => "failed",
+ };
+ var reason = ReasonFromDiagnostics(result.Diagnostics, result.Recommendation);
+ diagnostics.Add(status == "deferred"
+ ? $"edge-prismatic-x5-case-deferred:{caseName}:{reason}"
+ : $"edge-prismatic-x5-case-rejected:{caseName}:{reason}");
+
+ return CreateCase(caseName, status, null, null, ToCorpusTopology(result.Topology), null, diagnostics, status == "failed" ? [$"unexpected-status:{result.Status}"] : []);
+ }
+
+ private static PrismaticCorpusCaseResult CreateCase(
+ string caseName,
+ string status,
+ string? artifactPath,
+ string? artifactFileName,
+ PrismaticCorpusTopologySummary topology,
+ PrismaticCorpusStepMarkerSummary? step,
+ IEnumerable<string> diagnostics,
+ IReadOnlyList<string> errors) =>
+ new(
+ caseName,
+ status,
+ artifactPath,
+ artifactFileName,
+ ExperimentalRoute,
+ TransitionRoute,
+ EmitterComponentName,
+ SplitPolicy,
+ topology,
+ step,
+ Stable(diagnostics.Concat(GuaranteeDiagnostics())),
+ errors,
+ DefaultGuarantees);
+
+ private static List<string> CaseStartDiagnostics(string caseName) =>
+ [
+ $"edge-prismatic-x5-case-started:{caseName}",
+ "edge-prismatic-x5-no-production-route-replacement",
+ "edge-prismatic-x5-no-air-edge-sweep-used",
+ "edge-prismatic-x5-no-brep-bounded-chamfer-used",
+ "edge-prismatic-x5-no-topology-graft-used",
+ "edge-prismatic-x5-no-3d-boolean-used",
+ "edge-prismatic-x5-no-coplanar-merge-used",
+ ];
+
+ private static IEnumerable<string> GuaranteeDiagnostics() =>
+ [
+ "edge-prismatic-x5-no-production-route-replacement",
+ "edge-prismatic-x5-no-air-edge-sweep-used",
+ "edge-prismatic-x5-no-brep-bounded-chamfer-used",
+ "edge-prismatic-x5-no-topology-graft-used",
+ "edge-prismatic-x5-no-3d-boolean-used",
+ "edge-prismatic-x5-no-coplanar-merge-used",
+ ];
+
+ private static bool ValidateSplitTopology(CorePrismatic.PrismaticTransitionTopologySummary topology, int n, int sectionCount) =>
+ topology.SectionCount == sectionCount
+ && topology.VertexCount == sectionCount * n
+ && topology.EdgeCount == (sectionCount * n) + ((sectionCount - 1) * n)
+ && topology.FaceCount == 2 + ((sectionCount - 1) * n)
+ && topology.PlanarFaceCount == topology.FaceCount
+ && topology.CylindricalFaceCount == 0
+ && topology.TransitionFaceCount == (sectionCount - 1) * n
+ && topology.CapFaceCount == 2
+ && topology.LoopCount == topology.FaceCount
+ && topology.CoedgeCount == (2 * n) + (4 * (sectionCount - 1) * n);
+
+ private static PrismaticCorpusStepMarkerSummary SummarizeMarkers(string stepText)
+ {
+ var present = RequiredStepMarkers.Where(m => stepText.Contains(m, StringComparison.Ordinal)).ToArray();
+ var missing = RequiredStepMarkers.Except(present, StringComparer.Ordinal).ToArray();
+ var absent = ForbiddenStepMarkers.Where(m => !stepText.Contains(m, StringComparison.Ordinal)).ToArray();
+ var unexpected = ForbiddenStepMarkers.Where(m => stepText.Contains(m, StringComparison.Ordinal)).ToArray();
+ return new(RequiredStepMarkers, ForbiddenStepMarkers, missing.Length == 0, unexpected.Length == 0, present, missing, absent, unexpected);
+ }
+
+ private static PrismaticCorpusTopologySummary ToCorpusTopology(CorePrismatic.PrismaticTransitionTopologySummary t) => new(
+ t.BodyProduced,
+ t.SectionCount,
+ t.VertexCount,
+ t.EdgeCount,
+ t.FaceCount,
+ t.PlanarFaceCount,
+ t.CylindricalFaceCount,
+ t.TransitionFaceCount,
+ t.CapFaceCount,
+ t.LoopCount,
+ t.CoedgeCount,
+ LowerPrismSideFaceCount: null,
+ ChamferTransitionFaceCount: null,
+ t.Bounds);
+
+ private static PrismaticCorpusTopologySummary ToCorpusTopology(PrismaticTopEdgeChamferTopologySummary t) => new(
+ t.BodyProduced,
+ SectionCount: 3,
+ t.VertexCount,
+ t.EdgeCount,
+ t.FaceCount,
+ t.PlanarFaceCount,
+ t.CylindricalFaceCount,
+ t.TransitionFaceCount,
+ CapFaceCount: 2,
+ t.LoopCount,
+ t.CoedgeCount,
+ t.LowerPrismSideFaceCount,
+ t.ChamferTransitionFaceCount,
+ t.Bounds);
+
+ private static string ReasonFromDiagnostics(IReadOnlyList<string> diagnostics, string recommendation)
+ {
+ var requestDiagnostic = diagnostics.FirstOrDefault(d => d.StartsWith("edge-prismatic-v1-request-rejected:", StringComparison.Ordinal) || d.StartsWith("edge-prismatic-v1-request-deferred:", StringComparison.Ordinal));
+ if (requestDiagnostic is not null)
+ {
+ return requestDiagnostic[(requestDiagnostic.LastIndexOf(':') + 1)..];
+ }
+
+ return recommendation;
+ }
+
+ private static CorePrismatic.PrismaticSection ToCore(PrismaticSection section) => new(section.Z, section.OuterLoop, section.HasHoles, section.HasArcs, section.OuterLoopCount);
+
+ private static PrismaticSection RectangleSection(double z, double width, double depth)
+ {
+ var x = width * 0.5d;
+ var y = depth * 0.5d;
+ return new(z, [(-x, -y), (x, -y), (x, y), (-x, y)]);
+ }
+
+ private static PrismaticSection RegularPolygonSection(double z, double radius, int vertices)
+ {
+ var points = Enumerable.Range(0, vertices)
+ .Select(i =>
+ {
+ var a = ((Math.PI * 2d) * i / vertices) - (Math.PI * 0.5d);
+ return (X: Math.Cos(a) * radius, Y: Math.Sin(a) * radius);
+ })
+ .ToArray();
+ return new(z, points);
+ }
+
+ private static IReadOnlyList<string> Stable(IEnumerable<string> diagnostics) => diagnostics.Distinct(StringComparer.Ordinal).OrderBy(x => x, StringComparer.Ordinal).ToArray();
+}
diff --git a/docs/edge-a1-chamfer-fillet-support-compatibility-matrix.md b/docs/edge-a1-chamfer-fillet-support-compatibility-matrix.md
index 64553070..12e7d52b 100644
--- a/docs/edge-a1-chamfer-fillet-support-compatibility-matrix.md
+++ b/docs/edge-a1-chamfer-fillet-support-compatibility-matrix.md
@@ -142,7 +142,7 @@ This path is not production-authoritative. It does not support chains, corners,
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| CH-01 | concave/additive | plane-plane, orthogonal | single edge | constant chamfer distance | no corner | plane | `production-legacy-supported` where bounded internal concave route applies | `lab-supported`; `policy-supported` | EDGE-X1 inventory; EDGE-X2 concave planar patch proof; EDGE-X2.1 policy scaffold | production Air route, shadow parity, corpus | Legacy production only; Air is lab/policy evidence | Preserve legacy; use as concave AirChamfer baseline |
| CH-02 | concave/additive | plane-plane, non-orthogonal | single edge | constant chamfer distance | no corner | plane | `unknown/no-test` to `production-legacy-supported` only where existing bounded trusted contexts admit it | `lab-supported`; `policy-supported` | EDGE-X2.2 non-orthogonal concave planar policy+patch | production body mutation, feature-recognition parity, corpus | Not production Air-ready | Add parity/shadow fixture after convex route stabilizes |
-| CH-03 | convex/replacement | plane-plane, orthogonal controlled body | single edge | constant chamfer distance | no corner | plane | `production-legacy-supported` for legacy bounded box/simple contexts | `production-adjacent-air-prototype`; `shadow-supported`; `artifact-corpus-supported`; `closed-witness-supported`; `gated-opt-in-route-supported`; `profile-authored-lab-supported`; `profile-authored-production-adjacent-emitter-supported` for history-known vertical extrusion edges; `profile-stack-section-transition-lab-supported`, `prismatic-emitter-lab-supported`, and `prismatic-controlled-route-supported` for one history-known top +X horizontal edge fixture | EDGE-X3 through EDGE-X13, EDGE-V1/V2/V3/V4, EDGE-PROFILE-X1, EDGE-PROFILE-V1, EDGE-PROFILE-X2, EDGE-PRISMATIC-A0, EDGE-PRISMATIC-X1, EDGE-PRISMATIC-X2, EDGE-PRISMATIC-X3, EDGE-PRISMATIC-V1, EDGE-PRISMATIC-V2, CLI tests, FrictionLab AirChamfer tests, ProfileChamfer tests, ProfileStackChamfer tests, ProfileVertexChamfer tests, Firmament shadow-diagnostics and opt-in route tests | default production authority, arbitrary body mutation beyond controlled fixture, production-adjacent profile chamfer admission, production-authoritative route admission, validation hardening, and recognition parity | Best current AirChamfer row for no-history/local-edge fixtures; EDGE-PROFILE-X1 proves history-known vertical-edge chamfer can be emitted as profile extrusion; EDGE-PROFILE-V1 packages that path as an internal production-adjacent emitter, still not production-authoritative; EDGE-PROFILE-X2 proves one top horizontal +X side chamfer can be emitted as a lab-only all-planar section-transition witness and records current profile-stack polygon/ruled-transition blockers; EDGE-PRISMATIC-A0 classifies top/bottom/horizontal history-known chamfers under the prismatic section-transition roadmap; EDGE-PRISMATIC-X1 supplies the reusable lab emitter; EDGE-PRISMATIC-X2 confirms the top-edge witness through that emitter; EDGE-PRISMATIC-V1 packages the internal emitter seam; EDGE-PRISMATIC-V2 consumes it in a controlled internal top-edge chamfer route with matching topology and STEP smoke | Run EDGE-PRISMATIC-X4 split/merge policy audit or add a profile/prismatic artifact corpus before any production-authoritative prismatic top-edge chamfer route admission |
+| CH-03 | convex/replacement | plane-plane, orthogonal controlled body | single edge | constant chamfer distance | no corner | plane | `production-legacy-supported` for legacy bounded box/simple contexts | `production-adjacent-air-prototype`; `shadow-supported`; `artifact-corpus-supported`; `closed-witness-supported`; `gated-opt-in-route-supported`; `profile-authored-lab-supported`; `profile-authored-production-adjacent-emitter-supported` for history-known vertical extrusion edges; `profile-stack-section-transition-lab-supported`, `prismatic-emitter-lab-supported`, `prismatic-controlled-route-supported`, and `prismatic-artifact-corpus-supported` for split-preserving first-scope section transitions and one history-known top +X horizontal edge fixture | EDGE-X3 through EDGE-X13, EDGE-V1/V2/V3/V4, EDGE-PROFILE-X1, EDGE-PROFILE-V1, EDGE-PROFILE-X2, EDGE-PRISMATIC-A0, EDGE-PRISMATIC-X1, EDGE-PRISMATIC-X2, EDGE-PRISMATIC-X3, EDGE-PRISMATIC-V1, EDGE-PRISMATIC-V2, EDGE-PRISMATIC-X4, EDGE-PRISMATIC-X5, CLI tests, FrictionLab AirChamfer tests, ProfileChamfer tests, ProfileStackChamfer tests, ProfileVertexChamfer tests, Firmament shadow-diagnostics and opt-in route tests | default production authority, arbitrary body mutation beyond controlled fixture, production-adjacent profile chamfer admission, production-authoritative route admission, validation hardening, and recognition parity | Best current AirChamfer row for no-history/local-edge fixtures; EDGE-PROFILE-X1 proves history-known vertical-edge chamfer can be emitted as profile extrusion; EDGE-PROFILE-V1 packages that path as an internal production-adjacent emitter, still not production-authoritative; EDGE-PROFILE-X2 proves one top horizontal +X side chamfer can be emitted as a lab-only all-planar section-transition witness and records current profile-stack polygon/ruled-transition blockers; EDGE-PRISMATIC-A0 classifies top/bottom/horizontal history-known chamfers under the prismatic section-transition roadmap; EDGE-PRISMATIC-X1 supplies the reusable lab emitter; EDGE-PRISMATIC-X2 confirms the top-edge witness through that emitter; EDGE-PRISMATIC-V1 packages the internal emitter seam; EDGE-PRISMATIC-V2 consumes it in a controlled internal top-edge chamfer route with matching topology and STEP smoke; EDGE-PRISMATIC-X4 fixes split preservation as the default policy; EDGE-PRISMATIC-X5 adds deterministic split-preserving STEP/JSON corpus evidence | Run EDGE-PRISMATIC-X6 gated corpus stability before any production-authoritative prismatic top-edge chamfer route admission |
| CH-04 | convex/replacement | plane-plane, non-orthogonal controlled body | single edge | constant chamfer distance | no corner | plane | `production-legacy-supported` only for admitted trusted/triangle-like bounded contexts; otherwise `unknown/no-test` | `shadow-supported`; `artifact-corpus-supported`; `production-adjacent-air-prototype` for safe controlled case | EDGE-X11 non-orthogonal corpus row; EDGE-X12 stability; EDGE-V3 shadow route | broader topology mutation, richer feature-recognition parity, production fallback | Non-authoritative controlled evidence only | Harden controlled non-orthogonal shadow diagnostics |
| CH-05 | convex/replacement | plane-plane | single edge on arbitrary production body | constant chamfer distance | no corner or endpoint transition as needed | plane | `production-legacy-supported` only for legacy recognized bounded cases | `deferred`; `blocked-by-body-mutation`; partial `production-adjacent-air-prototype` for controlled body | EDGE-V2/V3 controlled prototype and shadow docs | arbitrary edge selection, grafting, identity, regression corpus | Not production Air-ready | EDGE-X15 convex AirChamfer controlled body mutation hardening |
| CH-06 | convex/replacement | plane-plane | edge chain | constant chamfer distance | chain termination; endpoint transitions | plane sequence plus transition patches | legacy support is bounded/contextual; generic status `unknown/no-test` | `deferred`; `blocked-by-corner-policy`; `blocked-by-body-mutation` | EDGE-V3 deferred edge-chain diagnostics; EDGE-X1 notes | chain policy, termination policy, topology plan, feature-recognition parity | Not ready | EDGE-X16 AirChamfer edge-chain policy lab |
@@ -244,10 +244,11 @@ Recommended post-EDGE-X13 roadmap:
6. **EDGE-PRISMATIC-X1**: completed as a lab-only first-scope `PrismaticSectionTransitionEmitter` proof for two/three Z-stacked line-only outer sections with explicit identity correspondence, closed planar BRep emission, split transition intervals, STEP smoke, and deterministic invalid/deferred diagnostics. This upgrades the evidence base for prismatic section transitions but does not change production chamfer/fillet behavior, current `ProfileStackExtrudeExecutor` behavior, AirEdgeSweep, `BrepBoundedChamfer`, STEP exporter/importer code, Boolean core code, triangle migration, sketch solving, clipping, or NURBS/freeform support.
7. **EDGE-PRISMATIC-X2**: completed as a lab-only top `+X` horizontal edge chamfer proof through the X1 prismatic emitter, preserving the EDGE-PROFILE-X2 topology and STEP witness while replacing the one-off Route B proof path.
8. **EDGE-PRISMATIC-X3/V1/V2**: completed as generic line-only emitter evidence, internal emitter packaging, and a controlled top `+X` horizontal chamfer route through the packaged emitter.
-9. **EDGE-CORNER-X1**: manifest-driven single-corner chamfer reconstruction lab.
-10. **EDGE-FILLET-A0**: AirFillet architecture audit focused on bounded constant-radius analytic scope.
-11. **EDGE-X14**: plane-plane constant-radius AirFillet cylindrical closed witness lab.
-12. **EDGE-X15+ / EDGE-V paths**: continue controlled no-history/local-edge AirChamfer hardening only where shadow diagnostics and production-readiness gates remain stable.
+9. **EDGE-PRISMATIC-X4/X5**: completed as the coplanar split/merge policy audit and deterministic split-preserving STEP/JSON artifact corpus. X5 records rectangle inset, top-edge chamfer, pentagon, hexagon, asymmetric pentagon, and JSON-only invalid/deferred diagnostics without production routing.
+10. **EDGE-CORNER-X1**: manifest-driven single-corner chamfer reconstruction lab.
+11. **EDGE-FILLET-A0**: AirFillet architecture audit focused on bounded constant-radius analytic scope.
+12. **EDGE-X14**: plane-plane constant-radius AirFillet cylindrical closed witness lab.
+13. **EDGE-X15+ / EDGE-V paths**: continue controlled no-history/local-edge AirChamfer hardening only where shadow diagnostics and production-readiness gates remain stable.
The roadmap should be adjusted by evidence. If a row reveals recognizer divergence, legacy topology mismatch, or body-mutation instability, the next milestone should narrow to that blocker rather than broadening support claims.
@@ -278,9 +279,9 @@ This milestone does not include:
## EDGE-PRISMATIC-V1 status note
-The prismatic section-transition row is now **internal production-adjacent / not routed** for Z-axis two/three-section, line-only, one-outer-loop, no-hole, equal-count identity-correspondence transitions. Rectangle, pentagon, hexagon, asymmetric pentagon, and stable+transition rectangle cases validate the split-preserving topology formula and STEP smoke through the existing exporter. EDGE-PRISMATIC-X4 records split preservation as the current prismatic contract: coplanar section-boundary faces are semantic output by default, not merge candidates inside the emitter. No production chamfer/fillet behavior, ProfileStack behavior, STEP exporter/importer behavior, Boolean core behavior, AirEdgeSweep behavior, public API, triangle migration, sketch solver, clipping engine, or NURBS/freeform support changed.
+The prismatic section-transition row is now **internal production-adjacent / not routed** for Z-axis two/three-section, line-only, one-outer-loop, no-hole, equal-count identity-correspondence transitions. Rectangle, pentagon, hexagon, asymmetric pentagon, and stable+transition rectangle cases validate the split-preserving topology formula and STEP smoke through the existing exporter. EDGE-PRISMATIC-X4 records split preservation as the current prismatic contract: coplanar section-boundary faces are semantic output by default, not merge candidates inside the emitter. EDGE-PRISMATIC-X5 adds artifact-corpus evidence for the same split-preserving contract by writing deterministic STEP files and JSON summaries for successful rectangle, polygon, asymmetric polygon, and top-edge chamfer cases plus JSON-only invalid/deferred diagnostics. No production chamfer/fillet behavior, ProfileStack behavior, STEP exporter/importer behavior, Boolean core behavior, AirEdgeSweep behavior, public API, triangle migration, sketch solver, clipping engine, or NURBS/freeform support changed.
## EDGE-PRISMATIC-V2 status note
-The top/horizontal history-known chamfer row now has an **internal controlled route / not production-authoritative** witness for the rectangular-prism top `+X` side case. `PrismaticTopEdgeChamferPrototype` accepts controlled dimensions and chamfer distance, validates the supported selection, builds the canonical three-section stack, invokes `PrismaticSectionTransitionEmitter`, produces a closed all-planar BRep with the expected 12 vertices, 20 edges, 10 faces, 10 loops, and 40 coedges, and passes STEP smoke through the existing exporter. No production chamfer/fillet behavior, production route replacement, current `ProfileStackExtrudeExecutor` behavior, STEP exporter/importer behavior, Boolean core behavior, AirEdgeSweep behavior, public API, triangle migration, sketch solver, clipping engine, or NURBS/freeform support changed.
+The top/horizontal history-known chamfer row now has an **internal controlled route / not production-authoritative** witness for the rectangular-prism top `+X` side case. `PrismaticTopEdgeChamferPrototype` accepts controlled dimensions and chamfer distance, validates the supported selection, builds the canonical three-section stack, invokes `PrismaticSectionTransitionEmitter`, produces a closed all-planar BRep with the expected 12 vertices, 20 edges, 10 faces, 10 loops, and 40 coedges, passes STEP smoke through the existing exporter, and is now included in the EDGE-PRISMATIC-X5 corpus as `edge-prismatic-x5-top-edge-chamfer.step` with split-preserving topology asserted. No production chamfer/fillet behavior, production route replacement, current `ProfileStackExtrudeExecutor` behavior, STEP exporter/importer behavior, Boolean core behavior, AirEdgeSweep behavior, public API, triangle migration, sketch solver, clipping engine, or NURBS/freeform support changed.
diff --git a/docs/edge-prismatic-v1-section-transition-emitter.md b/docs/edge-prismatic-v1-section-transition-emitter.md
index 4fd7aa2f..8048538b 100644
--- a/docs/edge-prismatic-v1-section-transition-emitter.md
+++ b/docs/edge-prismatic-v1-section-transition-emitter.md
@@ -184,3 +184,7 @@ Recommended next steps are either:
- EDGE-PRISMATIC-V2 controlled top-edge chamfer route evaluation through this seam; or
- EDGE-PRISMATIC-X4 coplanar split/merge policy audit before any route replacement is considered.
+
+## 11. EDGE-PRISMATIC-X5 corpus evidence note
+
+EDGE-PRISMATIC-X5 records artifact-corpus evidence for the internal `PrismaticSectionTransitionEmitter` seam. The experimental CLI corpus route writes split-preserving STEP artifacts for two-section rectangle, pentagon, hexagon, and asymmetric pentagon transitions, records JSON-only diagnostics for rejected/deferred inputs, and asserts the no-AirEdgeSweep/no-BrepBoundedChamfer/no-topology-graft/no-3D-Boolean/no-coplanar-merge guarantees. This is corpus evidence only; it does not promote the emitter to a production route.
diff --git a/docs/edge-prismatic-v2-controlled-top-edge-chamfer-route.md b/docs/edge-prismatic-v2-controlled-top-edge-chamfer-route.md
index bda69d3a..942c63f9 100644
--- a/docs/edge-prismatic-v2-controlled-top-edge-chamfer-route.md
+++ b/docs/edge-prismatic-v2-controlled-top-edge-chamfer-route.md
@@ -171,3 +171,7 @@ Because EDGE-PRISMATIC-V1 packaging already exists and V2 successfully consumes
1. EDGE-PRISMATIC-X4 coplanar split/merge policy audit, especially around when stable and transition interval faces may or may not merge;
2. EDGE-PROFILE/PRISMATIC artifact corpus for stable STEP/topology regression evidence if this controlled route remains stable;
3. a narrowly scoped route-hardening milestone that keeps production authority unchanged while adding feature-recognition/parity evidence for this exact history-known top-edge case.
+
+## 11. EDGE-PRISMATIC-X5 corpus evidence note
+
+EDGE-PRISMATIC-X5 includes the controlled top `+X` edge chamfer route in the split-preserving artifact corpus as `edge-prismatic-x5-top-edge-chamfer.step`. The corpus asserts the V2 topology contract of 12 vertices, 20 edges, 10 all-planar faces, 4 lower prism side faces, 4 transition faces, 1 chamfer transition face, 10 loops, and 40 coedges, with STEP smoke markers present and cylindrical/void markers absent. This remains experimental corpus evidence and does not change production chamfer routing.
diff --git a/docs/edge-prismatic-x4-coplanar-split-merge-policy-audit.md b/docs/edge-prismatic-x4-coplanar-split-merge-policy-audit.md
index 651373d8..a8cf012c 100644
--- a/docs/edge-prismatic-x4-coplanar-split-merge-policy-audit.md
+++ b/docs/edge-prismatic-x4-coplanar-split-merge-policy-audit.md
@@ -191,3 +191,7 @@ This milestone does not include:
- geometry implementation;
- triangle migration retry;
- sketch solver, clipping engine, NURBS, or freeform support.
+
+## 11. EDGE-PRISMATIC-X5 corpus evidence note
+
+EDGE-PRISMATIC-X5 adds a split-preserving artifact corpus for the prismatic section-transition lane. The corpus writes deterministic STEP artifacts for rectangle inset, top `+X` edge chamfer, scaled pentagon, scaled hexagon, and asymmetric pentagon cases, plus JSON-only invalid/deferred diagnostics. Its topology assertions intentionally use the X4 policy: section-boundary split faces are preserved by default, and coplanar merging remains a future optional post-emission optimization only.
diff --git a/docs/frictionlab/edge-prismatic-x5-section-transition-artifact-corpus.md b/docs/frictionlab/edge-prismatic-x5-section-transition-artifact-corpus.md
new file mode 100644
index 00000000..5a6f1c93
--- /dev/null
+++ b/docs/frictionlab/edge-prismatic-x5-section-transition-artifact-corpus.md
@@ -0,0 +1,222 @@
+# EDGE-PRISMATIC-X5 — Prismatic section-transition artifact corpus
+
+## 1. Purpose and scope
+
+EDGE-PRISMATIC-X5 adds a deterministic artifact corpus for the split-preserving prismatic section-transition lane. The corpus is evidence-producing only: it writes repeatable STEP artifacts for successful first-scope prismatic transition cases and writes JSON-only rows for invalid or deferred cases.
+
+This milestone does **not** production-route prismatic chamfer behavior. It exercises the internal/lab `PrismaticSectionTransitionEmitter` path and the existing STEP exporter as a smoke oracle, while preserving the EDGE-PRISMATIC-X4 rule that section-boundary split faces are semantic output.
+
+## 2. References
+
+- `docs/aetheris-v2-sweep-first-architecture.md` — V2 architecture doctrine.
+- `docs/aetheris-v2-a1-resolved-profile2d-contract.md` — resolved `Profile2D` contract.
+- `docs/edge-a2-constructive-chamfer-reframing-audit.md` — constructive chamfer reframing audit.
+- `docs/edge-prismatic-a0-section-transition-contract-audit.md` — prismatic section-transition contract/audit.
+- `docs/frictionlab/edge-prismatic-x1-section-transition-emitter-lab.md` — first lab emitter proof.
+- `docs/frictionlab/edge-prismatic-x2-top-edge-chamfer-through-prismatic-emitter-lab.md` — top `+X` edge chamfer proof.
+- `docs/frictionlab/edge-prismatic-x3-generic-line-profile-transition-lab.md` — generic equal-count polygon proof.
+- `docs/edge-prismatic-v1-section-transition-emitter.md` — internal emitter seam.
+- `docs/edge-prismatic-v2-controlled-top-edge-chamfer-route.md` — controlled top-edge chamfer route.
+- `docs/edge-prismatic-x4-coplanar-split-merge-policy-audit.md` — split/merge policy; split preservation remains the default.
+
+## 3. Corpus command
+
+The chosen route is an experimental CLI hook:
+
+```bash
+aetheris experimental prismatic-corpus --out-dir <dir> [--json]
+```
+
+The command is implemented as a lab-only artifact writer behind the CLI. It is intentionally not a production build/analyze/chamfer route.
+
+## 4. Artifact filenames and path convention
+
+The command writes all artifacts under the supplied output directory. Successful cases write STEP files plus the shared JSON summary. Invalid or deferred cases write only JSON rows.
+
+Successful STEP filenames:
+
+- `edge-prismatic-x5-rectangle-inset.step`
+- `edge-prismatic-x5-top-edge-chamfer.step`
+- `edge-prismatic-x5-pentagon-scaled.step`
+- `edge-prismatic-x5-hexagon-scaled.step`
+- `edge-prismatic-x5-pentagon-asymmetric.step`
+
+Shared JSON summary filename:
+
+- `edge-prismatic-x5-corpus.json`
+
+## 5. Corpus case list
+
+Successful artifact cases:
+
+1. `rectangle-inset` — rectangle to centered inset rectangle.
+2. `top-edge-chamfer` — controlled top `+X` edge chamfer represented as a three-section prismatic transition.
+3. `pentagon-scaled` — regular pentagon to scaled regular pentagon.
+4. `hexagon-scaled` — regular hexagon to scaled regular hexagon.
+5. `pentagon-asymmetric` — translated asymmetric pentagon from the X3 stable case.
+
+JSON-only diagnostic cases:
+
+- `mismatched-vertex-count` — rejected.
+- `non-increasing-sections` — rejected.
+- `invalid-self-intersecting-profile` — rejected.
+- `holes-deferred` — deferred.
+- `arcs-deferred` — deferred.
+- `multiple-loops-deferred` — deferred.
+- `missing-correspondence` — rejected.
+- `non-identity-correspondence` — rejected until correspondence hardening exists.
+
+## 6. JSON summary schema
+
+The JSON summary contains:
+
+- `milestone`: `EDGE-PRISMATIC-X5`.
+- `outputDirectory` and `summaryPath`.
+- `route`: `experimental`.
+- `transitionRoute`: `prismatic-section-transition`.
+- `emitterComponentName`: `PrismaticSectionTransitionEmitter`.
+- `splitPolicy`: `preserve-section-splits`.
+- `cases`: one row per corpus case.
+- root `diagnostics` and root `errors`.
+- root `guarantees`.
+
+Each case row contains:
+
+- `caseName`.
+- `status`: `succeeded`, `rejected`, `deferred`, or `failed`.
+- `artifactPath` and `artifactFileName` when a STEP file is written; `null` for JSON-only diagnostic rows.
+- `route`, `transitionRoute`, `emitterComponentName`, and `splitPolicy`.
+- `topologySummary` with section, vertex, edge, face, planar-face, cylindrical-face, transition-face, cap-face, loop, coedge, and bounds fields. The top-edge chamfer row also records lower prism side faces and chamfer transition faces.
+- `stepMarkerSummary` for successful STEP rows, including required-present and forbidden-absent marker checks.
+- deterministic `diagnostics`.
+- case-local `errors`.
+- case-local `guarantees`.
+
+## 7. Split-preserving topology contracts
+
+The corpus asserts the current split-preserving topology, not a future merged topology.
+
+### Rectangle to inset rectangle
+
+- section count = `2`
+- vertices = `8`
+- edges = `12`
+- faces = `6`
+- planar faces = `6`
+- cylindrical faces = `0`
+- transition faces = `4`
+- cap faces = `2`
+- loops = `6`
+- coedges = `24`
+
+### Top `+X` edge chamfer
+
+- section count = `3`
+- vertices = `12`
+- edges = `20`
+- faces = `10`
+- planar faces = `10`
+- cylindrical faces = `0`
+- lower prism side faces = `4`
+- transition faces = `4`
+- chamfer transition faces = `1`
+- cap faces = `2`
+- loops = `10`
+- coedges = `40`
+
+### Pentagon to scaled pentagon
+
+- section count = `2`
+- vertices = `10`
+- edges = `15`
+- faces = `7`
+- planar faces = `7`
+- cylindrical faces = `0`
+- transition faces = `5`
+- cap faces = `2`
+- loops = `7`
+- coedges = `30`
+
+### Hexagon to scaled hexagon
+
+- section count = `2`
+- vertices = `12`
+- edges = `18`
+- faces = `8`
+- planar faces = `8`
+- cylindrical faces = `0`
+- transition faces = `6`
+- cap faces = `2`
+- loops = `8`
+- coedges = `36`
+
+### Asymmetric pentagon
+
+The asymmetric pentagon follows the same `n = 5` formula as the scaled pentagon: `10` vertices, `15` edges, `7` faces, `5` transition faces, `2` cap faces, `7` loops, and `30` coedges.
+
+## 8. STEP marker expectations
+
+Successful STEP artifacts must contain:
+
+- `ISO-10303-21`
+- `MANIFOLD_SOLID_BREP`
+- `ADVANCED_FACE`
+- `PLANE`
+
+Successful STEP artifacts must not contain:
+
+- `CYLINDRICAL_SURFACE`
+- `BREP_WITH_VOIDS`
+
+These are smoke checks only. EDGE-PRISMATIC-X5 does not change STEP exporter/importer behavior.
+
+## 9. Invalid/deferred behavior
+
+Invalid and deferred rows are machine-checkable JSON diagnostics. They do not write STEP files, even if an output directory exists. Rejected rows prove bounded validation failure. Deferred rows preserve explicit future-work boundaries for holes, arcs, and multiple loops.
+
+## 10. Guarantees
+
+The X5 corpus route guarantees:
+
+- no production route replacement;
+- no AirEdgeSweep use;
+- no BrepBoundedChamfer use;
+- no topology graft/body mutation;
+- no 3D Boolean fallback;
+- no coplanar merge;
+- no trim engine, sketch solver, clipping engine, NURBS/freeform support, or triangle migration retry.
+
+## 11. Non-goals
+
+EDGE-PRISMATIC-X5 intentionally does not add:
+
+- production routing;
+- merge mode or coplanar simplification;
+- STEP exporter/importer changes;
+- Boolean core changes;
+- current `ProfileStackExtrudeExecutor` behavior changes;
+- AirEdgeSweep behavior changes;
+- BrepBoundedChamfer behavior changes;
+- public API changes.
+
+## 12. Tests run
+
+Focused validation for this milestone:
+
+```bash
+dotnet run --project Aetheris.CLI --framework net10.0 -- --help
+dotnet run --project Aetheris.CLI --framework net10.0 -- experimental prismatic-corpus --out-dir "$tmp/edge-prismatic-x5" --json
+dotnet test Aetheris.CLI.Tests/Aetheris.CLI.Tests.csproj --filter "Prismatic|AirChamfer|Experimental|Lab|Step|CliBaseline|Export|Corpus"
+dotnet test Aetheris.FrictionLab.Tests/Aetheris.FrictionLab.Tests.csproj -c Release -f net10.0 --filter "PrismaticSectionTransition|PrismaticTopEdgeChamfer|ProfileStackChamfer|ProfileChamfer|ProfileStack|LineArcProfileExtrude|Profile2D|AirChamfer|EdgeSweep|CIRLab"
+dotnet test Aetheris.Kernel.Core.Tests/Aetheris.Kernel.Core.Tests.csproj --filter "Chamfer|Fillet|Corner|BrepPrimitives|BrepExtrude|Step242|Primitive|Extrude|Boolean|SafeComposition"
+dotnet test Aetheris.Kernel.Firmament.Tests/Aetheris.Kernel.Firmament.Tests.csproj --filter "Chamfer|Fillet|Corner|ProfileStack|LineArcProfileExtrude|FirmamentPrimitive|FirmamentStepExporter|SemanticRecovery|FrepMaterializer|Rematerialize"
+```
+
+## 13. Recommended next milestone
+
+Recommended next milestone: **EDGE-PRISMATIC-X6 gated corpus stability check**. That gate should run repeated corpus generations, compare JSON-significant fields and STEP hashes, and keep the split-preserving artifact contract stable before any production-route discussion resumes.
+
+Alternative future milestones remain valid after X6:
+
+- **EDGE-PRISMATIC-X7 optional coplanar merge proof lab**, if a gated simplification lane is desired.
+- Return to chamfer/fillet production-route work after the corpus is stable and route admission criteria are explicit.