Skip to content

Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel

Add Firmament V2 side-hole center offsets

Yuechen Li45851e7bab4a
diff --git a/Aetheris.CLI.Tests/AirTraceCommandTests.cs b/Aetheris.CLI.Tests/AirTraceCommandTests.cs
index d41a0835..1a666f59 100644
--- a/Aetheris.CLI.Tests/AirTraceCommandTests.cs
+++ b/Aetheris.CLI.Tests/AirTraceCommandTests.cs
@@ -1000,6 +1000,55 @@ public sealed class AirTraceCommandTests
+
+ [Fact]
+ public void FirmamentV2SideHoleCenter_TraceJsonPreservesCenter()
+ {
+ var (exitCode, output, _) = Run("trace", "--fixture", FirmamentV2Fixture("Region/valid/side-hole-center-y1-v2.valid.firmfixture"), "--json");
+ Assert.Equal(0, exitCode);
+ using var doc = JsonDocument.Parse(output);
+ var intent = doc.RootElement.GetProperty("firmamentV2").GetProperty("semanticIntent");
+ Assert.Equal(1, intent.GetProperty("centerU").GetDouble());
+ Assert.Equal(0, intent.GetProperty("centerV").GetDouble());
+ Assert.True(intent.GetProperty("centerExplicit").GetBoolean());
+ Assert.Equal("face(+X):u=+Y,v=+Z", intent.GetProperty("centerSelectorFrame").GetString());
+ Assert.Equal(1, doc.RootElement.GetProperty("regions").GetProperty("regions")[1].GetProperty("yield").GetProperty("profile").GetProperty("center").GetProperty("x").GetDouble());
+ }
+
+ [Fact]
+ public void FirmamentV2SideHoleCenter_TraceTextPreservesCenter()
+ {
+ var (_, output, _) = Run("trace", "--fixture", FirmamentV2Fixture("Region/valid/side-hole-center-y1-v2.valid.firmfixture"));
+ Assert.Contains("Center: [1, 0]", output);
+ Assert.Contains("Center frame: face(+X) local u=+Y, v=+Z", output);
+ }
+
+ [Fact]
+ public void FirmamentV2SideHoleCenter_ArtifactsEmitForOffset()
+ {
+ var dir = Path.Combine(Path.GetTempPath(), "aetheris-trace-tests", Guid.NewGuid().ToString("N"));
+ Assert.Equal(0, Run("trace", "--fixture", FirmamentV2Fixture("Region/valid/side-hole-center-y1-v2.valid.firmfixture"), "--out-dir", dir).ExitCode);
+ foreach (var name in new[] { "side-hole-center-y1-v2.step", "side-hole-center-y1-v2.trace.json", "side-hole-center-y1-v2.trace.txt", "manifest.json" })
+ {
+ var path = Path.Combine(dir, name);
+ Assert.True(File.Exists(path), path);
+ Assert.True(new FileInfo(path).Length > 0, path);
+ }
+ using var manifest = JsonDocument.Parse(File.ReadAllText(Path.Combine(dir, "manifest.json")));
+ Assert.Equal(1, manifest.RootElement.GetProperty("radius").GetDouble());
+ Assert.Equal(1, manifest.RootElement.GetProperty("center").GetProperty("u").GetDouble());
+ Assert.Equal(0, manifest.RootElement.GetProperty("center").GetProperty("v").GetDouble());
+ }
+
+ [Fact]
+ public void FirmamentV2SideHoleCenter_InvalidDiagnostics()
+ {
+ Assert.Contains("firmament-v2-side-hole-center-exceeds-clearance", Run("trace", "--fixture", FirmamentV2Fixture("Region/invalid/side-hole-center-y-boundary-v2.invalid.firmfixture"), "--json").Stdout);
+ Assert.Contains("firmament-v2-side-hole-center-exceeds-clearance", Run("trace", "--fixture", FirmamentV2Fixture("Region/invalid/side-hole-center-z-boundary-v2.invalid.firmfixture"), "--json").Stdout);
+ Assert.Contains("firmament-v2-cylinder-center-arity-invalid", Run("trace", "--fixture", FirmamentV2Fixture("Region/invalid/side-hole-center-arity-one-v2.invalid.firmfixture"), "--json").Stdout);
+ Assert.Contains("firmament-v2-cylinder-center-arity-invalid", Run("trace", "--fixture", FirmamentV2Fixture("Region/invalid/side-hole-center-arity-three-v2.invalid.firmfixture"), "--json").Stdout);
+ }
+
[Fact]
public void FirmamentV2SideHoleRadius_TraceJsonPreservesRadius()
{
diff --git a/Aetheris.CLI/AirTrace.cs b/Aetheris.CLI/AirTrace.cs
index da05ac31..2871f116 100644
--- a/Aetheris.CLI/AirTrace.cs
+++ b/Aetheris.CLI/AirTrace.cs
@@ -56,7 +56,7 @@ internal sealed record AirTraceFirmamentV2Summary(string SyntaxVersion, string M
internal sealed record AirTraceFirmamentV2SolidSummary(string Name, string RecordType, IReadOnlyList<double> Size, string? DerivedFrom, IReadOnlyDictionary<string, IReadOnlyList<double>> Overrides, IReadOnlyList<AirTraceFirmamentV2ExposureSummary> Exposures);
internal sealed record AirTraceFirmamentV2ExposureSummary(string Alias, string SelectorKind, string Selector, string RefType, string Axis, string? Subselector);
internal sealed record AirTraceFirmamentV2ModifySummary(string TargetSolid, IReadOnlyList<AirTraceFirmamentV2RegionSummary> Regions);
-internal sealed record AirTraceFirmamentV2RegionSummary(string Name, string Kind, string On, string Operation, string Tool, double Radius, string Through);
+internal sealed record AirTraceFirmamentV2RegionSummary(string Name, string Kind, string On, string Operation, string Tool, double Radius, FirmamentV2FaceLocalPoint2D? Center, string Through);
internal sealed record AirTraceProfileEmissionStepSmokeSummary(bool WasChecked, bool Succeeded, bool RequiredMarkersPresent, bool ForbiddenMarkersAbsent, IReadOnlyList<string> Diagnostics);
internal sealed record AirTraceDimensionsSummary(double Width, double Depth, double Height);
internal sealed record AirTraceAirSummary(string Node, string Route, string SelectionClass, string Rule, string ConstructionHistory, string FeatureName, string FeatureId, string ProvenanceMilestone);
@@ -148,7 +148,7 @@ internal static class AirTraceReportBuilder
? null
: new AirTraceConstructiveAirSummary(frontend.ConstructiveAir.NodeKind, frontend.ConstructiveAir.CanonicalForm, frontend.ConstructiveAir.SourceFeatureAirNodeKind, frontend.ConstructiveAir.ProfileKind, frontend.ConstructiveAir.Dimensions.Width, frontend.ConstructiveAir.Dimensions.Depth, frontend.ConstructiveAir.Dimensions.Height, frontend.ConstructiveAir.ExtrusionAxis, frontend.ConstructiveAir.ConstructionIntent, frontend.ConstructiveAir.RouteKind, frontend.ConstructiveAir.StageReached, frontend.ConstructiveAir.Diagnostics, frontend.ConstructiveAir.Guarantees);
- var regions = frontend.FirmamentV2?.SemanticIntent is not null ? AirRegionTraceFactory.ForFaceAttachedSideHoleDeferred(frontend.FirmamentV2.SemanticIntent.Radius) : AirRegionTraceFactory.ForRootBody(actualStage ?? "emitted-brep");
+ var regions = frontend.FirmamentV2?.SemanticIntent is not null ? AirRegionTraceFactory.ForFaceAttachedSideHoleDeferred(frontend.FirmamentV2.SemanticIntent.Radius, frontend.FirmamentV2.SemanticIntent.CenterU, frontend.FirmamentV2.SemanticIntent.CenterV) : AirRegionTraceFactory.ForRootBody(actualStage ?? "emitted-brep");
fxDiagnostics = Stable([.. fxDiagnostics, .. regions.Diagnostics]).ToArray();
var profileEmission = profileEmissionProbe is null ? null : new AirTraceProfileEmissionSummary(
profileEmissionProbe.WrapperInvoked,
@@ -163,7 +163,7 @@ internal static class AirTraceReportBuilder
profileEmissionProbe.Diagnostics,
profileEmissionProbe.Guarantees);
- var v2 = frontend.FirmamentV2 is null ? null : new AirTraceFirmamentV2Summary(frontend.FirmamentV2.SyntaxVersion, frontend.FirmamentV2.ModelName, frontend.FirmamentV2.Units, frontend.FirmamentV2.SolidName, frontend.FirmamentV2.RecordType, frontend.FirmamentV2.Size, frontend.FirmamentV2.StageReached, frontend.FirmamentV2.Solids.Select(s => new AirTraceFirmamentV2SolidSummary(s.Name, s.RecordType, s.Size, s.DerivedFrom, s.Overrides, s.Exposures.Select(e => new AirTraceFirmamentV2ExposureSummary(e.Alias, e.SelectorKind, e.Selector, e.RefType, e.Axis, e.Subselector)).ToArray())).ToArray(), frontend.FirmamentV2.ModifyBlocks?.Select(m => new AirTraceFirmamentV2ModifySummary(m.TargetSolid, m.Regions.Select(r => new AirTraceFirmamentV2RegionSummary(r.Name, r.Kind, r.On, r.Operation, r.Tool, r.Radius, r.Through)).ToArray())).ToArray(), frontend.FirmamentV2.SemanticIntent, frontend.FirmamentV2.ParentIntegration, frontend.FirmamentV2.ShellClosure, frontend.FirmamentV2.StepSmoke, frontend.FirmamentV2.Blocker);
+ var v2 = frontend.FirmamentV2 is null ? null : new AirTraceFirmamentV2Summary(frontend.FirmamentV2.SyntaxVersion, frontend.FirmamentV2.ModelName, frontend.FirmamentV2.Units, frontend.FirmamentV2.SolidName, frontend.FirmamentV2.RecordType, frontend.FirmamentV2.Size, frontend.FirmamentV2.StageReached, frontend.FirmamentV2.Solids.Select(s => new AirTraceFirmamentV2SolidSummary(s.Name, s.RecordType, s.Size, s.DerivedFrom, s.Overrides, s.Exposures.Select(e => new AirTraceFirmamentV2ExposureSummary(e.Alias, e.SelectorKind, e.Selector, e.RefType, e.Axis, e.Subselector)).ToArray())).ToArray(), frontend.FirmamentV2.ModifyBlocks?.Select(m => new AirTraceFirmamentV2ModifySummary(m.TargetSolid, m.Regions.Select(r => new AirTraceFirmamentV2RegionSummary(r.Name, r.Kind, r.On, r.Operation, r.Tool, r.Radius, r.Center, r.Through)).ToArray())).ToArray(), frontend.FirmamentV2.SemanticIntent, frontend.FirmamentV2.ParentIntegration, frontend.FirmamentV2.ShellClosure, frontend.FirmamentV2.StepSmoke, frontend.FirmamentV2.Blocker);
return new(isFirmamentV2 && frontend.FirmamentV2?.SemanticIntent is not null ? "AIR-FIRMAMENT-X4" : isFirmamentV2 ? "AIR-FIRMAMENT-X1" : "AIR-X11", "trace", "lowering", "firmfixture", fixture.CaseName, expectationSatisfied, frontend.FrontendSummary,
new(constructiveAir?.NodeKind ?? featureAir?.NodeKind ?? "FirmamentPrimitive", constructiveAir?.RouteKind ?? "none", "none", "none", "parser-backed-source-fixture", fixture.CaseName, fixture.CaseName, "AIR-X11"),
@@ -360,6 +360,9 @@ internal static class AirTraceTextRenderer
b.AppendLine($" Operation: {region.Operation}");
b.AppendLine($" Tool: {region.Tool}");
b.AppendLine($" Radius: {region.Radius:g}");
+ var cu = region.Center?.U ?? 0; var cv = region.Center?.V ?? 0;
+ b.AppendLine($" Center: [{cu:g}, {cv:g}]");
+ b.AppendLine($" Center frame: face(+X) local u=+Y, v=+Z");
b.AppendLine($" Through: {region.Through}");
}
}
diff --git a/Aetheris.CLI/CliRunner.cs b/Aetheris.CLI/CliRunner.cs
index ee2b918f..4384a726 100644
--- a/Aetheris.CLI/CliRunner.cs
+++ b/Aetheris.CLI/CliRunner.cs
@@ -38,6 +38,7 @@ internal static class SideHoleGoldenPathArtifacts
radius = report.FirmamentV2?.SemanticIntent?.Radius,
tool = report.FirmamentV2?.SemanticIntent?.Tool,
throughSelector = report.FirmamentV2?.SemanticIntent is null ? null : $"face({report.FirmamentV2.SemanticIntent.ThroughFace})",
+ center = report.FirmamentV2?.SemanticIntent is null ? null : new { u = report.FirmamentV2.SemanticIntent.CenterU, v = report.FirmamentV2.SemanticIntent.CenterV, explicitValue = report.FirmamentV2.SemanticIntent.CenterExplicit, frame = report.FirmamentV2.SemanticIntent.CenterSelectorFrame },
step = Path.GetFileName(artifacts.Step),
traceJson = Path.GetFileName(artifacts.TraceJson),
traceText = Path.GetFileName(artifacts.TraceText),
@@ -52,6 +53,16 @@ internal static class SideHoleGoldenPathArtifacts
private static string V2Stem(AirTraceReport report)
{
var radius = report.FirmamentV2!.SemanticIntent!.Radius;
+ var centerU = report.FirmamentV2!.SemanticIntent!.CenterU;
+ var centerV = report.FirmamentV2!.SemanticIntent!.CenterV;
+ if (Math.Abs(centerU) > 1e-12 || Math.Abs(centerV) > 1e-12)
+ {
+ static string Tok(double v) => v.ToString("0.############", System.Globalization.CultureInfo.InvariantCulture).Replace('.', '_').Replace("-", "neg");
+ var parts = new List<string>();
+ if (Math.Abs(centerU) > 1e-12) parts.Add($"y{Tok(centerU)}");
+ if (Math.Abs(centerV) > 1e-12) parts.Add($"z{Tok(centerV)}");
+ return $"side-hole-center-{string.Join("-", parts)}-v2";
+ }
if (Math.Abs(radius - 1.0) < 1e-12) return "side-hole-v2";
var token = radius.ToString("0.############", System.Globalization.CultureInfo.InvariantCulture).Replace('.', '_');
return $"side-hole-radius-{token}-v2";
@@ -66,7 +77,7 @@ internal static class SideHoleGoldenPathArtifacts
"/* stage=region-parent-integrated; parentIntegration=Integrated; shellClosure=Closed; stepSmoke=Succeeded */\n" +
"/* materialized: CutEntryLoop, CutExitLoop, CutWallFace, RegionIntegrationPatchConsumed */\n" +
"/* cylindrical cut wall evidence; CIR analysis-only; Boolean unused/not generally admitted */\n" +
- $"#1=PRODUCT('{(IsFirmamentV2SideHole(report) ? "AIR-FIRMAMENT-X6-SIDE-HOLE-V2" : "AIR-REGION-X13-SIDE-HOLE")}','controlled side-hole golden path','generated-on-demand fixture artifact',());\n" +
+ $"#1=PRODUCT('{(IsFirmamentV2SideHole(report) ? "AIR-FIRMAMENT-X7-SIDE-HOLE-V2" : "AIR-REGION-X13-SIDE-HOLE")}','controlled side-hole golden path','generated-on-demand fixture artifact',());\n" +
"ENDSEC;\nEND-ISO-10303-21;\n";
}
diff --git a/Aetheris.Kernel.Core/Air/AirRegions.cs b/Aetheris.Kernel.Core/Air/AirRegions.cs
index 17032b68..8b46cd76 100644
--- a/Aetheris.Kernel.Core/Air/AirRegions.cs
+++ b/Aetheris.Kernel.Core/Air/AirRegions.cs
@@ -303,7 +303,7 @@ internal static class AirRegionTraceFactory
return Summary([root], ["air-region-x1-region-trace-created", "air-region-x1-root-region-created", "air-region-x1-world-root-frame-created"], ["AIR Region trace-only summary", "root region does not change BRepPlan semantics"]);
}
- public static AirRegionTraceSummary ForFaceAttachedSideHoleDeferred(double radius = 1)
+ public static AirRegionTraceSummary ForFaceAttachedSideHoleDeferred(double radius = 1, double centerU = 0, double centerV = 0)
{
var root = RootRegion("region-created");
AirRegionSummary sideBase = new(
@@ -321,7 +321,7 @@ internal static class AirRegionTraceFactory
["air-region-x1-face-attached-region-created", "air-region-x1-region-effect-declared", "air-region-x1-region-yield-declared", "air-region-x1-boundary-contract-declared", "air-region-x1-parent-integration-deferred", "air-region-x2-yield-contract-created", "air-region-x2-side-hole-yield-created", "air-region-x2-face-attachment-recorded", "air-region-x2-local-profile-recorded", "air-region-x2-circle-profile-recorded", "air-region-x2-through-direction-recorded", "air-region-x2-affected-scope-recorded", "air-region-x2-boundary-intent-recorded", "air-region-x2-entry-loop-intent-recorded", "air-region-x2-exit-boundary-deferred", "air-region-x2-region-locality-enforced", "air-region-x2-explicit-yield-only", "air-region-x2-parent-integration-deferred", "air-region-x2-no-implicit-parent-mutation", "air-region-x2-no-boolean", "air-region-x2-no-brep-emission", "air-region-x2-no-step-smoke", "air-region-x2-no-cir-mirror", "air-region-x2-trace-only"],
["side-hole geometry integration not implemented", "concrete through depth deferred", "opposite-side exit boundary deferred"],
["escapes only through explicit yield", "no implicit parent mutation", "no Boolean", "no BRep emission", "no production route replacement", "trace-only"],
- SideHoleYield(root.RegionId, radius));
+ SideHoleYield(root.RegionId, radius, centerU, centerV));
var mirror = AirSideHoleRegionCirMirrorAdapter.Admit(sideBase);
var boundary = SideHoleBRepBoundary(sideBase);
var decision = AirSideHoleRegionIntegrationSelector.Decide(sideBase, mirror.Summary, boundary);
@@ -332,7 +332,7 @@ internal static class AirRegionTraceFactory
var parentIntegration = AirSideHoleParentBRepIntegrationPrototype.AttemptCutWallAttachment(sideBase, boundary, placeholders, materialization, faceSplit, exitLoop);
var cutWallAttachment = AirSideHoleParentBRepIntegrationPrototype.AttachCutWall(sideBase, placeholders, faceSplit, exitLoop);
var shellClosure = AirSideHoleParentBRepIntegrationPrototype.AttemptShellClosure(sideBase, placeholders, cutWallAttachment);
- var x10Decision = decision with { SelectedRouteKind = AirRegionIntegrationRouteKind.ControlledSideHoleParentBRepIntegration, SelectedStatus = AirRegionIntegrationStatus.Integrated, Recommendation = $"controlled parent BRep integration succeeded for the +X/-X/radius={radius:g} fixture; entry loop, exit loop, cylindrical cut wall, and RegionIntegrationPatch are consumed into closed shell evidence", Diagnostics = Stable([.. decision.Diagnostics, .. materialization.Diagnostics, .. parentIntegration.Diagnostics, .. faceSplit.Diagnostics, .. exitLoop.Diagnostics, .. cutWallAttachment.Diagnostics, .. shellClosure.Diagnostics]).ToArray(), KnownLosses = Stable([.. decision.KnownLosses, .. materialization.KnownLosses, .. parentIntegration.KnownLosses]).ToArray(), Guarantees = Stable([.. decision.Guarantees, .. materialization.Guarantees, .. parentIntegration.Guarantees, .. faceSplit.Guarantees, .. exitLoop.Guarantees, .. cutWallAttachment.Guarantees, .. shellClosure.Guarantees]).ToArray() };
+ var x10Decision = decision with { SelectedRouteKind = AirRegionIntegrationRouteKind.ControlledSideHoleParentBRepIntegration, SelectedStatus = AirRegionIntegrationStatus.Integrated, Recommendation = $"controlled parent BRep integration succeeded for the +X/-X/radius={radius:g}/center=({centerU:g},{centerV:g}) fixture; entry loop, exit loop, cylindrical cut wall, and RegionIntegrationPatch are consumed into closed shell evidence", Diagnostics = Stable([.. decision.Diagnostics, .. materialization.Diagnostics, .. parentIntegration.Diagnostics, .. faceSplit.Diagnostics, .. exitLoop.Diagnostics, .. cutWallAttachment.Diagnostics, .. shellClosure.Diagnostics]).ToArray(), KnownLosses = Stable([.. decision.KnownLosses, .. materialization.KnownLosses, .. parentIntegration.KnownLosses]).ToArray(), Guarantees = Stable([.. decision.Guarantees, .. materialization.Guarantees, .. parentIntegration.Guarantees, .. faceSplit.Guarantees, .. exitLoop.Guarantees, .. cutWallAttachment.Guarantees, .. shellClosure.Guarantees]).ToArray() };
var side = sideBase with
{
StageReached = "region-parent-integrated",
@@ -362,10 +362,10 @@ internal static class AirRegionTraceFactory
return Summary([root, bad], ["air-region-x1-region-trace-created", "air-region-x1-implicit-parent-mutation-rejected", "air-region-x1-no-brep-emission", "air-region-x1-no-boolean", "air-region-x2-implicit-parent-mutation-rejected", "air-region-x2-missing-explicit-yield-rejected", "air-region-x2-boundary-contract-required"], ["no Boolean", "no geometry", "no BRep emission"]);
}
- private static AirRegionYieldSummary SideHoleYield(string parentRegionId, double radius = 1) => new(
+ private static AirRegionYieldSummary SideHoleYield(string parentRegionId, double radius = 1, double centerU = 0, double centerV = 0) => new(
"yield:side-hole:+x:subtractive-volume", AirRegionYieldKind.YieldSubtractiveVolume, "SideHole", AirRegionEffectKind.Subtractive, "frame:side-hole:+x", parentRegionId,
new("Face", parentRegionId, "parser-backed/root box fixture", "+X", "SideFace", "frame:side-hole:+x", ["air-region-x2-face-attachment-recorded"]),
- new("Circle", new(0, 0), radius, "CircularEntryLoop", "frame:side-hole:+x/profile"),
+ new("Circle", new(centerU, centerV), radius, "CircularEntryLoop", "face(+X):u=+Y,v=+Z"),
new("FaceNormal", "LocalZ", "Inward", true, "Through", ["air-region-x2-through-direction-recorded"]),
new("ParentBodyLocalFeature", true, "+X", false, true, ["air-region-x2-affected-scope-recorded", "air-region-x2-explicit-yield-only"]),
new("ThroughCut", "CircularEntryLoop", "Deferred", "CircularRimIntent", "Deferred", ["air-region-x2-boundary-intent-recorded", "air-region-x2-entry-loop-intent-recorded", "air-region-x2-exit-boundary-deferred"]),
diff --git a/Aetheris.Kernel.Firmament.Tests/FirmamentV2ParserTests.cs b/Aetheris.Kernel.Firmament.Tests/FirmamentV2ParserTests.cs
index a37c1297..4e2ba0d4 100644
--- a/Aetheris.Kernel.Firmament.Tests/FirmamentV2ParserTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/FirmamentV2ParserTests.cs
@@ -240,6 +240,53 @@ public sealed class FirmamentV2ParserTests
}
+
+ [Fact]
+ public void FirmamentV2SideHoleCenter_ParsesCenterOffsets()
+ {
+ foreach (var (fixture, u, v) in new[] { ("Region/valid/side-hole-center-y1-v2.valid.firmfixture", 1d, 0d), ("Region/valid/side-hole-center-z1-v2.valid.firmfixture", 0d, 1d), ("Region/valid/side-hole-center-y1-z1-v2.valid.firmfixture", 1d, 1d) })
+ {
+ var intent = FirmamentV2Parser.Parse(Source(fixture)).Document!.SideHoleIntent!;
+ Assert.Equal(u, intent.CenterU);
+ Assert.Equal(v, intent.CenterV);
+ Assert.True(intent.CenterExplicit);
+ Assert.Equal("face(+X):u=+Y,v=+Z", intent.CenterSelectorFrame);
+ }
+ }
+
+ [Fact]
+ public void FirmamentV2SideHoleCenter_DefaultsToZeroWhenOmitted()
+ {
+ var intent = FirmamentV2Parser.Parse(Source("Region/valid/side-hole-v2.valid.firmfixture")).Document!.SideHoleIntent!;
+ Assert.Equal(0, intent.CenterU);
+ Assert.Equal(0, intent.CenterV);
+ Assert.False(intent.CenterExplicit);
+ }
+
+ [Fact]
+ public void FirmamentV2SideHoleCenter_ValidOffsetsReachGoldenPath()
+ {
+ foreach (var fixture in new[] { "Region/valid/side-hole-center-y1-v2.valid.firmfixture", "Region/valid/side-hole-center-z1-v2.valid.firmfixture", "Region/valid/side-hole-center-y1-z1-v2.valid.firmfixture" })
+ {
+ var result = FirmamentFrontendTraceProbe.ParseV2Only(Source(fixture));
+ Assert.True(result.ParseSucceeded, string.Join(", ", result.Diagnostics));
+ Assert.Equal("region-parent-integrated", result.FirmamentV2!.StageReached);
+ Assert.Equal("Integrated", result.FirmamentV2.ParentIntegration);
+ Assert.Equal("Closed", result.FirmamentV2.ShellClosure);
+ Assert.Equal("Succeeded", result.FirmamentV2.StepSmoke);
+ Assert.Null(result.FirmamentV2.Blocker);
+ }
+ }
+
+ [Fact]
+ public void FirmamentV2SideHoleCenter_InvalidDiagnostics()
+ {
+ Assert.Contains(FirmamentV2Parser.SideHoleCenterExceedsClearance, FirmamentV2Parser.Parse(Source("Region/invalid/side-hole-center-y-boundary-v2.invalid.firmfixture")).Diagnostics);
+ Assert.Contains(FirmamentV2Parser.SideHoleCenterExceedsClearance, FirmamentV2Parser.Parse(Source("Region/invalid/side-hole-center-z-boundary-v2.invalid.firmfixture")).Diagnostics);
+ Assert.Contains(FirmamentV2Parser.CylinderCenterArityInvalid, FirmamentV2Parser.Parse(Source("Region/invalid/side-hole-center-arity-one-v2.invalid.firmfixture")).Diagnostics);
+ Assert.Contains(FirmamentV2Parser.CylinderCenterArityInvalid, FirmamentV2Parser.Parse(Source("Region/invalid/side-hole-center-arity-three-v2.invalid.firmfixture")).Diagnostics);
+ }
+
[Fact]
public void FirmamentV2SideHoleRadius_ParsesRadiusVariations()
{
diff --git a/Aetheris.Kernel.Firmament/FirmamentFrontendTraceProbe.cs b/Aetheris.Kernel.Firmament/FirmamentFrontendTraceProbe.cs
index 032d1210..850ea417 100644
--- a/Aetheris.Kernel.Firmament/FirmamentFrontendTraceProbe.cs
+++ b/Aetheris.Kernel.Firmament/FirmamentFrontendTraceProbe.cs
@@ -20,7 +20,7 @@ public sealed record FirmamentV2TraceSummary(string SyntaxVersion, string ModelN
public sealed record FirmamentV2SolidTraceSummary(string Name, string RecordType, IReadOnlyList<double> Size, string? DerivedFrom, IReadOnlyDictionary<string, IReadOnlyList<double>> Overrides, IReadOnlyList<FirmamentV2ExposureTraceSummary> Exposures);
public sealed record FirmamentV2ExposureTraceSummary(string Alias, string SelectorKind, string Selector, string RefType, string Axis, string? Subselector);
public sealed record FirmamentV2ModifyTraceSummary(string TargetSolid, IReadOnlyList<FirmamentV2RegionTraceSummary> Regions);
-public sealed record FirmamentV2RegionTraceSummary(string Name, string Kind, string On, string Operation, string Tool, double Radius, string Through);
+public sealed record FirmamentV2RegionTraceSummary(string Name, string Kind, string On, string Operation, string Tool, double Radius, FirmamentV2FaceLocalPoint2D? Center, string Through);
public sealed record FirmamentPrimitiveAirTraceSummary(
bool ParserBacked,
@@ -107,7 +107,7 @@ public static class FirmamentFrontendTraceProbe
featureDiagnostics,
featureAir,
null,
- new FirmamentV2TraceSummary("FirmamentV2", document.ModelName, document.Units, loweredSolid.Name, loweredSolid.RecordType, loweredSolid.Box.Size, stageReached, document.Solids.Select(s => new FirmamentV2SolidTraceSummary(s.Name, s.RecordType, s.Box.Size, s.DerivedFrom, s.Overrides ?? new Dictionary<string, IReadOnlyList<double>>(), s.Box.Exposures.Select(e => new FirmamentV2ExposureTraceSummary(e.Alias, e.SelectorKind, e.Selector, e.RefType, e.Axis, e.Subselector)).ToArray())).ToArray(), document.ModifyBlocks?.Select(m => new FirmamentV2ModifyTraceSummary(m.TargetSolid, m.Regions.Select(r => new FirmamentV2RegionTraceSummary(r.Name, r.Kind, r.Attachment.Source, r.Cut.OperationKind, r.Cut.Tool.ToolType, r.Cut.Tool.Radius, r.Cut.Tool.Through.Source)).ToArray())).ToArray(), sideHoleIntent, hasSideHole ? "Integrated" : null, hasSideHole ? "Closed" : null, hasSideHole ? "Succeeded" : null));
+ new FirmamentV2TraceSummary("FirmamentV2", document.ModelName, document.Units, loweredSolid.Name, loweredSolid.RecordType, loweredSolid.Box.Size, stageReached, document.Solids.Select(s => new FirmamentV2SolidTraceSummary(s.Name, s.RecordType, s.Box.Size, s.DerivedFrom, s.Overrides ?? new Dictionary<string, IReadOnlyList<double>>(), s.Box.Exposures.Select(e => new FirmamentV2ExposureTraceSummary(e.Alias, e.SelectorKind, e.Selector, e.RefType, e.Axis, e.Subselector)).ToArray())).ToArray(), document.ModifyBlocks?.Select(m => new FirmamentV2ModifyTraceSummary(m.TargetSolid, m.Regions.Select(r => new FirmamentV2RegionTraceSummary(r.Name, r.Kind, r.Attachment.Source, r.Cut.OperationKind, r.Cut.Tool.ToolType, r.Cut.Tool.Radius, r.Cut.Tool.Center, r.Cut.Tool.Through.Source)).ToArray())).ToArray(), sideHoleIntent, hasSideHole ? "Integrated" : null, hasSideHole ? "Closed" : null, hasSideHole ? "Succeeded" : null));
}
public static FirmamentFrontendTraceProbeResult ParseOnly(string sourceText)
diff --git a/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentV2Ast.cs b/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentV2Ast.cs
index 1cd5f087..a094de4f 100644
--- a/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentV2Ast.cs
+++ b/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentV2Ast.cs
@@ -3,7 +3,7 @@ namespace Aetheris.Kernel.Firmament.FirmamentV2;
public sealed record FirmamentV2Document(string ModelName, string Units, IReadOnlyList<FirmamentV2SolidBinding> Solids, IReadOnlyList<FirmamentV2ModifyBlock>? ModifyBlocks = null)
{
public FirmamentV2SolidBinding Solid => Solids[^1];
- public FirmamentV2SideHoleIntent? SideHoleIntent => ModifyBlocks?.SelectMany(m => m.Regions.Select(r => new FirmamentV2SideHoleIntent(m.TargetSolid, r.Name, r.Attachment.Axis, r.Cut.Tool.Through.Axis, r.Cut.Tool.ToolType, r.Cut.Tool.Radius, Units))).SingleOrDefault();
+ public FirmamentV2SideHoleIntent? SideHoleIntent => ModifyBlocks?.SelectMany(m => m.Regions.Select(r => new FirmamentV2SideHoleIntent(m.TargetSolid, r.Name, r.Attachment.Axis, r.Cut.Tool.Through.Axis, r.Cut.Tool.ToolType, r.Cut.Tool.Radius, r.Cut.Tool.Center?.U ?? 0, r.Cut.Tool.Center?.V ?? 0, r.Cut.Tool.Center is not null, r.Cut.Tool.Center?.Convention ?? FirmamentV2FaceLocalPoint2D.PlusXConvention, Units))).SingleOrDefault();
}
public sealed record FirmamentV2SolidBinding(string Name, string RecordType, FirmamentV2BoxRecord Box, string? DerivedFrom = null, IReadOnlyDictionary<string, IReadOnlyList<double>>? Overrides = null)
@@ -20,8 +20,12 @@ public sealed record FirmamentV2FaceSelector(string Axis)
public sealed record FirmamentV2ModifyBlock(string TargetSolid, IReadOnlyList<FirmamentV2RegionDecl> Regions);
public sealed record FirmamentV2RegionDecl(string Name, string Kind, FirmamentV2FaceSelector Attachment, FirmamentV2CutOperation Cut);
public sealed record FirmamentV2CutOperation(string OperationKind, FirmamentV2CylinderTool Tool);
-public sealed record FirmamentV2CylinderTool(string ToolType, double Radius, FirmamentV2FaceSelector Through);
-public sealed record FirmamentV2SideHoleIntent(string TargetSolid, string RegionName, string AttachFace, string ThroughFace, string Tool, double Radius, string Units);
+public sealed record FirmamentV2CylinderTool(string ToolType, double Radius, FirmamentV2FaceLocalPoint2D? Center, FirmamentV2FaceSelector Through);
+public sealed record FirmamentV2FaceLocalPoint2D(double U, double V, string Convention)
+{
+ public const string PlusXConvention = "face(+X):u=+Y,v=+Z";
+}
+public sealed record FirmamentV2SideHoleIntent(string TargetSolid, string RegionName, string AttachFace, string ThroughFace, string Tool, double Radius, double CenterU, double CenterV, bool CenterExplicit, string CenterSelectorFrame, string Units);
public sealed record FirmamentV2ParseResult(bool IsSuccess, FirmamentV2Document? Document, IReadOnlyList<string> Diagnostics)
{
public static FirmamentV2ParseResult Success(FirmamentV2Document document, IReadOnlyList<string> diagnostics) => new(true, document, diagnostics);
diff --git a/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentV2Parser.cs b/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentV2Parser.cs
index 338fd3c1..9c8f17d2 100644
--- a/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentV2Parser.cs
+++ b/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentV2Parser.cs
@@ -43,6 +43,10 @@ public static class FirmamentV2Parser
public const string SideHoleOnlyPlusXMinusXSupported = "firmament-v2-side-hole-only-plus-x-minus-x-supported";
public const string SideHoleRadiusExceedsClearance = "firmament-v2-side-hole-radius-exceeds-clearance";
public const string CylinderRadiusNotFinite = "firmament-v2-side-hole-radius-not-finite";
+ public const string CylinderCenterInvalid = "firmament-v2-cylinder-center-invalid";
+ public const string CylinderCenterArityInvalid = "firmament-v2-cylinder-center-arity-invalid";
+ public const string CylinderCenterNotFinite = "firmament-v2-cylinder-center-not-finite";
+ public const string SideHoleCenterExceedsClearance = "firmament-v2-side-hole-center-exceeds-clearance";
private static readonly Regex ModelRegex = new(@"\bmodel\s+(?<name>[A-Za-z_][A-Za-z0-9_]*)\s*\{", RegexOptions.CultureInvariant);
private static readonly Regex UnitsRegex = new(@"\bunits\s+(?<units>[A-Za-z_][A-Za-z0-9_]*)\b", RegexOptions.CultureInvariant);
@@ -58,6 +62,7 @@ public static class FirmamentV2Parser
private static readonly Regex CutHeaderRegex = new(@"\bcut\s+(?<tool>[A-Za-z_][A-Za-z0-9_]*)\s*\{", RegexOptions.CultureInvariant);
private static readonly Regex RadiusRegex = new(@"\bradius\s*:\s*(?<value>[^\s}]+)", RegexOptions.CultureInvariant);
private static readonly Regex ThroughRegex = new(@"\bthrough\s*:\s*(?<selector>face\([^)]*\))", RegexOptions.CultureInvariant);
+ private static readonly Regex CenterRegex = new(@"\bcenter\s*:\s*\[(?<values>[^\]]*)\]", RegexOptions.CultureInvariant | RegexOptions.Singleline);
public static FirmamentV2ParseResult Parse(string sourceText)
{
@@ -135,7 +140,7 @@ public static class FirmamentV2Parser
return new(name, "Box", new(values, []), baseName, new Dictionary<string, IReadOnlyList<double>>(StringComparer.Ordinal) { ["size"] = values });
}
- private static bool IsFatalDiagnostic(string code) => code is MissingModel or MissingUnits or MissingSolid or UnsupportedConstruct or UnknownRecordType or BoxMissingSize or BoxSizeArity or DegenerateDimension or NameUnresolved or DuplicateName or WithRequiresRecord or WithRequiresBoxRecord or WithFieldNotFound or WithFieldTypeMismatch or WithForwardReference or WithDerivedRecordInvalid or ExposeBlockUnsupported or ExposeRequiresBoxRecord or ExposeAliasDuplicate or ExposeAliasInvalid or SelectorUnsupported or SelectorAxisInvalid or SelectorSubselectorUnsupported or FatArrowOutsideExpose or RawBackendIdReferenceForbidden or ModifyTargetUnresolved or ModifyTargetNotSolid or RegionUnsupported or RegionAttachmentSelectorUnsupported or CutUnsupported or CutToolUnsupported or CylinderRadiusMissing or CylinderRadiusInvalid or CylinderRadiusNotFinite or ThroughSelectorUnsupported or SideHoleOnlyPlusXMinusXSupported or SideHoleRadiusExceedsClearance;
+ private static bool IsFatalDiagnostic(string code) => code is MissingModel or MissingUnits or MissingSolid or UnsupportedConstruct or UnknownRecordType or BoxMissingSize or BoxSizeArity or DegenerateDimension or NameUnresolved or DuplicateName or WithRequiresRecord or WithRequiresBoxRecord or WithFieldNotFound or WithFieldTypeMismatch or WithForwardReference or WithDerivedRecordInvalid or ExposeBlockUnsupported or ExposeRequiresBoxRecord or ExposeAliasDuplicate or ExposeAliasInvalid or SelectorUnsupported or SelectorAxisInvalid or SelectorSubselectorUnsupported or FatArrowOutsideExpose or RawBackendIdReferenceForbidden or ModifyTargetUnresolved or ModifyTargetNotSolid or RegionUnsupported or RegionAttachmentSelectorUnsupported or CutUnsupported or CutToolUnsupported or CylinderRadiusMissing or CylinderRadiusInvalid or CylinderRadiusNotFinite or ThroughSelectorUnsupported or SideHoleOnlyPlusXMinusXSupported or SideHoleRadiusExceedsClearance or CylinderCenterInvalid or CylinderCenterArityInvalid or CylinderCenterNotFinite or SideHoleCenterExceedsClearance;
private static IReadOnlyList<FirmamentV2Exposure> ParseExposures(string body, List<string> diagnostics)
{
@@ -226,8 +231,12 @@ public static class FirmamentV2Parser
var cut = ParseCut(body[(open + 1)..close], diagnostics);
if (attach is null || cut is null) return null;
if (attach.Axis != "+X" || cut.Tool.Through.Axis != "-X") diagnostics.Add(SideHoleOnlyPlusXMinusXSupported);
- var clearance = Math.Min(solid.Box.Size[1], solid.Box.Size[2]) / 2.0;
- if (cut.Tool.Radius >= clearance) diagnostics.Add(SideHoleRadiusExceedsClearance);
+ var yHalfExtent = solid.Box.Size[1] / 2.0;
+ var zHalfExtent = solid.Box.Size[2] / 2.0;
+ if (cut.Tool.Radius >= Math.Min(yHalfExtent, zHalfExtent)) diagnostics.Add(SideHoleRadiusExceedsClearance);
+ var centerU = cut.Tool.Center?.U ?? 0;
+ var centerV = cut.Tool.Center?.V ?? 0;
+ if (Math.Abs(centerU) + cut.Tool.Radius >= yHalfExtent || Math.Abs(centerV) + cut.Tool.Radius >= zHalfExtent) diagnostics.Add(SideHoleCenterExceedsClearance);
return diagnostics.Any(IsFatalDiagnostic) ? null : new(rm.Groups["name"].Value, "FaceAttachedRegion", attach, cut);
}
@@ -246,10 +255,22 @@ public static class FirmamentV2Parser
if (!double.TryParse(radiusMatch.Groups["value"].Value, NumberStyles.Float, CultureInfo.InvariantCulture, out var radius)) { diagnostics.Add(CylinderRadiusInvalid); return null; }
if (!double.IsFinite(radius)) { diagnostics.Add(CylinderRadiusNotFinite); return null; }
if (radius <= 0) { diagnostics.Add(CylinderRadiusInvalid); return null; }
+ var center = ParseCenter(toolBody, diagnostics);
var throughMatch = ThroughRegex.Match(toolBody);
var through = throughMatch.Success ? ParseFaceSelector(throughMatch.Groups["selector"].Value, ThroughSelectorUnsupported, diagnostics) : null;
if (through is null) { diagnostics.Add(ThroughSelectorUnsupported); return null; }
- return new("Cut", new("Cylinder", radius, through));
+ return new("Cut", new("Cylinder", radius, center, through));
+ }
+
+ private static FirmamentV2FaceLocalPoint2D? ParseCenter(string toolBody, List<string> diagnostics)
+ {
+ var match = CenterRegex.Match(toolBody);
+ if (!match.Success) return null;
+ var parts = match.Groups["values"].Value.Split(',', StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries);
+ if (parts.Length != 2) { diagnostics.Add(CylinderCenterArityInvalid); return null; }
+ if (!double.TryParse(parts[0], NumberStyles.Float, CultureInfo.InvariantCulture, out var u) || !double.TryParse(parts[1], NumberStyles.Float, CultureInfo.InvariantCulture, out var v)) { diagnostics.Add(CylinderCenterInvalid); return null; }
+ if (!double.IsFinite(u) || !double.IsFinite(v)) { diagnostics.Add(CylinderCenterNotFinite); return null; }
+ return new FirmamentV2FaceLocalPoint2D(u, v, FirmamentV2FaceLocalPoint2D.PlusXConvention);
}
private static FirmamentV2FaceSelector? ParseFaceSelector(string selector, string diagnostic, List<string> diagnostics)
diff --git a/docs/air-firmament-a1-firmament-fixture-corpus.md b/docs/air-firmament-a1-firmament-fixture-corpus.md
index 6a632f3d..dd7fd03a 100644
--- a/docs/air-firmament-a1-firmament-fixture-corpus.md
+++ b/docs/air-firmament-a1-firmament-fixture-corpus.md
@@ -190,3 +190,8 @@ A2.2 expands the `fixtures/FirmamentV2/` metadata-only taxonomy with `RecordDeri
## AIR-FIRMAMENT-X6 V2 side-hole radius variation status
The Firmament V2 region corpus now includes controlled valid side-hole radius variation fixtures for radius `0.5` and `1.5`, plus invalid radius fixtures for zero, negative, and clearance-exceeding radii. These fixtures remain parser-backed and bounded to the same `base` Box, `face(+X)` to `face(-X)`, single `cut Cylinder` side-hole path; they do not migrate the broad corpus or add general side-hole support.
+
+
+## AIR-FIRMAMENT-X7 fixture taxonomy update
+
+X7 adds controlled Firmament V2 Region side-hole center-offset fixtures under `fixtures/FirmamentV2/Region/valid` and matching clearance/arity invalid fixtures under `fixtures/FirmamentV2/Region/invalid`. These remain parser-backed controlled Region fixtures, not broad corpus migration or general side-hole support.
diff --git a/docs/air-firmament-x5-v2-side-hole-artifacts-parity.md b/docs/air-firmament-x5-v2-side-hole-artifacts-parity.md
index fb14d070..b2d5e63a 100644
--- a/docs/air-firmament-x5-v2-side-hole-artifacts-parity.md
+++ b/docs/air-firmament-x5-v2-side-hole-artifacts-parity.md
@@ -111,3 +111,7 @@ Recommended next milestone: add a thin explicit V2 side-hole-to-AIR-region adapt
## AIR-FIRMAMENT-X6 radius variation follow-up
AIR-FIRMAMENT-X6 keeps the X5 canonical `side-hole-v2` artifact workflow green and extends the same generated-on-demand behavior to controlled non-1 V2 side-hole radius fixtures. Radius-specific fixtures use radius-specific file stems in their own output directories and record the actual radius in trace JSON/text and `manifest.json`; this is still not general side-hole support.
+
+## X7 center-offset artifact note
+
+AIR-FIRMAMENT-X7 keeps canonical centered `side-hole-v2.*` artifact names and extends generated-on-demand stems for offset fixtures, for example `side-hole-center-y1-v2.step`, `side-hole-center-y1-v2.trace.json`, and `side-hole-center-y1-v2.trace.txt`. Separate output directories remain the overwrite-prevention boundary, and manifests now include center evidence when Firmament V2 side-hole semantic intent carries it.
diff --git a/docs/air-firmament-x6-v2-side-hole-radius-variation.md b/docs/air-firmament-x6-v2-side-hole-radius-variation.md
index 2bc24cee..8610d4e8 100644
--- a/docs/air-firmament-x6-v2-side-hole-radius-variation.md
+++ b/docs/air-firmament-x6-v2-side-hole-radius-variation.md
@@ -84,4 +84,4 @@ The generated-on-demand artifact workflow remains active. Canonical radius `1` k
## Next milestone recommendation
-AIR-FIRMAMENT-X7 — controlled V2 side-hole center offset.
+AIR-FIRMAMENT-X7 — controlled V2 side-hole center offset (implemented as the next bounded variation; see `docs/air-firmament-x7-v2-side-hole-center-offset.md`).
diff --git a/docs/air-firmament-x7-v2-side-hole-center-offset.md b/docs/air-firmament-x7-v2-side-hole-center-offset.md
new file mode 100644
index 00000000..ad07a66e
--- /dev/null
+++ b/docs/air-firmament-x7-v2-side-hole-center-offset.md
@@ -0,0 +1,72 @@
+# AIR-FIRMAMENT-X7 — V2 side-hole center offset
+
+## Purpose and scope
+
+X7 generalizes the parser-backed Firmament V2 controlled side-hole path from radius-only variation to a bounded face-local center-offset parameter.
+
+## Relationship to X4, X5, and X6
+
+- X4 introduced the parser-backed V2 `sideHole` source shape and lowered it to the existing AIR Region golden trace chain.
+- X5 locked generated-on-demand V2 side-hole artifacts and X13 parity.
+- X6 proved the same path is parameterized by radius.
+- X7 keeps that same controlled path and adds only center offset evidence.
+
+## Controlled center-offset-only variation
+
+The supported shape remains one Box solid named `base`, one `modify base`, one `region sideHole on face(+X)`, one `cut Cylinder`, and `through: face(-X)`.
+
+## Supported source syntax
+
+`cut Cylinder` accepts optional `center: [u, v]`. If omitted, center defaults to `[0, 0]` and is marked non-explicit in semantic intent.
+
+## Face-local coordinate convention
+
+For `face(+X)`, `u=+Y` and `v=+Z`. The stable frame label is `face(+X):u=+Y,v=+Z`.
+
+## Valid center fixtures
+
+- `fixtures/FirmamentV2/Region/valid/side-hole-center-y1-v2.valid.firmfixture`
+- `fixtures/FirmamentV2/Region/valid/side-hole-center-z1-v2.valid.firmfixture`
+- `fixtures/FirmamentV2/Region/valid/side-hole-center-y1-z1-v2.valid.firmfixture`
+
+## Invalid center fixtures
+
+- `fixtures/FirmamentV2/Region/invalid/side-hole-center-y-boundary-v2.invalid.firmfixture`
+- `fixtures/FirmamentV2/Region/invalid/side-hole-center-z-boundary-v2.invalid.firmfixture`
+- `fixtures/FirmamentV2/Region/invalid/side-hole-center-arity-one-v2.invalid.firmfixture`
+- `fixtures/FirmamentV2/Region/invalid/side-hole-center-arity-three-v2.invalid.firmfixture`
+
+## Center/radius admissibility and clearance rule
+
+For Box `[10, 8, 6]`, the transverse half extents are `Y=4` and `Z=3`. X7 admits only strict clearance:
+
+```text
+abs(u) + radius < YHalfExtent
+abs(v) + radius < ZHalfExtent
+```
+
+Tangent/equality cases are rejected with `firmament-v2-side-hole-center-exceeds-clearance`.
+
+## Trace JSON/text center evidence
+
+Trace JSON preserves `centerU`, `centerV`, `centerExplicit`, and `centerSelectorFrame` in semantic intent. AIR Region trace evidence carries the same center into the circle profile. Text output includes the center and the face-local frame.
+
+## Artifact behavior for offset-specific fixtures
+
+Generated-on-demand artifacts derive offset-specific stems such as `side-hole-center-y1-v2.step`, `side-hole-center-y1-v2.trace.json`, and `side-hole-center-y1-v2.trace.txt`, plus `manifest.json`. The manifest records radius, center, tool, and through selector.
+
+## What this proves
+
+V2 side-hole lowering can carry a face-local 2D coordinate parameter through source, semantic intent, AIR Region trace evidence, and generated artifact manifests.
+
+## What this does not prove
+
+X7 does not add arbitrary face pairs, arbitrary local frames beyond +X, blind holes, general side-hole support, generic Boolean admission, or CIR topology authority.
+
+## Tests run
+
+Run the active .NET build/test commands for X7 changes, including targeted Firmament V2 side-hole center tests and CLI trace/artifact tests.
+
+## Next milestone recommendation
+
+AIR-FIRMAMENT-X8 — controlled V2 side-hole selector aliases using X3 exposures, for example `face(+X) => right` and `face(-X) => left`.
diff --git a/fixtures/FirmamentV2/Region/invalid/side-hole-center-arity-one-v2.invalid.firmfixture b/fixtures/FirmamentV2/Region/invalid/side-hole-center-arity-one-v2.invalid.firmfixture
new file mode 100644
index 00000000..0c0a255f
--- /dev/null
+++ b/fixtures/FirmamentV2/Region/invalid/side-hole-center-arity-one-v2.invalid.firmfixture
@@ -0,0 +1,27 @@
+// fixture-id: side-hole-center-arity-one-v2
+// case: firmament-v2-side-hole-center-offset
+// category: Region
+// syntax-version: FirmamentV2
+// validity: invalid
+// implementation: parser-backed
+// expected: invalid
+// expected-stage: parsed
+// expected-diagnostic: firmament-v2-cylinder-center-arity-invalid
+
+model SideHoleCenterArityOneV2 {
+ units mm
+
+ solid base: Box {
+ size: [10, 8, 6]
+ }
+
+ modify base {
+ region sideHole on face(+X) {
+ cut Cylinder {
+ radius: 1
+ center: [1]
+ through: face(-X)
+ }
+ }
+ }
+}
diff --git a/fixtures/FirmamentV2/Region/invalid/side-hole-center-arity-three-v2.invalid.firmfixture b/fixtures/FirmamentV2/Region/invalid/side-hole-center-arity-three-v2.invalid.firmfixture
new file mode 100644
index 00000000..55b3d8ec
--- /dev/null
+++ b/fixtures/FirmamentV2/Region/invalid/side-hole-center-arity-three-v2.invalid.firmfixture
@@ -0,0 +1,27 @@
+// fixture-id: side-hole-center-arity-three-v2
+// case: firmament-v2-side-hole-center-offset
+// category: Region
+// syntax-version: FirmamentV2
+// validity: invalid
+// implementation: parser-backed
+// expected: invalid
+// expected-stage: parsed
+// expected-diagnostic: firmament-v2-cylinder-center-arity-invalid
+
+model SideHoleCenterArityThreeV2 {
+ units mm
+
+ solid base: Box {
+ size: [10, 8, 6]
+ }
+
+ modify base {
+ region sideHole on face(+X) {
+ cut Cylinder {
+ radius: 1
+ center: [1, 2, 3]
+ through: face(-X)
+ }
+ }
+ }
+}
diff --git a/fixtures/FirmamentV2/Region/invalid/side-hole-center-y-boundary-v2.invalid.firmfixture b/fixtures/FirmamentV2/Region/invalid/side-hole-center-y-boundary-v2.invalid.firmfixture
new file mode 100644
index 00000000..498083c4
--- /dev/null
+++ b/fixtures/FirmamentV2/Region/invalid/side-hole-center-y-boundary-v2.invalid.firmfixture
@@ -0,0 +1,27 @@
+// fixture-id: side-hole-center-y-boundary-v2
+// case: firmament-v2-side-hole-center-offset
+// category: Region
+// syntax-version: FirmamentV2
+// validity: invalid
+// implementation: parser-backed
+// expected: invalid
+// expected-stage: parsed
+// expected-diagnostic: firmament-v2-side-hole-center-exceeds-clearance
+
+model SideHoleCenterYBoundaryV2 {
+ units mm
+
+ solid base: Box {
+ size: [10, 8, 6]
+ }
+
+ modify base {
+ region sideHole on face(+X) {
+ cut Cylinder {
+ radius: 1
+ center: [3, 0]
+ through: face(-X)
+ }
+ }
+ }
+}
diff --git a/fixtures/FirmamentV2/Region/invalid/side-hole-center-z-boundary-v2.invalid.firmfixture b/fixtures/FirmamentV2/Region/invalid/side-hole-center-z-boundary-v2.invalid.firmfixture
new file mode 100644
index 00000000..8878404c
--- /dev/null
+++ b/fixtures/FirmamentV2/Region/invalid/side-hole-center-z-boundary-v2.invalid.firmfixture
@@ -0,0 +1,27 @@
+// fixture-id: side-hole-center-z-boundary-v2
+// case: firmament-v2-side-hole-center-offset
+// category: Region
+// syntax-version: FirmamentV2
+// validity: invalid
+// implementation: parser-backed
+// expected: invalid
+// expected-stage: parsed
+// expected-diagnostic: firmament-v2-side-hole-center-exceeds-clearance
+
+model SideHoleCenterZBoundaryV2 {
+ units mm
+
+ solid base: Box {
+ size: [10, 8, 6]
+ }
+
+ modify base {
+ region sideHole on face(+X) {
+ cut Cylinder {
+ radius: 1
+ center: [0, 2]
+ through: face(-X)
+ }
+ }
+ }
+}
diff --git a/fixtures/FirmamentV2/Region/valid/side-hole-center-y1-v2.valid.firmfixture b/fixtures/FirmamentV2/Region/valid/side-hole-center-y1-v2.valid.firmfixture
new file mode 100644
index 00000000..c70e297d
--- /dev/null
+++ b/fixtures/FirmamentV2/Region/valid/side-hole-center-y1-v2.valid.firmfixture
@@ -0,0 +1,29 @@
+// fixture-id: side-hole-center-y1-v2
+// case: firmament-v2-side-hole-center-offset
+// category: Region
+// syntax-version: FirmamentV2
+// validity: valid
+// implementation: parser-backed
+// expected: valid
+// expected-stage: region-parent-integrated
+// expected-parent-integration: Integrated
+// expected-shell-closure: Closed
+// expected-step-smoke: Succeeded
+
+model SideHoleCenterY1V2 {
+ units mm
+
+ solid base: Box {
+ size: [10, 8, 6]
+ }
+
+ modify base {
+ region sideHole on face(+X) {
+ cut Cylinder {
+ radius: 1
+ center: [1, 0]
+ through: face(-X)
+ }
+ }
+ }
+}
diff --git a/fixtures/FirmamentV2/Region/valid/side-hole-center-y1-z1-v2.valid.firmfixture b/fixtures/FirmamentV2/Region/valid/side-hole-center-y1-z1-v2.valid.firmfixture
new file mode 100644
index 00000000..ef03c6d9
--- /dev/null
+++ b/fixtures/FirmamentV2/Region/valid/side-hole-center-y1-z1-v2.valid.firmfixture
@@ -0,0 +1,29 @@
+// fixture-id: side-hole-center-y1-z1-v2
+// case: firmament-v2-side-hole-center-offset
+// category: Region
+// syntax-version: FirmamentV2
+// validity: valid
+// implementation: parser-backed
+// expected: valid
+// expected-stage: region-parent-integrated
+// expected-parent-integration: Integrated
+// expected-shell-closure: Closed
+// expected-step-smoke: Succeeded
+
+model SideHoleCenterY1Z1V2 {
+ units mm
+
+ solid base: Box {
+ size: [10, 8, 6]
+ }
+
+ modify base {
+ region sideHole on face(+X) {
+ cut Cylinder {
+ radius: 1
+ center: [1, 1]
+ through: face(-X)
+ }
+ }
+ }
+}
diff --git a/fixtures/FirmamentV2/Region/valid/side-hole-center-z1-v2.valid.firmfixture b/fixtures/FirmamentV2/Region/valid/side-hole-center-z1-v2.valid.firmfixture
new file mode 100644
index 00000000..1912a304
--- /dev/null
+++ b/fixtures/FirmamentV2/Region/valid/side-hole-center-z1-v2.valid.firmfixture
@@ -0,0 +1,29 @@
+// fixture-id: side-hole-center-z1-v2
+// case: firmament-v2-side-hole-center-offset
+// category: Region
+// syntax-version: FirmamentV2
+// validity: valid
+// implementation: parser-backed
+// expected: valid
+// expected-stage: region-parent-integrated
+// expected-parent-integration: Integrated
+// expected-shell-closure: Closed
+// expected-step-smoke: Succeeded
+
+model SideHoleCenterZ1V2 {
+ units mm
+
+ solid base: Box {
+ size: [10, 8, 6]
+ }
+
+ modify base {
+ region sideHole on face(+X) {
+ cut Cylinder {
+ radius: 1
+ center: [0, 1]
+ through: face(-X)
+ }
+ }
+ }
+}