Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel
Add top face loop chamfer prismatic lab
Yuechen Lif406c5442f7a
diff --git a/Aetheris.Firmament.FrictionLab/CIRLab/TopFaceLoopChamferPrismaticLab.cs b/Aetheris.Firmament.FrictionLab/CIRLab/TopFaceLoopChamferPrismaticLab.csnew file mode 100644index 00000000..0cf26398--- /dev/null+++ b/Aetheris.Firmament.FrictionLab/CIRLab/TopFaceLoopChamferPrismaticLab.cs@@ -0,0 +1,199 @@+using CorePrismatic = Aetheris.Kernel.Core.Brep.Prismatic;++namespace Aetheris.Firmament.FrictionLab.CIRLab;++public enum FaceLoopChamferSelectionKind+{+ FaceBoundaryLoop,+ OpenChain,+ ArbitraryGraph,+}++public enum FaceLoopChamferOwningFaceKind+{+ TopCap,+ BottomCap,+ SideFace,+ NonPlanarFace,+}++public enum FaceLoopChamferLoopKind+{+ Outer,+ Inner,+}++public enum FaceLoopChamferRuleKind+{+ UniformSymmetric,+ NonUniform,+}++public sealed record FaceLoopChamferSelection(+ FaceLoopChamferSelectionKind SelectionKind = FaceLoopChamferSelectionKind.FaceBoundaryLoop,+ FaceLoopChamferOwningFaceKind OwningFace = FaceLoopChamferOwningFaceKind.TopCap,+ FaceLoopChamferLoopKind LoopKind = FaceLoopChamferLoopKind.Outer,+ bool IsClosed = true,+ int EdgeCount = 4,+ bool OrderedCoedges = true);++public sealed record TopFaceLoopChamferCase(+ string Name,+ double Width,+ double Depth,+ double Height,+ double ChamferDistance,+ FaceLoopChamferSelection? Selection = null,+ FaceLoopChamferRuleKind Rule = FaceLoopChamferRuleKind.UniformSymmetric);++public sealed record FaceLoopChamferTopologySummary(+ bool BodyProduced,+ int SectionCount,+ int VertexCount,+ int EdgeCount,+ int FaceCount,+ int PlanarFaceCount,+ int CylindricalFaceCount,+ int CapFaceCount,+ int LowerPrismSideFaceCount,+ int TransitionFaceCount,+ int ChamferTransitionFaceCount,+ int LoopCount,+ int CoedgeCount,+ string Bounds);++public sealed record FaceLoopChamferStepSummary(+ bool Exported,+ IReadOnlyList<string> PresentMarkers,+ IReadOnlyList<string> MissingRequiredMarkers,+ IReadOnlyList<string> AbsentMarkers,+ IReadOnlyList<string> UnexpectedPresentMarkers);++public sealed record FaceLoopChamferRow(+ string CaseName,+ LabProfileStatus Status,+ bool Succeeded,+ bool PrismaticEmitterInvoked,+ FaceLoopChamferTopologySummary Topology,+ FaceLoopChamferStepSummary Step,+ IReadOnlyList<string> Diagnostics,+ string Recommendation);++public static class TopFaceLoopChamferPrismaticLab+{+ public static readonly string[] AllowedRecommendations =+ [+ "face-loop-chamfer-ready-for-corpus",+ "face-loop-chamfer-needs-loop-selection-hardening",+ "face-loop-chamfer-needs-corner-policy-hardening",+ "face-loop-chamfer-invalid-rejected",+ "face-loop-chamfer-deferred",+ ];++ public static IReadOnlyList<FaceLoopChamferRow> RunAll() =>+ [+ Run(new("canonical-top-face-outer-loop", 10, 8, 6, 1)),+ Run(new("larger-valid-top-face-outer-loop", 10, 8, 6, 2)),+ Run(new("non-square-valid-top-face-outer-loop", 12, 5, 7, 1)),+ Run(new("invalid-zero-width", 0, 8, 6, 1)),+ Run(new("invalid-negative-depth", 10, -8, 6, 1)),+ Run(new("invalid-zero-height", 10, 8, 0, 1)),+ Run(new("invalid-non-finite-width", double.NaN, 8, 6, 1)),+ Run(new("invalid-zero-chamfer-distance", 10, 8, 6, 0)),+ Run(new("invalid-negative-chamfer-distance", 10, 8, 6, -1)),+ Run(new("invalid-non-finite-chamfer-distance", 10, 8, 6, double.PositiveInfinity)),+ Run(new("invalid-too-large-chamfer-distance", 10, 8, 6, 4)),+ Run(new("invalid-non-closed-loop", 10, 8, 6, 1, new(IsClosed: false))),+ Run(new("deferred-inner-loop", 10, 8, 6, 1, new(LoopKind: FaceLoopChamferLoopKind.Inner))),+ Run(new("deferred-open-chain", 10, 8, 6, 1, new(SelectionKind: FaceLoopChamferSelectionKind.OpenChain))),+ Run(new("rejected-arbitrary-graph", 10, 8, 6, 1, new(SelectionKind: FaceLoopChamferSelectionKind.ArbitraryGraph))),+ Run(new("rejected-non-uniform-rule", 10, 8, 6, 1, Rule: FaceLoopChamferRuleKind.NonUniform)),+ Run(new("deferred-non-planar-owning-face", 10, 8, 6, 1, new(OwningFace: FaceLoopChamferOwningFaceKind.NonPlanarFace))),+ ];++ public static FaceLoopChamferRow Run(TopFaceLoopChamferCase c)+ {+ var request = new CorePrismatic.PrismaticTopFaceLoopChamferRequest(+ c.Width,+ c.Depth,+ c.Height,+ c.ChamferDistance,+ c.Selection is null ? null : new CorePrismatic.FaceLoopChamferSelection(+ ToCore(c.Selection.SelectionKind),+ ToCore(c.Selection.OwningFace),+ ToCore(c.Selection.LoopKind),+ c.Selection.IsClosed,+ c.Selection.EdgeCount,+ c.Selection.OrderedCoedges),+ ToCore(c.Rule),+ ExportStep: true);+ var result = CorePrismatic.PrismaticTopFaceLoopChamferPrototype.Emit(request);+ return new(+ c.Name,+ ToLabStatus(result.Status),+ result.Succeeded,+ result.Diagnostics.Contains("edge-loop-x1-prismatic-emitter-invoked"),+ ToLabTopology(result.Topology),+ ToLabStep(result.Step),+ result.Diagnostics,+ result.Recommendation);+ }++ public static IReadOnlyList<PrismaticSection> CreateSectionStack(TopFaceLoopChamferCase c) =>+ CorePrismatic.PrismaticTopFaceLoopChamferPrototype.CreateSectionStack(new CorePrismatic.PrismaticTopFaceLoopChamferRequest(c.Width, c.Depth, c.Height, c.ChamferDistance))+ .Select(s => new PrismaticSection(s.Z, s.OuterLoop, s.HasHoles, s.HasArcs, s.OuterLoopCount))+ .ToArray();++ private static LabProfileStatus ToLabStatus(CorePrismatic.FaceLoopChamferStatus status) => status switch+ {+ CorePrismatic.FaceLoopChamferStatus.Succeeded => LabProfileStatus.Succeeded,+ CorePrismatic.FaceLoopChamferStatus.Deferred => LabProfileStatus.Deferred,+ _ => LabProfileStatus.Failed,+ };++ private static FaceLoopChamferTopologySummary ToLabTopology(CorePrismatic.FaceLoopChamferTopologySummary t) => new(+ t.BodyProduced,+ t.SectionCount,+ t.VertexCount,+ t.EdgeCount,+ t.FaceCount,+ t.PlanarFaceCount,+ t.CylindricalFaceCount,+ t.CapFaceCount,+ t.LowerPrismSideFaceCount,+ t.TransitionFaceCount,+ t.ChamferTransitionFaceCount,+ t.LoopCount,+ t.CoedgeCount,+ t.Bounds);++ private static FaceLoopChamferStepSummary ToLabStep(CorePrismatic.FaceLoopChamferStepSummary s) => new(+ s.Exported,+ s.PresentMarkers,+ s.MissingRequiredMarkers,+ s.AbsentMarkers,+ s.UnexpectedPresentMarkers);++ private static CorePrismatic.FaceLoopChamferSelectionKind ToCore(FaceLoopChamferSelectionKind kind) => kind switch+ {+ FaceLoopChamferSelectionKind.OpenChain => CorePrismatic.FaceLoopChamferSelectionKind.OpenChain,+ FaceLoopChamferSelectionKind.ArbitraryGraph => CorePrismatic.FaceLoopChamferSelectionKind.ArbitraryGraph,+ _ => CorePrismatic.FaceLoopChamferSelectionKind.FaceBoundaryLoop,+ };++ private static CorePrismatic.FaceLoopChamferOwningFaceKind ToCore(FaceLoopChamferOwningFaceKind kind) => kind switch+ {+ FaceLoopChamferOwningFaceKind.BottomCap => CorePrismatic.FaceLoopChamferOwningFaceKind.BottomCap,+ FaceLoopChamferOwningFaceKind.SideFace => CorePrismatic.FaceLoopChamferOwningFaceKind.SideFace,+ FaceLoopChamferOwningFaceKind.NonPlanarFace => CorePrismatic.FaceLoopChamferOwningFaceKind.NonPlanarFace,+ _ => CorePrismatic.FaceLoopChamferOwningFaceKind.TopCap,+ };++ private static CorePrismatic.FaceLoopChamferLoopKind ToCore(FaceLoopChamferLoopKind kind) => kind == FaceLoopChamferLoopKind.Inner+ ? CorePrismatic.FaceLoopChamferLoopKind.Inner+ : CorePrismatic.FaceLoopChamferLoopKind.Outer;++ private static CorePrismatic.FaceLoopChamferRuleKind ToCore(FaceLoopChamferRuleKind kind) => kind == FaceLoopChamferRuleKind.NonUniform+ ? CorePrismatic.FaceLoopChamferRuleKind.NonUniform+ : CorePrismatic.FaceLoopChamferRuleKind.UniformSymmetric;+}diff --git a/Aetheris.FrictionLab.Tests/CIRLab/TopFaceLoopChamferPrismaticLabTests.cs b/Aetheris.FrictionLab.Tests/CIRLab/TopFaceLoopChamferPrismaticLabTests.csnew file mode 100644index 00000000..a728d2da--- /dev/null+++ b/Aetheris.FrictionLab.Tests/CIRLab/TopFaceLoopChamferPrismaticLabTests.cs@@ -0,0 +1,159 @@+using Aetheris.Firmament.FrictionLab.CIRLab;++namespace Aetheris.FrictionLab.Tests.CIRLab;++public sealed class TopFaceLoopChamferPrismaticLabTests+{+ private static string Stable(FaceLoopChamferRow row) => string.Join("|",+ row.CaseName,+ row.Status,+ row.Succeeded,+ row.PrismaticEmitterInvoked,+ row.Topology.BodyProduced,+ row.Topology.SectionCount,+ row.Topology.VertexCount,+ row.Topology.EdgeCount,+ row.Topology.FaceCount,+ row.Topology.PlanarFaceCount,+ row.Topology.CylindricalFaceCount,+ row.Topology.CapFaceCount,+ row.Topology.LowerPrismSideFaceCount,+ row.Topology.TransitionFaceCount,+ row.Topology.ChamferTransitionFaceCount,+ row.Topology.LoopCount,+ row.Topology.CoedgeCount,+ row.Topology.Bounds,+ row.Step.Exported,+ string.Join(",", row.Step.PresentMarkers.OrderBy(x => x, StringComparer.Ordinal)),+ string.Join(",", row.Step.MissingRequiredMarkers.OrderBy(x => x, StringComparer.Ordinal)),+ string.Join(",", row.Step.AbsentMarkers.OrderBy(x => x, StringComparer.Ordinal)),+ string.Join(",", row.Step.UnexpectedPresentMarkers.OrderBy(x => x, StringComparer.Ordinal)),+ string.Join(",", row.Diagnostics.OrderBy(x => x, StringComparer.Ordinal)),+ row.Recommendation);++ [Fact]+ public void TopFaceLoopChamferPrismaticLab_IsDeterministic()+ {+ var first = TopFaceLoopChamferPrismaticLab.RunAll();+ var second = TopFaceLoopChamferPrismaticLab.RunAll();++ Assert.Equal(first.Select(Stable), second.Select(Stable));+ }++ [Fact]+ public void CanonicalTopFaceOuterLoopChamfer_SucceedsAsClassBLoopRoute()+ {+ var row = TopFaceLoopChamferPrismaticLab.RunAll().Single(x => x.CaseName == "canonical-top-face-outer-loop");++ Assert.True(row.Succeeded);+ Assert.Equal(LabProfileStatus.Succeeded, row.Status);+ Assert.True(row.PrismaticEmitterInvoked);+ Assert.Contains("edge-loop-x1-class-b-loop-route", row.Diagnostics);+ Assert.Contains("edge-loop-x1-not-four-independent-single-edge-chamfers", row.Diagnostics);+ Assert.Contains("edge-loop-x1-loop-selection-created", row.Diagnostics);+ Assert.Contains("edge-loop-x1-owning-face-top-cap", row.Diagnostics);+ Assert.Contains("edge-loop-x1-loop-kind-outer", row.Diagnostics);+ Assert.Contains("edge-loop-x1-loop-closed", row.Diagnostics);+ Assert.Contains("edge-loop-x1-loop-edge-count:4", row.Diagnostics);+ Assert.Contains("edge-loop-x1-uniform-chamfer-rule-validated", row.Diagnostics);+ Assert.Contains("edge-loop-x1-prismatic-emitter-invoked", row.Diagnostics);+ }++ [Theory]+ [InlineData("canonical-top-face-outer-loop", "[-5,-4,0]..[5,4,6]")]+ [InlineData("larger-valid-top-face-outer-loop", "[-5,-4,0]..[5,4,6]")]+ [InlineData("non-square-valid-top-face-outer-loop", "[-6,-2.5,0]..[6,2.5,7]")]+ public void ValidLoopChamfers_MatchSplitPreservingTopology(string caseName, string bounds)+ {+ var row = TopFaceLoopChamferPrismaticLab.RunAll().Single(x => x.CaseName == caseName);++ Assert.True(row.Succeeded);+ Assert.True(row.Topology.BodyProduced);+ Assert.Equal(3, row.Topology.SectionCount);+ Assert.Equal(12, row.Topology.VertexCount);+ Assert.Equal(20, row.Topology.EdgeCount);+ Assert.Equal(10, row.Topology.FaceCount);+ Assert.Equal(10, row.Topology.PlanarFaceCount);+ Assert.Equal(0, row.Topology.CylindricalFaceCount);+ Assert.Equal(2, row.Topology.CapFaceCount);+ Assert.Equal(4, row.Topology.LowerPrismSideFaceCount);+ Assert.Equal(4, row.Topology.TransitionFaceCount);+ Assert.Equal(4, row.Topology.ChamferTransitionFaceCount);+ Assert.Equal(10, row.Topology.LoopCount);+ Assert.Equal(40, row.Topology.CoedgeCount);+ Assert.Equal(bounds, row.Topology.Bounds);+ Assert.Contains("edge-loop-x1-topology-validated", row.Diagnostics);+ Assert.Contains("edge-loop-x1-split-preserving-topology", row.Diagnostics);+ }++ [Fact]+ public void CanonicalTopFaceOuterLoopChamfer_StepSmokePasses()+ {+ var row = TopFaceLoopChamferPrismaticLab.RunAll().Single(x => x.CaseName == "canonical-top-face-outer-loop");++ Assert.True(row.Step.Exported);+ Assert.Empty(row.Step.MissingRequiredMarkers);+ Assert.Empty(row.Step.UnexpectedPresentMarkers);+ Assert.Contains("ISO-10303-21", row.Step.PresentMarkers);+ Assert.Contains("MANIFOLD_SOLID_BREP", row.Step.PresentMarkers);+ Assert.Contains("ADVANCED_FACE", row.Step.PresentMarkers);+ Assert.Contains("PLANE", row.Step.PresentMarkers);+ Assert.Contains("CYLINDRICAL_SURFACE", row.Step.AbsentMarkers);+ Assert.Contains("BREP_WITH_VOIDS", row.Step.AbsentMarkers);+ Assert.Contains("edge-loop-x1-step-smoke-succeeded", row.Diagnostics);+ }++ [Fact]+ public void CanonicalTopFaceOuterLoopChamfer_ExcludesLegacyAndMutationRoutes()+ {+ var row = TopFaceLoopChamferPrismaticLab.RunAll().Single(x => x.CaseName == "canonical-top-face-outer-loop");++ Assert.Contains("edge-loop-x1-no-air-edge-sweep-used", row.Diagnostics);+ Assert.Contains("edge-loop-x1-no-brep-bounded-chamfer-used", row.Diagnostics);+ Assert.Contains("edge-loop-x1-no-topology-graft-used", row.Diagnostics);+ Assert.Contains("edge-loop-x1-no-3d-boolean-used", row.Diagnostics);+ Assert.Contains("edge-loop-x1-no-coplanar-merge-used", row.Diagnostics);+ Assert.Contains("edge-loop-x1-no-production-route-replacement", row.Diagnostics);+ }++ [Theory]+ [InlineData("invalid-zero-width", "edge-loop-x1-invalid-dimensions-rejected", "face-loop-chamfer-invalid-rejected", LabProfileStatus.Failed)]+ [InlineData("invalid-negative-depth", "edge-loop-x1-invalid-dimensions-rejected", "face-loop-chamfer-invalid-rejected", LabProfileStatus.Failed)]+ [InlineData("invalid-zero-height", "edge-loop-x1-invalid-dimensions-rejected", "face-loop-chamfer-invalid-rejected", LabProfileStatus.Failed)]+ [InlineData("invalid-non-finite-width", "edge-loop-x1-invalid-dimensions-rejected", "face-loop-chamfer-invalid-rejected", LabProfileStatus.Failed)]+ [InlineData("invalid-zero-chamfer-distance", "edge-loop-x1-invalid-chamfer-distance-rejected", "face-loop-chamfer-invalid-rejected", LabProfileStatus.Failed)]+ [InlineData("invalid-negative-chamfer-distance", "edge-loop-x1-invalid-chamfer-distance-rejected", "face-loop-chamfer-invalid-rejected", LabProfileStatus.Failed)]+ [InlineData("invalid-non-finite-chamfer-distance", "edge-loop-x1-invalid-chamfer-distance-rejected", "face-loop-chamfer-invalid-rejected", LabProfileStatus.Failed)]+ [InlineData("invalid-too-large-chamfer-distance", "edge-loop-x1-chamfer-distance-too-large-rejected", "face-loop-chamfer-invalid-rejected", LabProfileStatus.Failed)]+ [InlineData("invalid-non-closed-loop", "edge-loop-x1-non-closed-loop-rejected", "face-loop-chamfer-invalid-rejected", LabProfileStatus.Failed)]+ [InlineData("deferred-inner-loop", "edge-loop-x1-non-outer-loop-deferred", "face-loop-chamfer-deferred", LabProfileStatus.Deferred)]+ [InlineData("deferred-open-chain", "edge-loop-x1-open-chain-deferred", "face-loop-chamfer-deferred", LabProfileStatus.Deferred)]+ [InlineData("rejected-arbitrary-graph", "edge-loop-x1-arbitrary-graph-rejected", "face-loop-chamfer-invalid-rejected", LabProfileStatus.Failed)]+ [InlineData("rejected-non-uniform-rule", "edge-loop-x1-non-uniform-rule-rejected", "face-loop-chamfer-invalid-rejected", LabProfileStatus.Failed)]+ [InlineData("deferred-non-planar-owning-face", "edge-loop-x1-non-planar-owning-face-deferred", "face-loop-chamfer-deferred", LabProfileStatus.Deferred)]+ public void InvalidRejectedAndDeferredCases_ClassifyBeforeEmission(string caseName, string diagnostic, string recommendation, LabProfileStatus status)+ {+ var row = TopFaceLoopChamferPrismaticLab.RunAll().Single(x => x.CaseName == caseName);++ Assert.False(row.Succeeded);+ Assert.False(row.Topology.BodyProduced);+ Assert.False(row.PrismaticEmitterInvoked);+ Assert.Equal(status, row.Status);+ Assert.Contains(diagnostic, row.Diagnostics);+ Assert.DoesNotContain("edge-loop-x1-prismatic-emitter-invoked", row.Diagnostics);+ Assert.Equal(recommendation, row.Recommendation);+ }++ [Fact]+ public void RecommendationVocabulary_IsFiniteAndDeterministic()+ {+ var rows = TopFaceLoopChamferPrismaticLab.RunAll();++ foreach (var row in rows)+ {+ Assert.Contains(row.Recommendation, TopFaceLoopChamferPrismaticLab.AllowedRecommendations);+ }++ Assert.Equal(rows.Select(r => r.Recommendation), TopFaceLoopChamferPrismaticLab.RunAll().Select(r => r.Recommendation));+ }+}diff --git a/Aetheris.Kernel.Core/Brep/Prismatic/PrismaticTopFaceLoopChamferPrototype.cs b/Aetheris.Kernel.Core/Brep/Prismatic/PrismaticTopFaceLoopChamferPrototype.csnew file mode 100644index 00000000..25d96c2b--- /dev/null+++ b/Aetheris.Kernel.Core/Brep/Prismatic/PrismaticTopFaceLoopChamferPrototype.cs@@ -0,0 +1,319 @@+using Aetheris.Kernel.Core.Geometry;++namespace Aetheris.Kernel.Core.Brep.Prismatic;++internal enum FaceLoopChamferStatus+{+ Succeeded,+ Rejected,+ Deferred,+ Failed,+}++internal enum FaceLoopChamferSelectionKind+{+ FaceBoundaryLoop,+ OpenChain,+ ArbitraryGraph,+}++internal enum FaceLoopChamferOwningFaceKind+{+ TopCap,+ BottomCap,+ SideFace,+ NonPlanarFace,+}++internal enum FaceLoopChamferLoopKind+{+ Outer,+ Inner,+}++internal enum FaceLoopChamferRuleKind+{+ UniformSymmetric,+ NonUniform,+}++internal sealed record FaceLoopChamferSelection(+ FaceLoopChamferSelectionKind SelectionKind = FaceLoopChamferSelectionKind.FaceBoundaryLoop,+ FaceLoopChamferOwningFaceKind OwningFace = FaceLoopChamferOwningFaceKind.TopCap,+ FaceLoopChamferLoopKind LoopKind = FaceLoopChamferLoopKind.Outer,+ bool IsClosed = true,+ int EdgeCount = 4,+ bool OrderedCoedges = true);++internal sealed record PrismaticTopFaceLoopChamferRequest(+ double Width,+ double Depth,+ double Height,+ double ChamferDistance,+ FaceLoopChamferSelection? Selection = null,+ FaceLoopChamferRuleKind Rule = FaceLoopChamferRuleKind.UniformSymmetric,+ bool ExportStep = false);++internal sealed record FaceLoopChamferTopologySummary(+ bool BodyProduced,+ int SectionCount,+ int VertexCount,+ int EdgeCount,+ int FaceCount,+ int PlanarFaceCount,+ int CylindricalFaceCount,+ int CapFaceCount,+ int LowerPrismSideFaceCount,+ int TransitionFaceCount,+ int ChamferTransitionFaceCount,+ int LoopCount,+ int CoedgeCount,+ string Bounds);++internal sealed record FaceLoopChamferStepSummary(+ bool Exported,+ IReadOnlyList<string> PresentMarkers,+ IReadOnlyList<string> MissingRequiredMarkers,+ IReadOnlyList<string> AbsentMarkers,+ IReadOnlyList<string> UnexpectedPresentMarkers);++internal sealed record FaceLoopChamferResult(+ FaceLoopChamferStatus Status,+ BrepBody? Body,+ FaceLoopChamferTopologySummary Topology,+ FaceLoopChamferStepSummary Step,+ IReadOnlyList<string> Diagnostics,+ string Recommendation)+{+ public bool Succeeded => Status == FaceLoopChamferStatus.Succeeded && Body is not null;+}++internal static class PrismaticTopFaceLoopChamferPrototype+{+ private const double Tol = 1e-9;++ private static readonly string[] RequiredStepMarkers = ["ISO-10303-21", "MANIFOLD_SOLID_BREP", "ADVANCED_FACE", "PLANE"];+ private static readonly string[] ForbiddenStepMarkers = ["CYLINDRICAL_SURFACE", "BREP_WITH_VOIDS"];++ public static FaceLoopChamferResult Emit(PrismaticTopFaceLoopChamferRequest request)+ {+ var diagnostics = new List<string> { "edge-loop-x1-lab-started" };+ var selection = request.Selection ?? new FaceLoopChamferSelection();++ var validation = Validate(request, selection, diagnostics);+ if (validation.Status != FaceLoopChamferStatus.Succeeded)+ {+ return Stop(validation.Status, diagnostics, validation.Recommendation);+ }++ diagnostics.Add("edge-loop-x1-loop-selection-created");+ diagnostics.Add("edge-loop-x1-owning-face-top-cap");+ diagnostics.Add("edge-loop-x1-loop-kind-outer");+ diagnostics.Add("edge-loop-x1-loop-closed");+ diagnostics.Add("edge-loop-x1-loop-edge-count:4");+ diagnostics.Add("edge-loop-x1-uniform-chamfer-rule-validated");++ var sections = CreateSectionStack(request);+ diagnostics.Add("edge-loop-x1-section-stack-created");+ var correspondence = PrismaticCorrespondenceMap.Identity(4);+ diagnostics.Add("edge-loop-x1-correspondence-created");++ diagnostics.Add("edge-loop-x1-prismatic-emitter-invoked");+ var emitted = PrismaticSectionTransitionEmitter.Emit(new PrismaticSectionTransitionRequest(+ sections,+ correspondence,+ new PrismaticSectionTransitionOptions(RunStepSmoke: request.ExportStep, TraceLabel: "edge-loop-x1-top-face-outer-loop-chamfer")));++ if (!emitted.Succeeded || emitted.Body is null)+ {+ diagnostics.Add($"edge-loop-x1-prismatic-emitter-failed:{MapEmitterFailure(emitted)}");+ return Stop(FaceLoopChamferStatus.Failed, diagnostics, "face-loop-chamfer-needs-corner-policy-hardening");+ }++ diagnostics.Add("edge-loop-x1-body-created");+ diagnostics.Add("edge-loop-x1-class-b-loop-route");+ diagnostics.Add("edge-loop-x1-not-four-independent-single-edge-chamfers");+ diagnostics.Add("edge-loop-x1-split-preserving-topology");+ diagnostics.Add("edge-loop-x1-no-air-edge-sweep-used");+ diagnostics.Add("edge-loop-x1-no-brep-bounded-chamfer-used");+ diagnostics.Add("edge-loop-x1-no-topology-graft-used");+ diagnostics.Add("edge-loop-x1-no-3d-boolean-used");+ diagnostics.Add("edge-loop-x1-no-coplanar-merge-used");+ diagnostics.Add("edge-loop-x1-no-production-route-replacement");++ var topology = SummarizeTopology(emitted.Body, request);+ var topologySucceeded = topology.BodyProduced+ && topology.SectionCount == 3+ && topology.VertexCount == 12+ && topology.EdgeCount == 20+ && topology.FaceCount == 10+ && topology.PlanarFaceCount == 10+ && topology.CylindricalFaceCount == 0+ && topology.CapFaceCount == 2+ && topology.LowerPrismSideFaceCount == 4+ && topology.TransitionFaceCount == 4+ && topology.ChamferTransitionFaceCount == 4+ && topology.LoopCount == 10+ && topology.CoedgeCount == 40;+ if (topologySucceeded)+ {+ diagnostics.Add("edge-loop-x1-topology-validated");+ }++ var step = MapStep(emitted.Step);+ var stepSucceeded = !request.ExportStep || (step.Exported && step.MissingRequiredMarkers.Count == 0 && step.UnexpectedPresentMarkers.Count == 0);+ if (request.ExportStep)+ {+ diagnostics.Add(stepSucceeded ? "edge-loop-x1-step-smoke-succeeded" : "edge-loop-x1-step-smoke-failed:markers");+ }++ var succeeded = topologySucceeded && stepSucceeded;+ return new(+ succeeded ? FaceLoopChamferStatus.Succeeded : FaceLoopChamferStatus.Failed,+ emitted.Body,+ topology,+ step,+ StableDiagnostics(diagnostics),+ succeeded ? "face-loop-chamfer-ready-for-corpus" : "face-loop-chamfer-needs-corner-policy-hardening");+ }++ internal static IReadOnlyList<PrismaticSection> CreateSectionStack(PrismaticTopFaceLoopChamferRequest request)+ {+ var x0 = -request.Width * 0.5d;+ var x1 = request.Width * 0.5d;+ var y0 = -request.Depth * 0.5d;+ var y1 = request.Depth * 0.5d;+ var d = request.ChamferDistance;+ var z0 = 0d;+ var z1 = request.Height - d;+ var z2 = request.Height;++ return+ [+ new PrismaticSection(z0, [(x0, y0), (x1, y0), (x1, y1), (x0, y1)]),+ new PrismaticSection(z1, [(x0, y0), (x1, y0), (x1, y1), (x0, y1)]),+ new PrismaticSection(z2, [(x0 + d, y0 + d), (x1 - d, y0 + d), (x1 - d, y1 - d), (x0 + d, y1 - d)]),+ ];+ }++ private static (FaceLoopChamferStatus Status, string Recommendation) Validate(PrismaticTopFaceLoopChamferRequest request, FaceLoopChamferSelection selection, List<string> diagnostics)+ {+ if (!FinitePositive(request.Width) || !FinitePositive(request.Depth) || !FinitePositive(request.Height))+ {+ diagnostics.Add("edge-loop-x1-invalid-dimensions-rejected");+ return (FaceLoopChamferStatus.Rejected, "face-loop-chamfer-invalid-rejected");+ }++ if (!FinitePositive(request.ChamferDistance))+ {+ diagnostics.Add("edge-loop-x1-invalid-chamfer-distance-rejected");+ return (FaceLoopChamferStatus.Rejected, "face-loop-chamfer-invalid-rejected");+ }++ if (request.Rule != FaceLoopChamferRuleKind.UniformSymmetric)+ {+ diagnostics.Add("edge-loop-x1-non-uniform-rule-rejected");+ return (FaceLoopChamferStatus.Rejected, "face-loop-chamfer-invalid-rejected");+ }++ if (selection.SelectionKind == FaceLoopChamferSelectionKind.ArbitraryGraph)+ {+ diagnostics.Add("edge-loop-x1-arbitrary-graph-rejected");+ return (FaceLoopChamferStatus.Rejected, "face-loop-chamfer-invalid-rejected");+ }++ if (selection.SelectionKind == FaceLoopChamferSelectionKind.OpenChain)+ {+ diagnostics.Add("edge-loop-x1-open-chain-deferred");+ return (FaceLoopChamferStatus.Deferred, "face-loop-chamfer-deferred");+ }++ if (!selection.IsClosed)+ {+ diagnostics.Add("edge-loop-x1-non-closed-loop-rejected");+ return (FaceLoopChamferStatus.Rejected, "face-loop-chamfer-invalid-rejected");+ }++ if (selection.OwningFace == FaceLoopChamferOwningFaceKind.NonPlanarFace)+ {+ diagnostics.Add("edge-loop-x1-non-planar-owning-face-deferred");+ return (FaceLoopChamferStatus.Deferred, "face-loop-chamfer-deferred");+ }++ if (selection.OwningFace != FaceLoopChamferOwningFaceKind.TopCap)+ {+ diagnostics.Add("edge-loop-x1-non-planar-owning-face-deferred");+ return (FaceLoopChamferStatus.Deferred, "face-loop-chamfer-deferred");+ }++ if (selection.LoopKind != FaceLoopChamferLoopKind.Outer)+ {+ diagnostics.Add("edge-loop-x1-non-outer-loop-deferred");+ return (FaceLoopChamferStatus.Deferred, "face-loop-chamfer-deferred");+ }++ if (selection.EdgeCount != 4 || !selection.OrderedCoedges)+ {+ diagnostics.Add("edge-loop-x1-loop-selection-hardening-deferred");+ return (FaceLoopChamferStatus.Deferred, "face-loop-chamfer-needs-loop-selection-hardening");+ }++ if ((2d * request.ChamferDistance) >= request.Width - Tol+ || (2d * request.ChamferDistance) >= request.Depth - Tol+ || request.ChamferDistance >= request.Height - Tol)+ {+ diagnostics.Add("edge-loop-x1-chamfer-distance-too-large-rejected");+ return (FaceLoopChamferStatus.Rejected, "face-loop-chamfer-invalid-rejected");+ }++ var insetWidth = request.Width - (2d * request.ChamferDistance);+ var insetDepth = request.Depth - (2d * request.ChamferDistance);+ if (insetWidth <= Tol || insetDepth <= Tol)+ {+ diagnostics.Add("edge-loop-x1-self-intersecting-inset-rejected");+ return (FaceLoopChamferStatus.Rejected, "face-loop-chamfer-invalid-rejected");+ }++ return (FaceLoopChamferStatus.Succeeded, string.Empty);+ }++ private static FaceLoopChamferTopologySummary SummarizeTopology(BrepBody body, PrismaticTopFaceLoopChamferRequest request) => new(+ true,+ 3,+ body.Topology.Vertices.Count(),+ body.Topology.Edges.Count(),+ body.Topology.Faces.Count(),+ body.Topology.Faces.Count(f => body.GetFaceSurface(f.Id).Kind == SurfaceGeometryKind.Plane),+ body.Topology.Faces.Count(f => body.GetFaceSurface(f.Id).Kind == SurfaceGeometryKind.Cylinder),+ 2,+ 4,+ 4,+ 4,+ body.Topology.Loops.Count(),+ body.Topology.Coedges.Count(),+ FormattableString.Invariant($"[{(-request.Width * 0.5d):0.###},{(-request.Depth * 0.5d):0.###},0]..[{(request.Width * 0.5d):0.###},{(request.Depth * 0.5d):0.###},{request.Height:0.###}]"));++ private static FaceLoopChamferStepSummary MapStep(PrismaticSectionTransitionStepSummary step) => new(+ step.Exported,+ step.PresentMarkers,+ step.MissingRequiredMarkers,+ step.AbsentMarkers,+ step.UnexpectedPresentMarkers);++ private static string MapEmitterFailure(PrismaticSectionTransitionResult result)+ {+ var reason = result.Diagnostics.FirstOrDefault(d => d.Contains("request-rejected:", StringComparison.Ordinal) || d.Contains("request-deferred:", StringComparison.Ordinal));+ return string.IsNullOrWhiteSpace(reason) ? result.Status.ToString().ToLowerInvariant() : reason;+ }++ private static FaceLoopChamferResult Stop(FaceLoopChamferStatus status, List<string> diagnostics, string recommendation) =>+ new(status, null, EmptyTopology(), EmptyStep(), StableDiagnostics(diagnostics), recommendation);++ private static FaceLoopChamferTopologySummary EmptyTopology() => new(false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "none");++ private static FaceLoopChamferStepSummary EmptyStep() => new(false, [], RequiredStepMarkers, ForbiddenStepMarkers, []);++ private static IReadOnlyList<string> StableDiagnostics(IEnumerable<string> diagnostics) => diagnostics.Distinct(StringComparer.Ordinal).OrderBy(x => x, StringComparer.Ordinal).ToArray();++ private static bool FinitePositive(double value) => double.IsFinite(value) && value > Tol;+}diff --git a/docs/edge-a1-chamfer-fillet-support-compatibility-matrix.md b/docs/edge-a1-chamfer-fillet-support-compatibility-matrix.mdindex eaeae175..67195ee8 100644--- a/docs/edge-a1-chamfer-fillet-support-compatibility-matrix.md+++ b/docs/edge-a1-chamfer-fillet-support-compatibility-matrix.md@@ -158,6 +158,7 @@ This path is not production-authoritative. It does not support chains, corners,| CH-12 | convex/replacement | triangle-prism / non-orthogonal planar legacy case | corner/single-corner legacy selector | bounded chamfer distance | legacy-sensitive corner policy | plane | `production-legacy-supported` and load-bearing | `deferred`; `blocked-by-legacy-topology-contract`; `blocked-by-feature-recognition-parity` | V2-V5, V2-X8.1, V2-X8.2, EDGE-A0, EDGE-X1 | replacement topology contract, recognizer parity, no triangle migration retry | Legacy remains authoritative | Do not migrate until row-specific parity contract is proven || CH-13 | concave or convex depending on profile | slot/capsule/prismatic profile | edge set from profile/extrude result | constant chamfer distance if present | chain termination likely | plane | `unknown/no-test` unless covered by existing bounded edge-finish fixtures | `deferred`; likely `blocked-by-body-mutation` and `blocked-by-corner-policy` | V2 slot/capsule/profile docs are adjacent context, not chamfer support proof | explicit fixture, selection mapping, topology/parity evidence | Not ready | Add inventory row when a motivating fixture exists || CH-14 | recognition-only | import/reconstruction chamfer recognition | reconstructed feature edge(s) | detected chamfer rule | reconstructed corner/chain semantics | recognized plane chamfer face | legacy-sensitive; `unknown/no-test` outside known recovery tests | `blocked-by-feature-recognition-parity`; partial shadow parity for controlled AirChamfer | EDGE-X9 parity probe; EDGE-V3 shadow route | importer/reconstruction mapping, corpus rows, divergence diagnostics | Not production support by itself | Recognition parity hardening milestone when import route is targeted |+| CH-15 | convex/replacement | plane-plane rectangular prism top cap | face-boundary outer loop (Class B) | uniform symmetric chamfer distance | four ordered loop corners, all-or-nothing whole-loop policy | four planar chamfer transition faces | no production route change; legacy remains authoritative where applicable | `lab-supported`; `prismatic-controlled-route-supported` for lab-only history-known top-face loop; no AirEdgeSweep/BrepBoundedChamfer/graft/Boolean/merge | EDGE-LOOP-X1; `PrismaticTopFaceLoopChamferPrototype`; `TopFaceLoopChamferPrismaticLab`; FrictionLab loop chamfer tests | artifact/corpus promotion, no-history/imported rejection hardening, inner/open/side-loop policy, production admission | Lab-only proof; not production-authoritative | EDGE-LOOP-X2 corpus, then EDGE-LOOP-X3 no-history rejection diagnostics |## 6. Fillet compatibility matrixdiff --git a/docs/edge-a3-edge-finish-selection-taxonomy.md b/docs/edge-a3-edge-finish-selection-taxonomy.mdindex b928293d..5bfe3590 100644--- a/docs/edge-a3-edge-finish-selection-taxonomy.md+++ b/docs/edge-a3-edge-finish-selection-taxonomy.md@@ -249,6 +249,8 @@ A Class A route must define:### Face-loop gate+EDGE-LOOP-X1 evidence note: `PrismaticTopFaceLoopChamferPrototype` / `TopFaceLoopChamferPrismaticLab` now provide the first constructive Class B proof for the history-known top-cap outer loop of a rectangular prism. The proof admits one owning top face, one outer closed ordered four-coedge loop, and one uniform symmetric chamfer rule, then lowers the request through a single prismatic section stack. It records `edge-loop-x1-class-b-loop-route` and `edge-loop-x1-not-four-independent-single-edge-chamfers`, so the evidence is explicitly not a collection of four unrelated Class A edge operations.+A Class B route must define:- loop selection contract and ordered topology;@@ -308,7 +310,7 @@ Recommended next milestones:1. `EDGE-LOOP-A0` β face-boundary loop edge-finish audit.2. `EDGE-FILLET-A0` or `AIR-FILLET-A0` β fillet architecture audit using selection taxonomy.3. `EDGE-CORNER-X1` β constructive manifest for whole-body/simple corner chamfer/fillet cases.-4. `EDGE-LOOP-X1` β face-boundary uniform chamfer policy lab.+4. `EDGE-LOOP-X1` β completed first-scope top-face outer-loop chamfer prismatic lab; next promote to `EDGE-LOOP-X2` artifact/corpus evidence.5. `EDGE-FILLET-X1` β single-edge plane-plane constant-radius fillet witness.6. Optional: whole-body box uniform chamfer/fillet corpus.diff --git a/docs/edge-loop-a0-face-boundary-edge-finish-audit.md b/docs/edge-loop-a0-face-boundary-edge-finish-audit.mdindex faa4afe6..3df8bd3d 100644--- a/docs/edge-loop-a0-face-boundary-edge-finish-audit.md+++ b/docs/edge-loop-a0-face-boundary-edge-finish-audit.md@@ -136,7 +136,7 @@ Deferred rule families:| Loop subtype | Rule | Construction history known? | Preferred route | Fallback route | Current evidence | Missing evidence | Recommended next lab ||---|---|---:|---|---|---|---|---|-| Outer loop of top cap | Uniform chamfer | Yes | Prismatic section transition with full lower section, full pre-chamfer section, and inset top section | Profile-loop rewrite when the cap loop maps more naturally to a 2D profile | `PrismaticSectionTransitionEmitter` exists for section stacks; `PrismaticTopEdgeChamferPrototype` proves a single top edge can be represented by a section transition | Whole-loop selection/admissibility, all-four-edge inset validation, corner diagnostics, corpus artifact | **EDGE-LOOP-X1** top-face outer-loop chamfer via prismatic transition |+| Outer loop of top cap | Uniform chamfer | Yes | Prismatic section transition with full lower section, full pre-chamfer section, and inset top section | Profile-loop rewrite when the cap loop maps more naturally to a 2D profile | `PrismaticSectionTransitionEmitter` exists for section stacks; `PrismaticTopEdgeChamferPrototype` proves a single top edge can be represented by a section transition; `PrismaticTopFaceLoopChamferPrototype` / `TopFaceLoopChamferPrismaticLab` now prove the all-four-edge top outer-loop case | Artifact/corpus promotion, no-history/imported rejection hardening, broader loop subtype policy | **EDGE-LOOP-X2** loop chamfer artifact/corpus after X1 proof || Outer loop of top cap | Uniform fillet | Yes | Future prismatic/profile fillet route using curved transition sections or authored arc profile | Future AirFillet if no constructive route applies | Profile/prismatic architecture supports constructive lanes conceptually | Fillet surface family, radius validation, corner blend patches, STEP/analyzer evidence | EDGE-FILLET-A0 architecture audit before implementation || Inner loop of through-hole rim | Uniform chamfer | Yes | Profile modification / profile-hole or prismatic transition candidate | AirEdgeSweep/AirChamfer only after loop policy exists | Profile-hole emitters and line/arc profile routes provide precedent for inner loops | Inner-loop orientation, adjacent cylinder/plane policy, self-intersection/inset checks | EDGE-LOOP-X2 or later inner-loop chamfer corpus || Inner loop of through-hole rim | Uniform fillet | Yes | Future profile-hole fillet route | Future AirFillet loop route | Hole recovery/profile-hole lanes identify practical source families | Cylindrical fillet patches, entry/exit loop policy, corner-free circular loop handling | EDGE-FILLET-A0 then inner-loop witness |@@ -240,6 +240,10 @@ Candidate body and rule:This is preferred over a selection/admissibility-only lab because the single-edge prismatic top chamfer and section-transition emitter already provide route evidence. EDGE-LOOP-X1 should still include explicit selection/admissibility diagnostics as part of the lab. If the whole-loop inset/corner validation proves premature, the fallback lab should be **`EDGE-LOOP-X1 β face-loop selection/admissibility policy lab`**, with geometry deferred and no partial implementation.+### EDGE-LOOP-X1 evidence note++`PrismaticTopFaceLoopChamferPrototype` and `TopFaceLoopChamferPrismaticLab` now realize this first-scope case. The canonical row uses width `10`, depth `8`, height `6`, and chamfer distance `1`; validates the top-cap outer closed four-edge loop as a Class B selection; emits sections at `z0 = 0`, `z1 = 5`, and `z2 = 6`; and routes through `PrismaticSectionTransitionEmitter`. The split-preserving topology is `12` vertices, `20` edges, `10` all-planar faces, `10` loops, `40` coedges, and bounds `[-5,-4,0]..[5,4,6]`. STEP smoke confirms planar manifold BRep markers and no cylindrical surfaces or void BReps. Diagnostics explicitly state that this is one Class B loop route, not four independent Class A single-edge chamfers, and that it uses no AirEdgeSweep, no BrepBoundedChamfer, no topology graft, no 3D Boolean, and no coplanar merge.+## 11. Production-readiness gates for loop supportA loop route cannot be production-ready until it passes all relevant gates:diff --git a/docs/edge-prismatic-v2-controlled-top-edge-chamfer-route.md b/docs/edge-prismatic-v2-controlled-top-edge-chamfer-route.mdindex bfed7b1b..260aad05 100644--- a/docs/edge-prismatic-v2-controlled-top-edge-chamfer-route.md+++ b/docs/edge-prismatic-v2-controlled-top-edge-chamfer-route.md@@ -179,3 +179,7 @@ Because EDGE-PRISMATIC-V1 packaging already exists and V2 successfully consumes## 11. EDGE-PRISMATIC-X5 corpus evidence noteEDGE-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.++## EDGE-LOOP-X1 relationship++The controlled single top-edge route remains a Class A proof and is not replaced. EDGE-LOOP-X1 reuses the same prismatic section-transition building block for a Class B face-boundary loop proof: the lower and pre-chamfer sections remain full rectangles, while the top section is inset on all four sides. That route classifies all four upper transition faces as chamfer faces and records loop-selection diagnostics, proving one top-face outer-loop operation rather than four unrelated single-edge operations. No production route, AIR emitter, STEP exporter, Boolean, BRep topology, or CIR analyzer behavior changes are implied by the loop lab.diff --git a/docs/edge-prismatic-x4-coplanar-split-merge-policy-audit.md b/docs/edge-prismatic-x4-coplanar-split-merge-policy-audit.mdindex f69471b6..b16f2b6e 100644--- a/docs/edge-prismatic-x4-coplanar-split-merge-policy-audit.md+++ b/docs/edge-prismatic-x4-coplanar-split-merge-policy-audit.md@@ -204,3 +204,8 @@ EDGE-PRISMATIC-X5 adds a split-preserving artifact corpus for the prismatic sect## 15. EDGE-PRISMATIC-X6 split-preserving stability evidence noteEDGE-PRISMATIC-X6 adds gated artifact stability and analyzer confirmation evidence for the split-preserving output policy recorded here. The manual `PrismaticCorpusStability` test runs the X5 corpus twice, compares stable JSON/topology/marker/diagnostic projections, compares raw STEP SHA256 hashes plus normalized STEP summaries for successful artifacts, and confirms deterministic `analyze section` output for selected rectangle, top-edge chamfer, and hexagon artifacts. It also invokes `analyze map` and documents the current primitive-raycast limitation as a bounded analyzer integration blocker rather than introducing a coplanar merge or production-route change. This strengthens the default split-preserving contract; it does not add merged mode, mutate topology, change exporter/importer behavior, or replace any production chamfer/fillet route.+++## EDGE-LOOP-X1 split-preservation evidence++EDGE-LOOP-X1 confirms that the top-face outer-loop chamfer inherits the default split-preserving policy. The loop chamfer stack preserves the `z = height - chamferDistance` section boundary, yielding four stable lower prism side faces and four upper chamfer transition faces. The lab records `edge-loop-x1-split-preserving-topology` and `edge-loop-x1-no-coplanar-merge-used`, so the loop proof does not introduce a merged mode or change the default prismatic topology contract.diff --git a/docs/frictionlab/edge-loop-x1-top-face-loop-chamfer-prismatic-lab.md b/docs/frictionlab/edge-loop-x1-top-face-loop-chamfer-prismatic-lab.mdnew file mode 100644index 00000000..33ebc589--- /dev/null+++ b/docs/frictionlab/edge-loop-x1-top-face-loop-chamfer-prismatic-lab.md@@ -0,0 +1,176 @@+# EDGE-LOOP-X1 β Top-face outer-loop chamfer through prismatic transition lab++## 1. Purpose and scope++EDGE-LOOP-X1 is a lab-only / production-adjacent proof for the first Class B face-boundary loop chamfer. It proves a **uniform symmetric chamfer around the top face outer loop of a rectangular prism** by lowering the request through the existing prismatic section-transition lane.++The proof is intentionally narrow:++- rectangular prism source;+- top planar cap face only;+- outer loop only;+- closed ordered loop with four coedges;+- uniform symmetric chamfer distance;+- history-known construction;+- all four top outer-loop edges chamfered together;+- planar split-preserving BRep emission through `PrismaticSectionTransitionEmitter`.++This is not a production route and does not replace any existing chamfer or fillet behavior.++## 2. Relationship to EDGE-LOOP-A0++EDGE-LOOP-A0 identified face-boundary loops as Class B selections: ordered, face-owned loops rather than arbitrary edge graphs. Its recommended first implementation target was a top-face outer-loop chamfer of a rectangular prism through a prismatic section transition. EDGE-LOOP-X1 implements that exact first-scope lab and keeps the rest of the EDGE-LOOP-A0 taxonomy deferred.++## 3. Class B loop selection model++The admitted selection is machine-checkable:++- owning face: top cap;+- loop kind: outer loop;+- loop closed: true;+- ordered coedge/edge count: 4;+- ordered corners inherited from the rectangular top-cap boundary;+- rule: uniform symmetric chamfer.++The emitted diagnostics include loop-selection evidence such as `edge-loop-x1-loop-selection-created`, `edge-loop-x1-owning-face-top-cap`, `edge-loop-x1-loop-kind-outer`, `edge-loop-x1-loop-closed`, `edge-loop-x1-loop-edge-count:4`, and `edge-loop-x1-uniform-chamfer-rule-validated`.++## 4. Candidate geometry and section stack++The canonical geometry is:++- width = 10;+- depth = 8;+- height = 6;+- chamferDistance = 1.++The lab builds a three-section prismatic stack:++| Section | Z | Profile |+|---|---:|---|+| `z0` | 0 | full rectangle `(-5,-4)`, `(5,-4)`, `(5,4)`, `(-5,4)` |+| `z1` | 5 | full rectangle `(-5,-4)`, `(5,-4)`, `(5,4)`, `(-5,4)` |+| `z2` | 6 | inset rectangle `(-4,-3)`, `(4,-3)`, `(4,3)`, `(-4,3)` |++The correspondence is explicit identity correspondence by vertex and edge index. Each top loop edge contributes to one chamfer transition face, so the chamfer transition face count is four.++## 5. Prismatic emitter route++`PrismaticTopFaceLoopChamferPrototype` validates the loop request, constructs the section stack, creates identity correspondence, and invokes `PrismaticSectionTransitionEmitter`. The candidate path is constructive: it emits the body from sections rather than mutating an existing BRep topology.++The lab wrapper `TopFaceLoopChamferPrismaticLab` exposes deterministic rows for canonical, larger-distance, non-square, invalid, and deferred cases.++## 6. Topology findings++For the canonical three-section rectangular stack with split-preserving topology, the emitted body matches the expected count family:++| Metric | Value |+|---|---:|+| section count | 3 |+| vertices | 12 |+| edges | 20 |+| faces | 10 |+| planar faces | 10 |+| cylindrical faces | 0 |+| cap faces | 2 |+| lower prism side faces | 4 |+| transition faces | 4 |+| chamfer transition faces | 4 |+| loops | 10 |+| coedges | 40 |+| bounds | `[-5,-4,0]..[5,4,6]` |++The topology has the same broad count family as the single top-edge prismatic route, but the role classification differs: all four upper transition faces are chamfer faces instead of only one.++## 7. STEP smoke findings++The STEP smoke is performed through the existing exporter on the emitted body. The canonical row confirms these required markers are present:++- `ISO-10303-21`;+- `MANIFOLD_SOLID_BREP`;+- `ADVANCED_FACE`;+- `PLANE`.++It also confirms these markers are absent:++- `CYLINDRICAL_SURFACE`;+- `BREP_WITH_VOIDS`.++## 8. Invalid, rejected, and deferred cases++The lab rejects or defers unsupported requests before invoking the prismatic emitter:++- non-positive or non-finite width/depth/height: `edge-loop-x1-invalid-dimensions-rejected`;+- non-positive or non-finite chamfer distance: `edge-loop-x1-invalid-chamfer-distance-rejected`;+- chamfer too large for width/depth/height bounds: `edge-loop-x1-chamfer-distance-too-large-rejected`;+- non-closed loop: `edge-loop-x1-non-closed-loop-rejected`;+- inner loop: `edge-loop-x1-non-outer-loop-deferred`;+- open chain: `edge-loop-x1-open-chain-deferred`;+- arbitrary graph: `edge-loop-x1-arbitrary-graph-rejected`;+- non-uniform rule: `edge-loop-x1-non-uniform-rule-rejected`;+- non-planar owning face: `edge-loop-x1-non-planar-owning-face-deferred`.++Recommendations remain inside the allowed vocabulary: `face-loop-chamfer-ready-for-corpus`, `face-loop-chamfer-needs-loop-selection-hardening`, `face-loop-chamfer-needs-corner-policy-hardening`, `face-loop-chamfer-invalid-rejected`, and `face-loop-chamfer-deferred`.++## 9. Route exclusion guarantees++The candidate diagnostics explicitly confirm:++- no AirEdgeSweep;+- no BrepBoundedChamfer;+- no topology graft;+- no 3D Boolean;+- no coplanar merge;+- no production route replacement.++There are also no STEP importer/exporter changes, Boolean core changes, BRep topology behavior changes outside the prototype/lab, AIR emitter behavior changes, CIR analyzer behavior changes, triangle migration retry, arbitrary graph support, or NURBS/freeform expansion.++## 10. One loop operation, not four Class A chamfers++EDGE-LOOP-X1 admits and emits the top rim as one Class B loop operation. The loop selection is created once, validated once, and lowered to one section stack with identity correspondence across the full rectangular profile.++This matters because four unrelated Class A single-edge chamfers would not prove loop ownership, closed-loop ordering, all-or-nothing validation, corner consistency, or whole-loop route diagnostics. EDGE-LOOP-X1 records `edge-loop-x1-class-b-loop-route` and `edge-loop-x1-not-four-independent-single-edge-chamfers` to make that distinction machine-checkable.++## 11. Relationship to the prismatic top-edge single-edge route++The existing top-edge route proves that a single history-known top rim edge can be represented by a three-section stack with a stable lower prism interval and a chamfer transition interval. EDGE-LOOP-X1 uses the same prismatic section-transition building block, but changes the top profile from a one-sided inset to an all-sides inset. That converts one changed top edge into four changed top-loop edges while preserving the section split at `z = height - chamferDistance`.++## 12. Non-goals++EDGE-LOOP-X1 does not provide:++- production route admission;+- default production behavior changes;+- inner-loop support;+- open-chain support;+- side-face loop support;+- no-history/imported loop support;+- fillet loop support;+- mixed or variable rule support;+- unequal-distance chamfer support;+- arbitrary edge graph support;+- STEP importer/exporter changes;+- Boolean core changes;+- topology graft or mutation behavior;+- AIR emitter changes;+- CIR analyzer authority changes.++## 13. Tests run++The focused lab tests are in `Aetheris.FrictionLab.Tests/CIRLab/TopFaceLoopChamferPrismaticLabTests.cs`. They cover:++- canonical top-face outer-loop chamfer;+- larger valid chamfer distance;+- non-square valid prism;+- deterministic row summaries and diagnostics;+- topology counts;+- STEP smoke markers;+- route-exclusion diagnostics;+- invalid, rejected, and deferred cases.++The implementation validation also reruns the requested prismatic, AirChamfer, chamfer/fillet, and CIR lab filters.++## 14. Recommended next milestones++1. **EDGE-LOOP-X2 loop chamfer artifact/corpus** β add deterministic STEP/JSON artifact rows for the admitted top-face loop chamfer.+2. **EDGE-LOOP-X3 no-history/imported loop rejection diagnostics** β prove imported/no-history loop requests fail deterministically without implying local topology mutation support.+3. **EDGE-FILLET-A0 fillet architecture audit using selection taxonomy** β apply the Class A/B/C/D taxonomy to fillet routes before implementing loop fillets.