Skip to content

Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel

Add internal EDGE-V1 convex planar AirChamfer prototype seam

Yuechen Li4ebf66ccf8b1
diff --git a/Aetheris.Firmament.FrictionLab/CIRLab/AirChamferConvexPlanarPrototype.cs b/Aetheris.Firmament.FrictionLab/CIRLab/AirChamferConvexPlanarPrototype.cs
new file mode 100644
index 00000000..b90e30ec
--- /dev/null
+++ b/Aetheris.Firmament.FrictionLab/CIRLab/AirChamferConvexPlanarPrototype.cs
@@ -0,0 +1,140 @@
+using System.Numerics;
+
+namespace Aetheris.Firmament.FrictionLab.CIRLab;
+
+public enum AirChamferPrototypeStatus
+{
+ Accepted,
+ Rejected,
+ Deferred,
+ FallbackLegacy
+}
+
+public sealed record AirChamferConvexPlanarPrototypeRequest(
+ string CaseName,
+ Vector3 EdgeStart,
+ Vector3 EdgeEnd,
+ Vector3? FaceANormal,
+ Vector3? FaceBNormal,
+ double ChamferDistance,
+ AirChamferFaceFamily FaceFamily,
+ bool IsEdgeChain,
+ bool IsCornerChain,
+ bool LegacyDependency,
+ AirChamferRoutePreference RoutePreference,
+ AirChamferClassificationExpectation ClassificationExpectation,
+ bool IsOrthogonalPlanarPair,
+ double? LocalFeatureEnvelope,
+ bool IncludeGeometryArtifact,
+ bool IncludeClosedWitness);
+
+public sealed record AirChamferConvexPlanarPrototypeResult(
+ AirChamferPrototypeStatus Status,
+ string Decision,
+ AirChamferPolicyScore? JudgmentScore,
+ IReadOnlyDictionary<string, double> Considerations,
+ AirChamferTopologyPlan? TopologyPlan,
+ AirChamferGeometryArtifact? GeometryArtifact,
+ AirChamferClosedWitnessBody? ClosedWitness,
+ IReadOnlyList<string> Diagnostics);
+
+public static class AirChamferConvexPlanarPrototype
+{
+ public static AirChamferConvexPlanarPrototypeResult Evaluate(AirChamferConvexPlanarPrototypeRequest request)
+ {
+ var diagnostics = new List<string>
+ {
+ "edge-v1-air-chamfer-prototype-started",
+ "edge-v1-judgment-engine-used",
+ "edge-v1-legacy-authority-preserved",
+ "edge-v1-no-production-route-replacement",
+ "edge-v1-no-3d-boolean-used"
+ };
+
+ var topologyCase = new AirChamferTopologyPlanCase(
+ request.CaseName,
+ new AirChamferPolicyRequest(
+ request.EdgeStart,
+ request.EdgeEnd,
+ request.FaceANormal,
+ request.FaceBNormal,
+ request.ChamferDistance,
+ request.FaceFamily,
+ request.IsEdgeChain,
+ request.IsCornerChain,
+ request.LegacyDependency,
+ request.RoutePreference,
+ request.ClassificationExpectation,
+ request.IsOrthogonalPlanarPair,
+ request.LocalFeatureEnvelope),
+ string.Empty);
+
+ var witnessResult = AirChamferClosedWitnessLab.Evaluate(topologyCase);
+ var artifactResult = witnessResult.ArtifactResult;
+ var policyResult = artifactResult.TopologyPlan.Policy;
+
+ diagnostics.AddRange(policyResult.Diagnostics.Where(d => d.Contains("judgment", StringComparison.Ordinal)));
+
+ var decision = witnessResult.Decision;
+ diagnostics.Add($"edge-v1-policy-decision:{decision}");
+
+ if (artifactResult.TopologyPlan.Plan is not null)
+ {
+ diagnostics.Add("edge-v1-topology-plan-created");
+ }
+
+ if (request.IncludeGeometryArtifact && artifactResult.Artifact is not null)
+ {
+ diagnostics.Add("edge-v1-geometry-artifact-created");
+ }
+
+ var witness = request.IncludeClosedWitness ? witnessResult.Witness : null;
+ if (witness is not null)
+ {
+ diagnostics.Add("edge-v1-closed-witness-created");
+ if (witness.StepSummary.Succeeded && witness.StepSummary.HasIso && witness.StepSummary.HasManifoldSolidBrep && witness.StepSummary.HasAdvancedFace && witness.StepSummary.HasPlane && !witness.StepSummary.HasCylindricalSurface && !witness.StepSummary.HasBrepWithVoids)
+ {
+ diagnostics.Add("edge-v1-closed-witness-step-smoke-succeeded");
+ }
+ }
+
+ var status = ToStatus(decision, diagnostics);
+ var considerations = BuildConsiderations(policyResult.Candidate.Score);
+
+ return new(
+ status,
+ decision,
+ policyResult.Candidate.Score,
+ considerations,
+ artifactResult.TopologyPlan.Plan,
+ request.IncludeGeometryArtifact ? artifactResult.Artifact : null,
+ witness,
+ diagnostics.Distinct().OrderBy(x => x, StringComparer.Ordinal).ToArray());
+ }
+
+ private static IReadOnlyDictionary<string, double> BuildConsiderations(AirChamferPolicyScore score) =>
+ new Dictionary<string, double>(StringComparer.Ordinal)
+ {
+ ["geometrySupport"] = score.GeometrySupportScore,
+ ["topologyRisk"] = score.TopologyRiskScore,
+ ["offsetStability"] = score.OffsetStabilityScore,
+ ["cornerPolicy"] = score.CornerPolicyScore,
+ ["legacyDependency"] = score.LegacyDependencyScore,
+ ["overallUtility"] = score.OverallUtility
+ };
+
+ private static AirChamferPrototypeStatus ToStatus(string decision, List<string> diagnostics)
+ {
+ if (decision == "create-convex-closed-witness" || decision == "create-convex-replacement-geometry-artifact" || decision == "plan-convex-replacement-topology") return AirChamferPrototypeStatus.Accepted;
+ if (decision.StartsWith("reject-", StringComparison.Ordinal))
+ {
+ diagnostics.Add($"edge-v1-request-rejected:{decision}");
+ return AirChamferPrototypeStatus.Rejected;
+ }
+
+ if (decision.StartsWith("fallback-", StringComparison.Ordinal)) return AirChamferPrototypeStatus.FallbackLegacy;
+
+ diagnostics.Add($"edge-v1-request-deferred:{decision}");
+ return AirChamferPrototypeStatus.Deferred;
+ }
+}
diff --git a/Aetheris.FrictionLab.Tests/CIRLab/AirChamferConvexPlanarPrototypeTests.cs b/Aetheris.FrictionLab.Tests/CIRLab/AirChamferConvexPlanarPrototypeTests.cs
new file mode 100644
index 00000000..460df0b0
--- /dev/null
+++ b/Aetheris.FrictionLab.Tests/CIRLab/AirChamferConvexPlanarPrototypeTests.cs
@@ -0,0 +1,90 @@
+using Aetheris.Firmament.FrictionLab.CIRLab;
+
+namespace Aetheris.FrictionLab.Tests.CIRLab;
+
+public sealed class AirChamferConvexPlanarPrototypeTests
+{
+ [Theory]
+ [InlineData("canonical-orthogonal-convex-planar-single-edge")]
+ [InlineData("nonorthogonal-convex-planar-single-edge")]
+ public void Evaluate_AcceptedConvexCases_ProducesPlanArtifactWitness(string caseName)
+ {
+ var c = AirChamferTopologyPlanLab.Cases().Single(x => x.CaseName == caseName);
+ var result = AirChamferConvexPlanarPrototype.Evaluate(ToRequest(c));
+
+ Assert.Equal(AirChamferPrototypeStatus.Accepted, result.Status);
+ Assert.NotNull(result.JudgmentScore);
+ Assert.NotNull(result.TopologyPlan);
+ Assert.NotNull(result.GeometryArtifact);
+ Assert.NotNull(result.ClosedWitness);
+ Assert.Contains("edge-v1-judgment-engine-used", result.Diagnostics);
+ Assert.Contains("edge-v1-topology-plan-created", result.Diagnostics);
+ Assert.Contains("edge-v1-geometry-artifact-created", result.Diagnostics);
+ Assert.Contains("edge-v1-closed-witness-created", result.Diagnostics);
+ Assert.Contains("edge-v1-closed-witness-step-smoke-succeeded", result.Diagnostics);
+ Assert.Contains("edge-v1-legacy-authority-preserved", result.Diagnostics);
+ Assert.Contains("edge-v1-no-production-route-replacement", result.Diagnostics);
+ Assert.DoesNotContain(result.Diagnostics, d => d.Contains("3d-boolean", StringComparison.OrdinalIgnoreCase) && !d.Equals("edge-v1-no-3d-boolean-used", StringComparison.Ordinal));
+
+ var step = result.ClosedWitness!.StepSummary;
+ Assert.True(step.Succeeded);
+ Assert.True(step.HasIso);
+ Assert.True(step.HasManifoldSolidBrep);
+ Assert.True(step.HasAdvancedFace);
+ Assert.True(step.HasPlane);
+ Assert.False(step.HasCylindricalSurface);
+ Assert.False(step.HasBrepWithVoids);
+ }
+
+ [Theory]
+ [InlineData("convex-planar-unsafe-envelope", AirChamferPrototypeStatus.Rejected)]
+ [InlineData("invalid-distance", AirChamferPrototypeStatus.Rejected)]
+ [InlineData("invalid-edge", AirChamferPrototypeStatus.Rejected)]
+ [InlineData("invalid-face-adjacency", AirChamferPrototypeStatus.Rejected)]
+ [InlineData("ambiguous-classification", AirChamferPrototypeStatus.Rejected)]
+ [InlineData("edge-chain", AirChamferPrototypeStatus.Deferred)]
+ [InlineData("corner-chain", AirChamferPrototypeStatus.Deferred)]
+ [InlineData("triangle-legacy-dependent", AirChamferPrototypeStatus.FallbackLegacy)]
+ public void Evaluate_RejectedDeferredAndFallbackCases_NoArtifacts(string caseName, AirChamferPrototypeStatus expectedStatus)
+ {
+ var c = AirChamferTopologyPlanLab.Cases().Single(x => x.CaseName == caseName);
+ var result = AirChamferConvexPlanarPrototype.Evaluate(ToRequest(c));
+
+ Assert.Equal(expectedStatus, result.Status);
+ Assert.Null(result.TopologyPlan);
+ Assert.Null(result.GeometryArtifact);
+ Assert.Null(result.ClosedWitness);
+ }
+
+ [Fact]
+ public void Evaluate_IsDeterministicAcrossRepeatedRuns()
+ {
+ var c = AirChamferTopologyPlanLab.Cases().Single(x => x.CaseName == "canonical-orthogonal-convex-planar-single-edge");
+ var a = AirChamferConvexPlanarPrototype.Evaluate(ToRequest(c));
+ var b = AirChamferConvexPlanarPrototype.Evaluate(ToRequest(c));
+
+ Assert.Equal(a.Status, b.Status);
+ Assert.Equal(a.Decision, b.Decision);
+ Assert.Equal(a.Diagnostics, b.Diagnostics);
+ Assert.Equal(a.JudgmentScore, b.JudgmentScore);
+ }
+
+ private static AirChamferConvexPlanarPrototypeRequest ToRequest(AirChamferTopologyPlanCase c)
+ => new(
+ c.CaseName,
+ c.Request.EdgeStart,
+ c.Request.EdgeEnd,
+ c.Request.FaceANormal,
+ c.Request.FaceBNormal,
+ c.Request.ChamferDistance,
+ c.Request.FaceFamily,
+ c.Request.IsEdgeChain,
+ c.Request.IsCornerChain,
+ c.Request.LegacyDependency,
+ c.Request.RoutePreference,
+ c.Request.ClassificationExpectation,
+ c.Request.IsOrthogonalPlanarPair,
+ c.Request.LocalFeatureEnvelope,
+ IncludeGeometryArtifact: true,
+ IncludeClosedWitness: true);
+}
diff --git a/docs/edge-a0-air-edge-sweep-fillet-chamfer-audit.md b/docs/edge-a0-air-edge-sweep-fillet-chamfer-audit.md
index 27c5fb93..d0b5f840 100644
--- a/docs/edge-a0-air-edge-sweep-fillet-chamfer-audit.md
+++ b/docs/edge-a0-air-edge-sweep-fillet-chamfer-audit.md
@@ -265,3 +265,5 @@ A lab-only constructive concave planar AirChamfer patch proof was added in EDGE-
- EDGE-X2.1 introduces a lab-only AirChamfer policy scaffold to gate admissibility/route decisions before broader geometry work.
- EDGE-X4 update: convex planar single-edge requests can now produce a lab-only replacement topology plan after Judgment admission; production geometry emission remains deferred.
+
+- EDGE-V1 (2026-05-28): internal production-adjacent convex planar single-edge AirChamfer prototype seam added; legacy BrepBoundedChamfer remains authoritative.
diff --git a/docs/edge-v1-convex-planar-air-chamfer-prototype.md b/docs/edge-v1-convex-planar-air-chamfer-prototype.md
new file mode 100644
index 00000000..c16c4af2
--- /dev/null
+++ b/docs/edge-v1-convex-planar-air-chamfer-prototype.md
@@ -0,0 +1,101 @@
+# EDGE-V1 Convex Planar AirChamfer Prototype
+
+## Purpose and scope
+EDGE-V1 packages the proven EDGE-X3 -> EDGE-X6 friction-lab chain into a single **internal, production-adjacent prototype seam** for convex planar single-edge AirChamfer replacement evaluation. It is explicitly non-authoritative and does not mutate production bodies.
+
+## References
+- `docs/edge-a0-air-edge-sweep-fillet-chamfer-audit.md`
+- `docs/frictionlab/edge-x3-convex-planar-air-chamfer-judgment-policy-lab.md`
+- `docs/frictionlab/edge-x4-convex-planar-air-chamfer-topology-plan-lab.md`
+- `docs/frictionlab/edge-x5-convex-planar-air-chamfer-geometry-artifact-lab.md`
+- `docs/frictionlab/edge-x6-convex-planar-air-chamfer-closed-witness-lab.md`
+
+## Component and internal API shape
+Component: `AirChamferConvexPlanarPrototype` (internal friction-lab seam).
+
+Request model: `AirChamferConvexPlanarPrototypeRequest`
+- edge endpoints,
+- adjacent planar normals,
+- chamfer distance,
+- convexity classification expectation,
+- chain/corner flags,
+- legacy dependency flag,
+- route preference,
+- optional artifact/witness materialization toggles.
+
+Result model: `AirChamferConvexPlanarPrototypeResult`
+- status: `Accepted | Rejected | Deferred | FallbackLegacy`,
+- decision string,
+- Judgment score + normalized considerations,
+- optional topology plan,
+- optional geometry artifact,
+- optional closed witness,
+- deterministic diagnostics.
+
+## Supported scope
+- convex planar single-edge requests with finite edge and positive finite distance,
+- deterministic classification,
+- no edge chain / corner chain,
+- no legacy-dependent topology.
+
+## Pipeline
+1. **Judgment policy** via existing `AirChamferPolicyLab` (JudgmentEngine-backed decisioning).
+2. **Topology plan** via `AirChamferTopologyPlanLab`.
+3. **Geometry artifact** via `AirChamferGeometryArtifactLab`.
+4. **Closed witness** via `AirChamferClosedWitnessLab` (optional in request).
+
+## Diagnostics contract
+The prototype emits deterministic `edge-v1-*` markers including:
+- `edge-v1-air-chamfer-prototype-started`
+- `edge-v1-judgment-engine-used`
+- `edge-v1-policy-decision:<decision>`
+- `edge-v1-topology-plan-created`
+- `edge-v1-geometry-artifact-created`
+- `edge-v1-closed-witness-created`
+- `edge-v1-closed-witness-step-smoke-succeeded`
+- `edge-v1-request-rejected:<reason>`
+- `edge-v1-request-deferred:<reason>`
+- `edge-v1-legacy-authority-preserved`
+- `edge-v1-no-production-route-replacement`
+- `edge-v1-no-3d-boolean-used`
+
+## STEP smoke result
+For admitted convex planar single-edge cases with witness enabled, the closed witness STEP smoke succeeds and includes:
+- `ISO-10303-21`
+- `MANIFOLD_SOLID_BREP`
+- `ADVANCED_FACE`
+- `PLANE`
+and excludes:
+- `CYLINDRICAL_SURFACE`
+- `BREP_WITH_VOIDS`
+
+## Rejected/deferred/fallback cases
+Covered in tests:
+- unsafe envelope,
+- invalid distance,
+- invalid edge,
+- invalid/missing adjacency,
+- ambiguous classification,
+- edge chain,
+- corner chain,
+- legacy-dependent triangle/chamfer fixture fallback.
+
+## Relationship to BrepBoundedChamfer
+`BrepBoundedChamfer` remains production-authoritative. EDGE-V1 does not replace production routing and does not alter public API, STEP exporter/importer behavior, boolean core behavior, or fillet geometry behavior.
+
+## Tests run
+- FrictionLab EDGE filters (policy/plan/artifact/witness/chamfer/fillet/edge-finish/CIRLab)
+- Firmament chamfer/fillet/corner/primitive/export/materialization filters
+- Core judgment/chamfer/fillet/corner/triangular-prism/extrude/boolean/safe-composition filters
+
+## Limitations
+- no production body mutation integration,
+- no non-planar/cylindrical support,
+- no edge/corner chain implementation,
+- no variable distance,
+- no fillet support,
+- no legacy-dependent topology migration,
+- no 3D boolean route.
+
+## Next recommended milestone
+Recommended next step: **EDGE-V2 production-adjacent real-body integration probe (still non-authoritative)**.
diff --git a/docs/frictionlab/edge-x6-convex-planar-air-chamfer-closed-witness-lab.md b/docs/frictionlab/edge-x6-convex-planar-air-chamfer-closed-witness-lab.md
index 94e886a3..07cc4f69 100644
--- a/docs/frictionlab/edge-x6-convex-planar-air-chamfer-closed-witness-lab.md
+++ b/docs/frictionlab/edge-x6-convex-planar-air-chamfer-closed-witness-lab.md
@@ -49,3 +49,7 @@ Expected markers are validated for witness output:
## Recommended next milestone
- EDGE-V1 production-adjacent convex planar AirChamfer prototype, or
- additional closed witness hardening if a topology/robustness blocker appears.
+
+
+## EDGE-V1 packaging note
+EDGE-V1 now packages the proven EDGE-X3 through EDGE-X6 policy->topology->artifact->closed-witness chain into an internal production-adjacent prototype seam (`AirChamferConvexPlanarPrototype`) while keeping production chamfer authority unchanged.