Skip to content

Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel

Add internal profile-expression hole-extrude front door

Yuechen Li567069c455fa
diff --git a/Aetheris.Firmament.FrictionLab/CIRLab/ProfileBooleanExtrudePipelineLab.cs b/Aetheris.Firmament.FrictionLab/CIRLab/ProfileBooleanExtrudePipelineLab.cs
index 38852dc0..4fd055c7 100644
--- a/Aetheris.Firmament.FrictionLab/CIRLab/ProfileBooleanExtrudePipelineLab.cs
+++ b/Aetheris.Firmament.FrictionLab/CIRLab/ProfileBooleanExtrudePipelineLab.cs
@@ -33,64 +33,40 @@ public static class ProfileBooleanExtrudePipelineLab
public static ProfileBooleanExtrudePipelineResult Evaluate(ProfileBooleanExtrudePipelineRow row)
{
- var diagnostics = new List<string> { "v2-x5-profile-boolean-extrude-pipeline-started", "v2-x5-profile-expression-normalization-attempted" };
- var normalized = ProfileBooleanNormalizationLab.Normalize(row.Expression);
- diagnostics.AddRange(normalized.Diagnostics);
+ var diagnostics = new List<string>();
+ var req = new ProfileExpressionHoleExtrudeRequest(ToFirmamentExpression(row.Expression), row.Height);
+ var result = ProfileExpressionHoleExtrudeEmitter.TryEmit(req);
+ diagnostics.AddRange(result.Diagnostics);
- if (normalized.Status != LabProfileStatus.Succeeded || normalized.Profile is null)
+ if (result.Status != ProfileExpressionHoleExtrudeStatus.Succeeded || result.Body is null)
{
- diagnostics.Add(normalized.Status == LabProfileStatus.Deferred
- ? $"v2-x5-profile-expression-deferred:{string.Join(",", normalized.Diagnostics)}"
- : $"v2-x5-profile-expression-rejected:{string.Join(",", normalized.Diagnostics)}");
- var rec = normalized.Status == LabProfileStatus.Deferred
+ var status = result.Status == ProfileExpressionHoleExtrudeStatus.Deferred ? LabProfileStatus.Deferred : LabProfileStatus.Failed;
+ var rec = result.Status == ProfileExpressionHoleExtrudeStatus.Deferred
? ProfileBooleanRecommendation.profile_boolean_extrude_deferred_topology
: ProfileBooleanRecommendation.profile_boolean_extrude_normalization_rejected;
- return Build(row.CaseName, normalized.Status, 0, 0, 0, 0, false, diagnostics, rec);
+ return Build(row.CaseName, status, 0, 0, 0, 0, false, diagnostics, rec);
}
- diagnostics.Add("v2-x5-profile-expression-normalized");
- if (!TryAdapt(normalized.Profile, row.Height, out var req, out var reason))
- {
- diagnostics.Add($"v2-x5-profile-hole-extrude-failed:{reason}");
- return Build(row.CaseName, LabProfileStatus.Failed, 1, Math.Max(0, normalized.Profile.Loops.Count-1), 0, 0, false, diagnostics, ProfileBooleanRecommendation.profile_boolean_extrude_emitter_blocked);
- }
-
- diagnostics.Add("v2-x5-resolved-profile-adapted-to-emitter");
- diagnostics.Add("v2-x5-profile-hole-extrude-attempted");
- var emit = ProfileHoleExtrudeEmitter.TryEmit(req!);
- diagnostics.AddRange(emit.Diagnostics);
- if (emit.Status != ProfileHoleExtrudeStatus.Succeeded || emit.Body is null)
- {
- diagnostics.Add("v2-x5-profile-hole-extrude-failed:emitter-rejected-or-failed");
- return Build(row.CaseName, LabProfileStatus.Failed, 1, normalized.Profile.Loops.Count-1, 0, 0, false, diagnostics, ProfileBooleanRecommendation.profile_boolean_extrude_emitter_blocked);
- }
-
- diagnostics.Add("v2-x5-profile-hole-extrude-succeeded");
+ var holeCount = row.Expression is ProfileBooleanDifference { Rights: var rights }
+ ? rights.Count(x => x is ProfileBooleanCircle)
+ : 0;
+ var topo = CountFaces(result.Body);
diagnostics.Add("v2-x5-no-3d-boolean-used");
- diagnostics.Add("v2-v3-no-3d-boolean-used");
- var topo = CountFaces(emit.Body);
- var stepOk = StepOk(emit.Body, diagnostics);
- return Build(row.CaseName, LabProfileStatus.Succeeded, 1, normalized.Profile.Loops.Count-1, topo.Planar, topo.Cyl, stepOk, diagnostics, ProfileBooleanRecommendation.profile_boolean_extrude_ready_for_production_evaluation);
+ var stepOk = StepOk(result.Body, diagnostics);
+ return Build(row.CaseName, LabProfileStatus.Succeeded, 1, holeCount, topo.Planar, topo.Cyl, stepOk, diagnostics, ProfileBooleanRecommendation.profile_boolean_extrude_ready_for_production_evaluation);
}
- private static bool TryAdapt(LabResolvedProfile2D p, double height, out ProfileHoleExtrudeRequest? req, out string reason)
+ private static ProfileExpression2D ToFirmamentExpression(ProfileBooleanExpr2D expr) => expr switch
{
- req = null; reason = string.Empty;
- if (height <= 1e-9) { reason = "invalid-height"; return false; }
- if (p.Loops.Count < 1) { reason = "no-outer-loop"; return false; }
- var outer = p.Loops[0];
- if (outer.Curves.Count != 4 || outer.Curves.Any(c => c is not LabAirLineSegment2D)) { reason = "outer-not-rectangle"; return false; }
- var pts = outer.Curves.Cast<LabAirLineSegment2D>().SelectMany(x => new[] { x.Start, x.End }).ToArray();
- var minX = pts.Min(x => x.X); var maxX = pts.Max(x => x.X); var minY = pts.Min(x => x.Y); var maxY = pts.Max(x => x.Y);
- var holes = new List<ProfileHoleLoop2D>();
- foreach (var loop in p.Loops.Skip(1))
- {
- if (loop.Curves.Count != 1 || loop.Curves[0] is not LabAirFullCircle2D c) { reason = "hole-not-full-circle"; return false; }
- holes.Add(new(c.Center.X, c.Center.Y, c.Radius));
- }
- req = new(maxX-minX, maxY-minY, height, holes);
- return true;
- }
+ ProfileBooleanRectangle r => new ProfileRectangleExpr2D(r.CenterX, r.CenterY, r.Width, r.Height),
+ ProfileBooleanCircle c => new ProfileCircleExpr2D(c.CenterX, c.CenterY, c.Radius),
+ ProfileBooleanCapsule c => new ProfileCapsuleExpr2D(c.CenterX, c.CenterY, c.Length, c.Radius),
+ ProfileBooleanUnsupportedPrimitive u => new ProfileUnsupportedPrimitiveExpr2D(u.Name),
+ ProfileBooleanDifference d => new ProfileDifferenceExpr2D(ToFirmamentExpression(d.Left), d.Rights.Select(ToFirmamentExpression).ToArray()),
+ ProfileBooleanUnion u => new ProfileUnionExpr2D(u.Operands.Select(ToFirmamentExpression).ToArray()),
+ ProfileBooleanIntersection i => new ProfileIntersectionExpr2D(ToFirmamentExpression(i.Left), ToFirmamentExpression(i.Right)),
+ _ => new ProfileUnsupportedPrimitiveExpr2D(expr.GetType().Name)
+ };
private static (int Planar, int Cyl) CountFaces(BrepBody b)
{
diff --git a/Aetheris.Kernel.Firmament.Tests/Integration/ProfileExpressionHoleExtrudeEmitterTests.cs b/Aetheris.Kernel.Firmament.Tests/Integration/ProfileExpressionHoleExtrudeEmitterTests.cs
new file mode 100644
index 00000000..7b1aa46e
--- /dev/null
+++ b/Aetheris.Kernel.Firmament.Tests/Integration/ProfileExpressionHoleExtrudeEmitterTests.cs
@@ -0,0 +1,84 @@
+using Aetheris.Kernel.Core.Geometry;
+using Aetheris.Kernel.Core.Step242;
+using Aetheris.Kernel.Firmament.Materializer;
+
+namespace Aetheris.Kernel.Firmament.Tests.Integration;
+
+public class ProfileExpressionHoleExtrudeEmitterTests
+{
+ [Theory]
+ [MemberData(nameof(SuccessCases))]
+ public void Success_cases_emit_expected_topology_and_step(object requestObj, int holeCount)
+ {
+ var request = (ProfileExpressionHoleExtrudeRequest)requestObj;
+ var result = ProfileExpressionHoleExtrudeEmitter.TryEmit(request);
+ Assert.Equal(ProfileExpressionHoleExtrudeStatus.Succeeded, result.Status);
+ Assert.NotNull(result.Body);
+ Assert.Contains("v2-v3-profile-expression-frontdoor-attempted", result.Diagnostics);
+ Assert.Contains("v2-v3-profile-expression-normalized", result.Diagnostics);
+ Assert.Contains("v2-v3-no-3d-boolean-used", result.Diagnostics);
+
+ var body = result.Body!;
+ var planar = body.Geometry.Surfaces.Count(x => x.Value.Kind == SurfaceGeometryKind.Plane);
+ var cyl = body.Geometry.Surfaces.Count(x => x.Value.Kind == SurfaceGeometryKind.Cylinder);
+ Assert.Equal(6, planar);
+ Assert.Equal(holeCount, cyl);
+
+ var step = Step242Exporter.ExportBody(body);
+ Assert.True(step.IsSuccess);
+ var text = step.Value!;
+ Assert.Contains("ISO-10303-21", text);
+ Assert.Contains("MANIFOLD_SOLID_BREP", text);
+ Assert.Contains("ADVANCED_FACE", text);
+ Assert.Contains("PLANE", text);
+ Assert.Contains("CYLINDRICAL_SURFACE", text);
+ Assert.DoesNotContain("BREP_WITH_VOIDS", text);
+ }
+
+ [Theory]
+ [MemberData(nameof(RejectedCases))]
+ public void Invalid_cases_reject_before_brep(object requestObj, string expected)
+ {
+ var request = (ProfileExpressionHoleExtrudeRequest)requestObj;
+ var result = ProfileExpressionHoleExtrudeEmitter.TryEmit(request);
+ Assert.Equal(ProfileExpressionHoleExtrudeStatus.Rejected, result.Status);
+ Assert.Null(result.Body);
+ Assert.Contains(result.Diagnostics, x => x == $"v2-v3-profile-expression-rejected:{expected}");
+ Assert.DoesNotContain("v2-v3-profile-hole-extrude-succeeded", result.Diagnostics);
+ }
+
+ [Theory]
+ [MemberData(nameof(DeferredCases))]
+ public void Deferred_cases_stop_before_emission(object requestObj)
+ {
+ var request = (ProfileExpressionHoleExtrudeRequest)requestObj;
+ var result = ProfileExpressionHoleExtrudeEmitter.TryEmit(request);
+ Assert.Equal(ProfileExpressionHoleExtrudeStatus.Deferred, result.Status);
+ Assert.Null(result.Body);
+ Assert.DoesNotContain("v2-v3-profile-hole-extrude-succeeded", result.Diagnostics);
+ }
+
+ public static IEnumerable<object[]> SuccessCases()
+ {
+ yield return [new ProfileExpressionHoleExtrudeRequest(new ProfileDifferenceExpr2D(new ProfileRectangleExpr2D(0, 0, 20, 20), [new ProfileCircleExpr2D(0, 0, 3)]), 10), 1];
+ yield return [new ProfileExpressionHoleExtrudeRequest(new ProfileDifferenceExpr2D(new ProfileRectangleExpr2D(0, 0, 30, 20), [new ProfileCircleExpr2D(5, 2, 2)]), 8), 1];
+ yield return [new ProfileExpressionHoleExtrudeRequest(new ProfileDifferenceExpr2D(new ProfileRectangleExpr2D(0, 0, 30, 20), [new ProfileCircleExpr2D(-5, 0, 2), new ProfileCircleExpr2D(5, 0, 2)]), 8), 2];
+ }
+
+ public static IEnumerable<object[]> RejectedCases()
+ {
+ yield return [new ProfileExpressionHoleExtrudeRequest(new ProfileDifferenceExpr2D(new ProfileRectangleExpr2D(0, 0, 20, 20), [new ProfileCircleExpr2D(20, 20, 2)]), 10), "circle-outside-rectangle"];
+ yield return [new ProfileExpressionHoleExtrudeRequest(new ProfileDifferenceExpr2D(new ProfileRectangleExpr2D(0, 0, 20, 20), [new ProfileCircleExpr2D(7, 0, 3)]), 10), "circle-touches-boundary"];
+ yield return [new ProfileExpressionHoleExtrudeRequest(new ProfileDifferenceExpr2D(new ProfileRectangleExpr2D(0, 0, 30, 20), [new ProfileCircleExpr2D(0, 0, 3), new ProfileCircleExpr2D(4, 0, 3)]), 8), "circles-overlap-touch"];
+ yield return [new ProfileExpressionHoleExtrudeRequest(new ProfileDifferenceExpr2D(new ProfileRectangleExpr2D(0, 0, 20, 20), [new ProfileCircleExpr2D(0, 0, 0)]), 10), "invalid-circle"];
+ yield return [new ProfileExpressionHoleExtrudeRequest(new ProfileDifferenceExpr2D(new ProfileRectangleExpr2D(0, 0, 0, 20), [new ProfileCircleExpr2D(0, 0, 2)]), 10), "invalid-rectangle"];
+ yield return [new ProfileExpressionHoleExtrudeRequest(new ProfileDifferenceExpr2D(new ProfileRectangleExpr2D(0, 0, 20, 20), [new ProfileCircleExpr2D(0, 0, 2)]), 0), "emitter-validation-failure"];
+ yield return [new ProfileExpressionHoleExtrudeRequest(new ProfileUnionExpr2D([new ProfileRectangleExpr2D(0, 0, 10, 10), new ProfileRectangleExpr2D(0, 0, 8, 8)]), 10), "unsupported-operation"];
+ }
+
+ public static IEnumerable<object[]> DeferredCases()
+ {
+ yield return [new ProfileExpressionHoleExtrudeRequest(new ProfileDifferenceExpr2D(new ProfileRectangleExpr2D(0, 0, 20, 20), [new ProfileCapsuleExpr2D(0, 0, 10, 2)]), 10)];
+ yield return [new ProfileExpressionHoleExtrudeRequest(new ProfileDifferenceExpr2D(new ProfileRectangleExpr2D(0, 0, 20, 20), [new ProfileRectangleExpr2D(5, 0, 2, 40)]), 10)];
+ }
+}
diff --git a/Aetheris.Kernel.Firmament/Materializer/ProfileExpressionHoleExtrudeEmitter.cs b/Aetheris.Kernel.Firmament/Materializer/ProfileExpressionHoleExtrudeEmitter.cs
new file mode 100644
index 00000000..f47b8f26
--- /dev/null
+++ b/Aetheris.Kernel.Firmament/Materializer/ProfileExpressionHoleExtrudeEmitter.cs
@@ -0,0 +1,116 @@
+using Aetheris.Kernel.Core.Brep;
+
+namespace Aetheris.Kernel.Firmament.Materializer;
+
+internal abstract record ProfileExpression2D;
+internal sealed record ProfileRectangleExpr2D(double CenterX, double CenterY, double Width, double Height) : ProfileExpression2D;
+internal sealed record ProfileCircleExpr2D(double CenterX, double CenterY, double Radius) : ProfileExpression2D;
+internal sealed record ProfileCapsuleExpr2D(double CenterX, double CenterY, double Length, double Radius) : ProfileExpression2D;
+internal sealed record ProfileUnsupportedPrimitiveExpr2D(string Name) : ProfileExpression2D;
+internal sealed record ProfileDifferenceExpr2D(ProfileExpression2D Left, IReadOnlyList<ProfileExpression2D> Rights) : ProfileExpression2D;
+internal sealed record ProfileUnionExpr2D(IReadOnlyList<ProfileExpression2D> Operands) : ProfileExpression2D;
+internal sealed record ProfileIntersectionExpr2D(ProfileExpression2D Left, ProfileExpression2D Right) : ProfileExpression2D;
+
+internal enum ProfileExpressionHoleExtrudeStatus { Succeeded, Rejected, Deferred, Failed }
+
+internal sealed record ProfileExpressionHoleExtrudeRequest(ProfileExpression2D Expression, double Height);
+internal sealed record ProfileExpressionHoleExtrudeResult(ProfileExpressionHoleExtrudeStatus Status, BrepBody? Body, IReadOnlyList<string> Diagnostics);
+
+internal static class ProfileExpressionHoleExtrudeEmitter
+{
+ private const double Tol = 1e-6;
+
+ public static ProfileExpressionHoleExtrudeResult TryEmit(ProfileExpressionHoleExtrudeRequest request)
+ {
+ var d = new List<string> { "v2-v3-profile-expression-frontdoor-attempted", "v2-v3-profile-expression-normalization-attempted" };
+ if (!TryNormalize(request.Expression, d, out var outer, out var holes, out var rejectedReason, out var deferredReason))
+ {
+ var isDeferred = !string.IsNullOrWhiteSpace(deferredReason);
+ var status = isDeferred ? ProfileExpressionHoleExtrudeStatus.Deferred : ProfileExpressionHoleExtrudeStatus.Rejected;
+ d.Add($"v2-v3-profile-expression-{(isDeferred ? "deferred" : "rejected")}:{(isDeferred ? deferredReason : rejectedReason)}");
+ return new(status, null, Distinct(d));
+ }
+
+ d.Add("v2-v3-profile-expression-normalized");
+ if (!double.IsFinite(request.Height) || request.Height <= Tol)
+ {
+ d.Add("v2-v3-profile-expression-rejected:emitter-validation-failure");
+ return new(ProfileExpressionHoleExtrudeStatus.Rejected, null, Distinct(d));
+ }
+
+ d.Add("v2-v3-profile-expression-adapted-to-hole-emitter");
+ d.Add("v2-v3-profile-hole-extrude-attempted");
+ var emit = ProfileHoleExtrudeEmitter.TryEmit(new ProfileHoleExtrudeRequest(outer.Width, outer.Height, request.Height, holes));
+ d.AddRange(emit.Diagnostics);
+ if (emit.Status != ProfileHoleExtrudeStatus.Succeeded || emit.Body is null)
+ {
+ d.Add("v2-v3-profile-hole-extrude-failed:emitter-validation-failure");
+ return new(ProfileExpressionHoleExtrudeStatus.Failed, null, Distinct(d));
+ }
+
+ d.Add("v2-v3-profile-hole-extrude-succeeded");
+ d.Add("v2-v3-no-3d-boolean-used");
+ return new(ProfileExpressionHoleExtrudeStatus.Succeeded, emit.Body, Distinct(d));
+ }
+
+ private static bool TryNormalize(ProfileExpression2D expr, List<string> d, out ProfileRectangleExpr2D outer, out List<ProfileHoleLoop2D> holes, out string rejectedReason, out string deferredReason)
+ {
+ outer = new(0, 0, 0, 0); holes = []; rejectedReason = string.Empty; deferredReason = string.Empty;
+ if (expr is not ProfileDifferenceExpr2D(var left, var rights)) { rejectedReason = "unsupported-operation"; return false; }
+ if (left is not ProfileRectangleExpr2D r) { rejectedReason = "invalid-rectangle"; return false; }
+ if (!ValidRectangle(r)) { rejectedReason = "invalid-rectangle"; return false; }
+ if (rights.Count == 0) { rejectedReason = "unsupported-topology"; return false; }
+
+ var circles = new List<ProfileCircleExpr2D>();
+ foreach (var x in rights)
+ {
+ switch (x)
+ {
+ case ProfileCircleExpr2D c:
+ if (c.Radius <= Tol || !double.IsFinite(c.Radius)) { rejectedReason = "invalid-circle"; return false; }
+ if (!CircleInside(c, r)) { rejectedReason = "circle-outside-rectangle"; return false; }
+ if (TouchesBoundary(c, r)) { rejectedReason = "circle-touches-boundary"; return false; }
+ circles.Add(c);
+ break;
+ case ProfileCapsuleExpr2D:
+ deferredReason = "unsupported-primitive";
+ return false;
+ case ProfileRectangleExpr2D:
+ deferredReason = "unsupported-topology";
+ return false;
+ case ProfileUnsupportedPrimitiveExpr2D:
+ rejectedReason = "unsupported-primitive";
+ return false;
+ default:
+ rejectedReason = "unsupported-operation";
+ return false;
+ }
+ }
+
+ for (var i = 0; i < circles.Count; i++)
+ for (var j = i + 1; j < circles.Count; j++)
+ {
+ var dx = circles[i].CenterX - circles[j].CenterX;
+ var dy = circles[i].CenterY - circles[j].CenterY;
+ if ((dx * dx) + (dy * dy) <= Math.Pow(circles[i].Radius + circles[j].Radius, 2d) + Tol)
+ { rejectedReason = "circles-overlap-touch"; return false; }
+ }
+
+ outer = new(0, 0, r.Width, r.Height);
+ holes = circles.Select(c => new ProfileHoleLoop2D(c.CenterX - r.CenterX, c.CenterY - r.CenterY, c.Radius)).ToList();
+ return true;
+ }
+
+ private static bool ValidRectangle(ProfileRectangleExpr2D r) => double.IsFinite(r.Width) && double.IsFinite(r.Height) && r.Width > Tol && r.Height > Tol;
+ private static bool CircleInside(ProfileCircleExpr2D c, ProfileRectangleExpr2D r)
+ {
+ var x0 = r.CenterX - r.Width / 2d; var x1 = r.CenterX + r.Width / 2d; var y0 = r.CenterY - r.Height / 2d; var y1 = r.CenterY + r.Height / 2d;
+ return c.CenterX - c.Radius >= x0 - Tol && c.CenterX + c.Radius <= x1 + Tol && c.CenterY - c.Radius >= y0 - Tol && c.CenterY + c.Radius <= y1 + Tol;
+ }
+ private static bool TouchesBoundary(ProfileCircleExpr2D c, ProfileRectangleExpr2D r)
+ {
+ var x0 = r.CenterX - r.Width / 2d; var x1 = r.CenterX + r.Width / 2d; var y0 = r.CenterY - r.Height / 2d; var y1 = r.CenterY + r.Height / 2d;
+ return Math.Abs((c.CenterX - c.Radius) - x0) <= Tol || Math.Abs((c.CenterX + c.Radius) - x1) <= Tol || Math.Abs((c.CenterY - c.Radius) - y0) <= Tol || Math.Abs((c.CenterY + c.Radius) - y1) <= Tol;
+ }
+ private static string[] Distinct(List<string> d) => d.Distinct().OrderBy(x => x).ToArray();
+}
diff --git a/docs/frictionlab/v2-v3-profile-boolean-to-extrude-pipeline.md b/docs/frictionlab/v2-v3-profile-boolean-to-extrude-pipeline.md
index d4d9b4f9..36765846 100644
--- a/docs/frictionlab/v2-v3-profile-boolean-to-extrude-pipeline.md
+++ b/docs/frictionlab/v2-v3-profile-boolean-to-extrude-pipeline.md
@@ -34,3 +34,6 @@ Current result is lab-only evidence and is ready for bounded production-evaluati
## Recommended next step
Productionize bounded profile-expression front door (rectangle-minus-contained-circles), then run slot/capsule lab and/or bounded clipping lab based on deferred evidence.
+
+
+Update note (V2-V3): lab pipeline now delegates through the internal `ProfileExpressionHoleExtrudeEmitter` front door for bounded rectangle-minus-circle(s) routes.
diff --git a/docs/frictionlab/v2-x4-profile-boolean-normalization-lab.md b/docs/frictionlab/v2-x4-profile-boolean-normalization-lab.md
index 21c1318e..8297bc16 100644
--- a/docs/frictionlab/v2-x4-profile-boolean-normalization-lab.md
+++ b/docs/frictionlab/v2-x4-profile-boolean-normalization-lab.md
@@ -71,3 +71,6 @@ Run a bounded clipping lab for rectangle-rectangle overlap normalization, or a d
## V2-V3 chaining note
V2-V3 now chains accepted V2-X4 normalized outputs into `ProfileHoleExtrudeEmitter` through a lab adapter (`ProfileBooleanExtrudePipelineLab`), preserving deferred/rejected stops before any BRep emission.
+
+
+Update note (V2-V3): normalization lab remains the bounded proof source; production-adjacent orchestration now consumes equivalent bounded rules in Firmament internal front-door flow.
diff --git a/docs/v2-v2-profile-hole-extrude-through-hole-integration.md b/docs/v2-v2-profile-hole-extrude-through-hole-integration.md
index 5e06f7de..6cae78b9 100644
--- a/docs/v2-v2-profile-hole-extrude-through-hole-integration.md
+++ b/docs/v2-v2-profile-hole-extrude-through-hole-integration.md
@@ -69,3 +69,6 @@ Extend semantic planning/adapter contracts to represent bounded multi-hole throu
## V2-V3 chaining note
A lab-only V2-V3 pipeline now demonstrates compile-time profile Boolean expression normalization feeding bounded emitter input (rectangle minus circles) and STEP smoke validation, with no 3D Boolean in the candidate path.
+
+
+Update note (V2-V3): no change to V2-V2 accepted through-hole production route; new profile-expression front door is internal production-adjacent only.
diff --git a/docs/v2-v3-profile-expression-hole-extrude-frontdoor.md b/docs/v2-v3-profile-expression-hole-extrude-frontdoor.md
new file mode 100644
index 00000000..da41af1f
--- /dev/null
+++ b/docs/v2-v3-profile-expression-hole-extrude-frontdoor.md
@@ -0,0 +1,64 @@
+# V2-V3: ProfileExpression-to-ProfileHoleExtrude internal front door
+
+## Purpose and scope
+This milestone introduces a **production-adjacent internal** front door named `ProfileExpressionHoleExtrudeEmitter` that accepts a bounded profile expression subset and emits through-hole prisms through `ProfileHoleExtrudeEmitter` (no 3D Boolean).
+
+Scope is intentionally narrow:
+- `Difference(Rectangle, Circle...)` only.
+- Full-height extrusion only.
+- Circle holes must be fully contained, non-overlapping, non-touching.
+
+## References
+- V2 doctrine: `docs/aetheris-v2-sweep-first-architecture.md`
+- V2-A1: `docs/aetheris-v2-a1-resolved-profile2d-contract.md`
+- V2-X1: `docs/frictionlab/v2-x1-resolved-profile2d-lab.md`
+- V2-X3: `docs/frictionlab/v2-x3-profile-with-hole-extrude-lab.md`
+- V2-X4: `docs/frictionlab/v2-x4-profile-boolean-normalization-lab.md`
+- V2-V1: `docs/v2-v1-profile-hole-extrude-production-evaluation.md`
+- V2-V2: `docs/v2-v2-profile-hole-extrude-through-hole-integration.md`
+- V2-X5/V2-V3 lab chain: `docs/frictionlab/v2-v3-profile-boolean-to-extrude-pipeline.md`
+
+## Why after lab chain
+V2-X5 proved feasibility via lab chaining and internals exposure. This milestone captures that proven bounded route behind a cleaner **internal production-adjacent seam** so lab evidence can reuse production-adjacent orchestration without duplicating normalization/adaptation/emission flow.
+
+## Internal design
+`ProfileExpressionHoleExtrudeEmitter` (internal, Firmament) performs:
+1. deterministic front-door diagnostics,
+2. bounded normalization/validation,
+3. adaptation to `ProfileHoleExtrudeRequest`,
+4. call to `ProfileHoleExtrudeEmitter`.
+
+No 3D Boolean operation is called in this route.
+
+## Diagnostics contract
+Emits deterministic route diagnostics:
+- `v2-v3-profile-expression-frontdoor-attempted`
+- `v2-v3-profile-expression-normalization-attempted`
+- `v2-v3-profile-expression-normalized`
+- `v2-v3-profile-expression-rejected:<reason>`
+- `v2-v3-profile-expression-deferred:<reason>`
+- `v2-v3-profile-expression-adapted-to-hole-emitter`
+- `v2-v3-profile-hole-extrude-attempted`
+- `v2-v3-profile-hole-extrude-succeeded`
+- `v2-v3-profile-hole-extrude-failed:<reason>`
+- `v2-v3-no-3d-boolean-used`
+
+## Invalid/deferred behavior
+Rejected reasons include invalid rectangle/circle, outside/touching boundary, overlap/touch, unsupported op/primitive, and emitter validation failure.
+Deferred currently includes capsule and rectangle-right/topology cases.
+Invalid/deferred paths stop before BRep emission.
+
+## InternalsVisibleTo status
+`InternalsVisibleTo("Aetheris.Firmament.FrictionLab")` is retained and intentionally bounded for lab evidence reuse of this internal seam; no public API expansion was introduced.
+
+## Topology/STEP findings
+Success cases preserve expected topology convention (6 planar faces + N cylindrical faces) and STEP smoke markers (`ISO-10303-21`, `MANIFOLD_SOLID_BREP`, `ADVANCED_FACE`, `PLANE`, `CYLINDRICAL_SURFACE`, no `BREP_WITH_VOIDS`).
+
+## Production routing status
+No production user-facing route broadening was introduced. Existing routes and fallback behavior remain unchanged.
+
+## Remaining limitations
+No sketch solver, no generalized 2D clipping, no 3D Boolean fallback, no blind/counterbore/stepped/cross-axis variants, no multiple-material-island support.
+
+## Next milestone
+Evaluate controlled production routing at a narrow internal seam once bounded expression admission policy and telemetry thresholds are agreed.