Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel
Add Firmament V2 side-hole alias targets
Yuechen Liad6b09520445
diff --git a/Aetheris.CLI.Tests/AirTraceCommandTests.cs b/Aetheris.CLI.Tests/AirTraceCommandTests.csindex 1a666f59..4500e616 100644--- a/Aetheris.CLI.Tests/AirTraceCommandTests.cs+++ b/Aetheris.CLI.Tests/AirTraceCommandTests.cs@@ -1122,6 +1122,45 @@ public sealed class AirTraceCommandTests}}++ [Fact]+ public void FirmamentV2SideHoleAliases_TraceJsonContainsAliasResolution()+ {+ var (_, output, _) = Run("trace", "--fixture", FirmamentV2Fixture("Region/valid/side-hole-aliases-v2.valid.firmfixture"), "--json");+ using var doc = JsonDocument.Parse(output);+ var region = doc.RootElement.GetProperty("firmamentV2").GetProperty("modifyBlocks")[0].GetProperty("regions")[0];+ Assert.Equal("right", region.GetProperty("on").GetString());+ Assert.Equal("Alias", region.GetProperty("onKind").GetString());+ Assert.Equal("face(+X)", region.GetProperty("resolvedOn").GetString());+ Assert.Equal("left", region.GetProperty("through").GetString());+ Assert.Equal("Alias", region.GetProperty("throughKind").GetString());+ Assert.Equal("face(-X)", region.GetProperty("resolvedThrough").GetString());+ }++ [Fact]+ public void FirmamentV2SideHoleAliases_TraceTextContainsAliasResolution()+ {+ var (_, output, _) = Run("trace", "--fixture", FirmamentV2Fixture("Region/valid/side-hole-aliases-v2.valid.firmfixture"));+ Assert.Contains("face(+X) => right", output);+ Assert.Contains("On: right", output);+ Assert.Contains("Resolved on: face(+X)", output);+ Assert.Contains("Through: left", output);+ Assert.Contains("Resolved through: face(-X)", output);+ }++ [Fact]+ public void FirmamentV2SideHoleAliases_ArtifactsEmit()+ {+ var dir = Path.Combine(Path.GetTempPath(), "aetheris-trace-tests", Guid.NewGuid().ToString("N"));+ Assert.Equal(0, Run("trace", "--fixture", FirmamentV2Fixture("Region/valid/side-hole-aliases-v2.valid.firmfixture"), "--out-dir", dir).ExitCode);+ Assert.All(new[] { "side-hole-aliases-v2.step", "side-hole-aliases-v2.trace.json", "side-hole-aliases-v2.trace.txt", "manifest.json" }, name => Assert.True(new FileInfo(Path.Combine(dir, name)).Length > 0, name));+ using var doc = JsonDocument.Parse(File.ReadAllText(Path.Combine(dir, "manifest.json")));+ Assert.Equal("right", doc.RootElement.GetProperty("attachTargetSource").GetString());+ Assert.Equal("face(+X)", doc.RootElement.GetProperty("attachResolvedSelector").GetString());+ Assert.Equal("left", doc.RootElement.GetProperty("throughTargetSource").GetString());+ Assert.Equal("face(-X)", doc.RootElement.GetProperty("throughResolvedSelector").GetString());+ }+[Fact]public void FirmamentV2SideHoleArtifacts_ManifestContainsGoldenPathFacts(){diff --git a/Aetheris.CLI/AirTrace.cs b/Aetheris.CLI/AirTrace.csindex 2871f116..d105d199 100644--- a/Aetheris.CLI/AirTrace.cs+++ b/Aetheris.CLI/AirTrace.cs@@ -56,7 +56,7 @@ internal sealed record AirTraceFirmamentV2Summary(string SyntaxVersion, string Minternal 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, FirmamentV2FaceLocalPoint2D? Center, string Through);+internal sealed record AirTraceFirmamentV2RegionSummary(string Name, string Kind, string On, string OnKind, string ResolvedOn, string OnRefType, string Operation, string Tool, double Radius, FirmamentV2FaceLocalPoint2D? Center, string Through, string ThroughKind, string ResolvedThrough, string ThroughRefType);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);@@ -163,7 +163,7 @@ internal static class AirTraceReportBuilderprofileEmissionProbe.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.Center, 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.OnKind, r.ResolvedOn, r.OnRefType, r.Operation, r.Tool, r.Radius, r.Center, r.Through, r.ThroughKind, r.ResolvedThrough, r.ThroughRefType)).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"),@@ -357,6 +357,7 @@ internal static class AirTraceTextRendererb.AppendLine($" Region: {region.Name}");b.AppendLine($" Kind: {region.Kind}");b.AppendLine($" On: {region.On}");+ if (!string.Equals(region.On, region.ResolvedOn, StringComparison.Ordinal)) b.AppendLine($" Resolved on: {region.ResolvedOn}");b.AppendLine($" Operation: {region.Operation}");b.AppendLine($" Tool: {region.Tool}");b.AppendLine($" Radius: {region.Radius:g}");@@ -364,6 +365,7 @@ internal static class AirTraceTextRendererb.AppendLine($" Center: [{cu:g}, {cv:g}]");b.AppendLine($" Center frame: face(+X) local u=+Y, v=+Z");b.AppendLine($" Through: {region.Through}");+ if (!string.Equals(region.Through, region.ResolvedThrough, StringComparison.Ordinal)) b.AppendLine($" Resolved through: {region.ResolvedThrough}");}}}@@ -372,6 +374,8 @@ internal static class AirTraceTextRendererb.AppendLine();b.AppendLine(" Lowering:");b.AppendLine(" Semantic intent: SideHole");+ if (r.FirmamentV2.SemanticIntent.AttachTargetKind == "Alias") b.AppendLine($" Attach alias: {r.FirmamentV2.SemanticIntent.AttachTargetSource} -> face({r.FirmamentV2.SemanticIntent.AttachFace})");+ if (r.FirmamentV2.SemanticIntent.ThroughTargetKind == "Alias") b.AppendLine($" Through alias: {r.FirmamentV2.SemanticIntent.ThroughTargetSource} -> face({r.FirmamentV2.SemanticIntent.ThroughFace})");b.AppendLine($" AIR Region: {(r.Regions is null ? "not-reached" : "FaceAttachedRegion golden trace chain")}");b.AppendLine($" Parent integration: {r.FirmamentV2.ParentIntegration ?? "not-reached"}");b.AppendLine($" Shell closure: {r.FirmamentV2.ShellClosure ?? "not-reached"}");diff --git a/Aetheris.CLI/CliRunner.cs b/Aetheris.CLI/CliRunner.csindex 4384a726..d1d5e9d9 100644--- a/Aetheris.CLI/CliRunner.cs+++ b/Aetheris.CLI/CliRunner.cs@@ -37,6 +37,10 @@ internal static class SideHoleGoldenPathArtifactsstepSmoke = report.FirmamentV2?.StepSmoke ?? "Succeeded",radius = report.FirmamentV2?.SemanticIntent?.Radius,tool = report.FirmamentV2?.SemanticIntent?.Tool,+ attachTargetSource = report.FirmamentV2?.SemanticIntent?.AttachTargetSource,+ attachResolvedSelector = report.FirmamentV2?.SemanticIntent is null ? null : $"face({report.FirmamentV2.SemanticIntent.AttachFace})",+ throughTargetSource = report.FirmamentV2?.SemanticIntent?.ThroughTargetSource,+ throughResolvedSelector = report.FirmamentV2?.SemanticIntent is null ? null : $"face({report.FirmamentV2.SemanticIntent.ThroughFace})",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),@@ -55,6 +59,7 @@ internal static class SideHoleGoldenPathArtifactsvar radius = report.FirmamentV2!.SemanticIntent!.Radius;var centerU = report.FirmamentV2!.SemanticIntent!.CenterU;var centerV = report.FirmamentV2!.SemanticIntent!.CenterV;+ if (report.FirmamentV2!.SemanticIntent!.AttachTargetKind == "Alias" || report.FirmamentV2!.SemanticIntent!.ThroughTargetKind == "Alias") return "side-hole-aliases-v2";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");diff --git a/Aetheris.Kernel.Firmament.Tests/FirmamentV2ParserTests.cs b/Aetheris.Kernel.Firmament.Tests/FirmamentV2ParserTests.csindex 4e2ba0d4..d795b3ef 100644--- a/Aetheris.Kernel.Firmament.Tests/FirmamentV2ParserTests.cs+++ b/Aetheris.Kernel.Firmament.Tests/FirmamentV2ParserTests.cs@@ -349,6 +349,69 @@ public sealed class FirmamentV2ParserTestsAssert.Contains("firmament-v2-no-v1-parser", result.Diagnostics);}++ [Fact]+ public void FirmamentV2SideHoleAliases_ParsesExposeAndAliasTargets()+ {+ var doc = FirmamentV2Parser.Parse(Source("Region/valid/side-hole-aliases-v2.valid.firmfixture")).Document!;+ Assert.Contains(doc.Solid.Box.Exposures, e => e.Alias == "right" && e.Selector == "face(+X)");+ Assert.Contains(doc.Solid.Box.Exposures, e => e.Alias == "left" && e.Selector == "face(-X)");+ var region = Assert.Single(Assert.Single(doc.ModifyBlocks!).Regions);+ Assert.Equal("right", region.Attachment.Source);+ Assert.Equal("Alias", region.Attachment.Kind);+ Assert.Equal("left", region.Cut.Tool.Through.Source);+ Assert.Equal("Alias", region.Cut.Tool.Through.Kind);+ }++ [Fact]+ public void FirmamentV2SideHoleAliases_ResolvesAliasesToFaceSelectors()+ {+ var region = Assert.Single(Assert.Single(FirmamentV2Parser.Parse(Source("Region/valid/side-hole-aliases-v2.valid.firmfixture")).Document!.ModifyBlocks!).Regions);+ Assert.Equal("face(+X)", region.Attachment.ResolvedSelector);+ Assert.Equal("+X", region.Attachment.Axis);+ Assert.Equal("FaceRef", region.Attachment.RefType);+ Assert.Equal("face(-X)", region.Cut.Tool.Through.ResolvedSelector);+ Assert.Equal("-X", region.Cut.Tool.Through.Axis);+ Assert.Equal("FaceRef", region.Cut.Tool.Through.RefType);+ }++ [Fact]+ public void FirmamentV2SideHoleAliases_ProducesSemanticIntent()+ {+ var intent = FirmamentV2Parser.Parse(Source("Region/valid/side-hole-aliases-v2.valid.firmfixture")).Document!.SideHoleIntent!;+ Assert.Equal("right", intent.AttachTargetSource);+ Assert.Equal("Alias", intent.AttachTargetKind);+ Assert.Equal("+X", intent.AttachFace);+ Assert.Equal("left", intent.ThroughTargetSource);+ Assert.Equal("Alias", intent.ThroughTargetKind);+ Assert.Equal("-X", intent.ThroughFace);+ Assert.Equal(1, intent.Radius);+ Assert.Equal(1, intent.CenterU);+ Assert.Equal(0, intent.CenterV);+ }++ [Fact]+ public void FirmamentV2SideHoleAliases_ReachGoldenPath()+ {+ var result = FirmamentFrontendTraceProbe.ParseV2Only(Source("Region/valid/side-hole-aliases-v2.valid.firmfixture"));+ 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 FirmamentV2SideHoleAliases_InvalidDiagnostics()+ {+ Assert.Contains(FirmamentV2Parser.AliasUnresolved, FirmamentV2Parser.Parse(Source("Region/invalid/side-hole-alias-unknown-on-v2.invalid.firmfixture")).Diagnostics);+ Assert.Contains(FirmamentV2Parser.AliasUnresolved, FirmamentV2Parser.Parse(Source("Region/invalid/side-hole-alias-unknown-through-v2.invalid.firmfixture")).Diagnostics);+ var loopDiagnostics = FirmamentV2Parser.Parse(Source("Region/invalid/side-hole-alias-loopref-on-v2.invalid.firmfixture")).Diagnostics;+ Assert.Contains(FirmamentV2Parser.SideHoleAliasMustResolveToFace, loopDiagnostics);+ Assert.Contains(FirmamentV2Parser.SideHoleAliasResolvesToUnsupportedFace, FirmamentV2Parser.Parse(Source("Region/invalid/side-hole-alias-wrong-face-v2.invalid.firmfixture")).Diagnostics);+ }+private static string Source(string relative){var path = Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, "../../../../fixtures/FirmamentV2", relative));diff --git a/Aetheris.Kernel.Firmament/FirmamentFrontendTraceProbe.cs b/Aetheris.Kernel.Firmament/FirmamentFrontendTraceProbe.csindex 850ea417..1a8e8669 100644--- a/Aetheris.Kernel.Firmament/FirmamentFrontendTraceProbe.cs+++ b/Aetheris.Kernel.Firmament/FirmamentFrontendTraceProbe.cs@@ -20,7 +20,7 @@ public sealed record FirmamentV2TraceSummary(string SyntaxVersion, string ModelNpublic 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, FirmamentV2FaceLocalPoint2D? Center, string Through);+public sealed record FirmamentV2RegionTraceSummary(string Name, string Kind, string On, string OnKind, string ResolvedOn, string OnRefType, string Operation, string Tool, double Radius, FirmamentV2FaceLocalPoint2D? Center, string Through, string ThroughKind, string ResolvedThrough, string ThroughRefType);public sealed record FirmamentPrimitiveAirTraceSummary(bool ParserBacked,@@ -107,7 +107,7 @@ public static class FirmamentFrontendTraceProbefeatureDiagnostics,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.Center, 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.Attachment.Kind, r.Attachment.ResolvedSelector, r.Attachment.RefType, r.Cut.OperationKind, r.Cut.Tool.ToolType, r.Cut.Tool.Radius, r.Cut.Tool.Center, r.Cut.Tool.Through.Source, r.Cut.Tool.Through.Kind, r.Cut.Tool.Through.ResolvedSelector, r.Cut.Tool.Through.RefType)).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.csindex a094de4f..7363371a 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, 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 FirmamentV2SideHoleIntent? SideHoleIntent => ModifyBlocks?.SelectMany(m => m.Regions.Select(r => new FirmamentV2SideHoleIntent(m.TargetSolid, r.Name, r.Attachment.Source, r.Attachment.Kind, r.Attachment.Axis, r.Cut.Tool.Through.Source, r.Cut.Tool.Through.Kind, 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)@@ -13,19 +13,25 @@ public sealed record FirmamentV2SolidBinding(string Name, string RecordType, Firpublic sealed record FirmamentV2BoxRecord(IReadOnlyList<double> Size, IReadOnlyList<FirmamentV2Exposure> Exposures);public sealed record FirmamentV2Exposure(string Alias, string SelectorKind, string Selector, string RefType, string Axis, string? Subselector);+public sealed record FirmamentV2FaceTarget(string Source, string Kind, string Axis, string ResolvedSelector, string RefType)+{+ public static FirmamentV2FaceTarget Direct(string axis) => new($"face({axis})", "DirectSelector", axis, $"face({axis})", "FaceRef");+ public static FirmamentV2FaceTarget Alias(string alias, string axis) => new(alias, "Alias", axis, $"face({axis})", "FaceRef");+}+public sealed record FirmamentV2FaceSelector(string Axis){public string Source => $"face({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 FirmamentV2RegionDecl(string Name, string Kind, FirmamentV2FaceTarget Attachment, FirmamentV2CutOperation Cut);public sealed record FirmamentV2CutOperation(string OperationKind, FirmamentV2CylinderTool Tool);-public sealed record FirmamentV2CylinderTool(string ToolType, double Radius, FirmamentV2FaceLocalPoint2D? Center, FirmamentV2FaceSelector Through);+public sealed record FirmamentV2CylinderTool(string ToolType, double Radius, FirmamentV2FaceLocalPoint2D? Center, FirmamentV2FaceTarget 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 FirmamentV2SideHoleIntent(string TargetSolid, string RegionName, string AttachTargetSource, string AttachTargetKind, string AttachFace, string ThroughTargetSource, string ThroughTargetKind, 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.csindex 9c8f17d2..68722e75 100644--- a/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentV2Parser.cs+++ b/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentV2Parser.cs@@ -40,6 +40,10 @@ public static class FirmamentV2Parserpublic const string CylinderRadiusMissing = "firmament-v2-cylinder-radius-missing";public const string CylinderRadiusInvalid = "firmament-v2-cylinder-radius-invalid";public const string ThroughSelectorUnsupported = "firmament-v2-through-selector-unsupported";+ public const string AliasUnresolved = "firmament-v2-alias-unresolved";+ public const string AliasRefTypeUnsupported = "firmament-v2-alias-ref-type-unsupported";+ public const string SideHoleAliasMustResolveToFace = "firmament-v2-side-hole-alias-must-resolve-to-face";+ public const string SideHoleAliasResolvesToUnsupportedFace = "firmament-v2-side-hole-alias-resolves-to-unsupported-face";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";@@ -58,10 +62,10 @@ public static class FirmamentV2Parserprivate static readonly Regex ExposureLineRegex = new(@"^\s*(?<selector>.+?)\s*=>\s*(?<alias>[A-Za-z_][A-Za-z0-9_]*)\s*$", RegexOptions.CultureInvariant);private static readonly Regex FaceSelectorRegex = new(@"^face\((?<axis>[+-][XYZ])\)(?<sub>\.[A-Za-z_][A-Za-z0-9_]*)?$", RegexOptions.CultureInvariant);private static readonly Regex ModifyHeaderRegex = new(@"\bmodify\s+(?<target>[A-Za-z_][A-Za-z0-9_]*)\s*\{", RegexOptions.CultureInvariant);- private static readonly Regex RegionHeaderRegex = new(@"\bregion\s+(?<name>[A-Za-z_][A-Za-z0-9_]*)\s+on\s+(?<selector>face\([^)]*\))\s*\{", RegexOptions.CultureInvariant);+ private static readonly Regex RegionHeaderRegex = new(@"\bregion\s+(?<name>[A-Za-z_][A-Za-z0-9_]*)\s+on\s+(?<target>face\([^)]*\)|[A-Za-z_][A-Za-z0-9_]*)\s*\{", RegexOptions.CultureInvariant);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 ThroughRegex = new(@"\bthrough\s*:\s*(?<target>face\([^)]*\)|[A-Za-z_][A-Za-z0-9_]*)", RegexOptions.CultureInvariant);private static readonly Regex CenterRegex = new(@"\bcenter\s*:\s*\[(?<values>[^\]]*)\]", RegexOptions.CultureInvariant | RegexOptions.Singleline);public static FirmamentV2ParseResult Parse(string sourceText)@@ -140,7 +144,7 @@ public static class FirmamentV2Parserreturn 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 or CylinderCenterInvalid or CylinderCenterArityInvalid or CylinderCenterNotFinite or SideHoleCenterExceedsClearance;+ 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 AliasUnresolved or AliasRefTypeUnsupported or SideHoleAliasMustResolveToFace or SideHoleAliasResolvesToUnsupportedFace or SideHoleOnlyPlusXMinusXSupported or SideHoleRadiusExceedsClearance or CylinderCenterInvalid or CylinderCenterArityInvalid or CylinderCenterNotFinite or SideHoleCenterExceedsClearance;private static IReadOnlyList<FirmamentV2Exposure> ParseExposures(string body, List<string> diagnostics){@@ -224,12 +228,14 @@ public static class FirmamentV2Parserif (regions.Count != 1) { diagnostics.Add(RegionUnsupported); return null; }var rm = regions[0];if (!string.Equals(rm.Groups["name"].Value, "sideHole", StringComparison.Ordinal)) { diagnostics.Add(RegionUnsupported); return null; }- var attach = ParseFaceSelector(rm.Groups["selector"].Value, RegionAttachmentSelectorUnsupported, diagnostics);+ var attach = ResolveFaceTarget(rm.Groups["target"].Value, solid, RegionAttachmentSelectorUnsupported, diagnostics);var open = body.IndexOf('{', rm.Index);var close = FindMatchingBrace(body, open);if (close < 0) { diagnostics.Add(RegionUnsupported); return null; }- var cut = ParseCut(body[(open + 1)..close], diagnostics);+ var cut = ParseCut(body[(open + 1)..close], solid, diagnostics);if (attach is null || cut is null) return null;+ if (attach.Kind == "Alias" && attach.Axis != "+X") diagnostics.Add(SideHoleAliasResolvesToUnsupportedFace);+ if (cut.Tool.Through.Kind == "Alias" && cut.Tool.Through.Axis != "-X") diagnostics.Add(SideHoleAliasResolvesToUnsupportedFace);if (attach.Axis != "+X" || cut.Tool.Through.Axis != "-X") diagnostics.Add(SideHoleOnlyPlusXMinusXSupported);var yHalfExtent = solid.Box.Size[1] / 2.0;var zHalfExtent = solid.Box.Size[2] / 2.0;@@ -240,7 +246,7 @@ public static class FirmamentV2Parserreturn diagnostics.Any(IsFatalDiagnostic) ? null : new(rm.Groups["name"].Value, "FaceAttachedRegion", attach, cut);}- private static FirmamentV2CutOperation? ParseCut(string body, List<string> diagnostics)+ private static FirmamentV2CutOperation? ParseCut(string body, FirmamentV2SolidBinding solid, List<string> diagnostics){var cuts = CutHeaderRegex.Matches(body);if (cuts.Count != 1) { diagnostics.Add(CutUnsupported); return null; }@@ -257,7 +263,7 @@ public static class FirmamentV2Parserif (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;+ var through = throughMatch.Success ? ResolveFaceTarget(throughMatch.Groups["target"].Value, solid, ThroughSelectorUnsupported, diagnostics) : null;if (through is null) { diagnostics.Add(ThroughSelectorUnsupported); return null; }return new("Cut", new("Cylinder", radius, center, through));}@@ -280,6 +286,26 @@ public static class FirmamentV2Parserreturn new(face.Groups["axis"].Value);}+ private static FirmamentV2FaceTarget? ResolveFaceTarget(string source, FirmamentV2SolidBinding solid, string directDiagnostic, List<string> diagnostics)+ {+ source = source.Trim();+ if (source.StartsWith("face(", StringComparison.Ordinal))+ {+ var selector = ParseFaceSelector(source, directDiagnostic, diagnostics);+ return selector is null ? null : FirmamentV2FaceTarget.Direct(selector.Axis);+ }++ var exposure = solid.Box.Exposures.FirstOrDefault(e => string.Equals(e.Alias, source, StringComparison.Ordinal));+ if (exposure is null) { diagnostics.Add(AliasUnresolved); return null; }+ if (!string.Equals(exposure.RefType, "FaceRef", StringComparison.Ordinal))+ {+ diagnostics.Add(AliasRefTypeUnsupported);+ diagnostics.Add(SideHoleAliasMustResolveToFace);+ return null;+ }+ return FirmamentV2FaceTarget.Alias(source, exposure.Axis);+ }+private static bool ContainsUnsupportedConstruct(string source) =>Regex.IsMatch(source, @"\b(concept|PMI|where|template|add|shell|fillet|chamfer|regions|profile|material|pattern)\b|<\s*Process\s*>", RegexOptions.CultureInvariant);diff --git a/docs/air-firmament-x3-v2-semantic-refs-expose.md b/docs/air-firmament-x3-v2-semantic-refs-expose.mdindex d6987d2f..29b45e5a 100644--- a/docs/air-firmament-x3-v2-semantic-refs-expose.md+++ b/docs/air-firmament-x3-v2-semantic-refs-expose.md@@ -69,3 +69,7 @@ The implementation was validated with targeted build, CLI trace/help, valid/inva## Next milestone recommendationThe next milestone should keep alias semantics metadata-only unless an explicit design lands for alias copying through derivation and selector-backed BRep/topology materialization.++## AIR-FIRMAMENT-X8 consumption++AIR-FIRMAMENT-X8 uses X3 parser-backed `=>` aliases as controlled V2 side-hole attach and through targets. The aliases remain scoped to the modified solid's exposure table and must resolve to FaceRef selectors for the bounded `+X` to `-X` side-hole path.diff --git a/docs/air-firmament-x7-v2-side-hole-center-offset.md b/docs/air-firmament-x7-v2-side-hole-center-offset.mdindex ad07a66e..1c0ebb9f 100644--- a/docs/air-firmament-x7-v2-side-hole-center-offset.md+++ b/docs/air-firmament-x7-v2-side-hole-center-offset.md@@ -70,3 +70,4 @@ Run the active .NET build/test commands for X7 changes, including targeted Firma## Next milestone recommendationAIR-FIRMAMENT-X8 — controlled V2 side-hole selector aliases using X3 exposures, for example `face(+X) => right` and `face(-X) => left`.+diff --git a/docs/air-firmament-x8-v2-side-hole-selector-aliases.md b/docs/air-firmament-x8-v2-side-hole-selector-aliases.mdnew file mode 100644index 00000000..1b75f709--- /dev/null+++ b/docs/air-firmament-x8-v2-side-hole-selector-aliases.md@@ -0,0 +1,88 @@+# AIR-FIRMAMENT-X8 — V2 side-hole selector aliases++## Purpose and scope++AIR-FIRMAMENT-X8 proves that parser-backed Firmament V2 `expose { ... }` aliases are source-level semantic references that can drive the controlled side-hole feature target path. Scope remains one `Box` solid named `base`, `modify base`, one `region sideHole`, one `cut Cylinder`, FaceRef aliases only, and the existing controlled `+X` attach to `-X` through route.++## Relationship to X3, X4, X6, and X7++- X3 introduced parser-backed semantic references and `=>` exposure aliases.+- X4 introduced the direct selector V2 side-hole syntax.+- X6 carried controlled radius variation through the same side-hole path.+- X7 carried face-local center offset through the same side-hole path.+- X8 connects X3 aliases to the X4/X6/X7 controlled side-hole intent path.++## Supported source syntax++```firmament+solid base: Box {+ size: [10, 8, 6]+ expose {+ face(+X) => right+ face(-X) => left+ }+}++modify base {+ region sideHole on right {+ cut Cylinder {+ radius: 1+ center: [1, 0]+ through: left+ }+ }+}+```++## Alias resolution semantics++Alias resolution happens after parsing against the modified solid's exposure table and before side-hole semantic intent finalization. For X8, aliases in `modify base` resolve only against `base` exposures. The preserved semantic intent records both source target facts (`right`, `left`) and resolved face facts (`+X`, `-X`).++## Alias scope++X8 aliases resolve against the modified solid's exposure table only. There is no arbitrary alias scope across solids, no cross-model aliasing, no mutation, and no rebinding.++## Supported alias target type++Only `FaceRef` aliases are supported as side-hole attach and through targets.++## Unsupported alias target types++`LoopRef`, `EdgeRef`, `VertexRef`, and feature-output refs are not feature targets in X8. LoopRef aliases are rejected when used as side-hole attach/through targets.++## Trace JSON/text alias evidence++Trace text includes exposure rows, alias source targets, resolved selectors, and lowering aliases such as `right -> face(+X)` and `left -> face(-X)`. Trace JSON includes stable region fields for source target, target kind, resolved selector, and ref type.++## Artifact/manifest behavior++The generated-on-demand artifact workflow writes `side-hole-aliases-v2.step`, `side-hole-aliases-v2.trace.json`, `side-hole-aliases-v2.trace.txt`, and `manifest.json`. The manifest records source aliases, resolved selectors, radius, center, center frame, controlled-fixture-only status, and that general side-hole support is still false.++## Valid and invalid fixtures++Valid fixture:++- `fixtures/FirmamentV2/Region/valid/side-hole-aliases-v2.valid.firmfixture`++Invalid fixtures:++- `fixtures/FirmamentV2/Region/invalid/side-hole-alias-unknown-on-v2.invalid.firmfixture`+- `fixtures/FirmamentV2/Region/invalid/side-hole-alias-unknown-through-v2.invalid.firmfixture`+- `fixtures/FirmamentV2/Region/invalid/side-hole-alias-loopref-on-v2.invalid.firmfixture`+- `fixtures/FirmamentV2/Region/invalid/side-hole-alias-wrong-face-v2.invalid.firmfixture`++## What this proves++`=>` exposure aliases can drive controlled side-hole feature intent in the real parser-backed V2 path and reach `region-parent-integrated` / `Integrated` / `Closed` / `Succeeded`.++## What this does not prove++X8 does not add arbitrary alias scope, arbitrary faces, general side-hole support, LoopRef/EdgeRef/VertexRef feature target support, blind holes, generic Boolean admission, CIR topology authority, templates/concepts/PMI, or `where`.++## Tests run++Use the active .NET build/test path plus targeted CLI/kernel tests and trace/artifact commands for the alias fixture.++## Next milestone recommendation++AIR-FIRMAMENT-X9 — controlled V2 side-hole face-pair variation. Keep X9 controlled; possible routes are reverse `face(-X)` to `face(+X)` or a separately defined `+Y` to `-Y` path after local-frame semantics are specified.diff --git a/fixtures/FirmamentV2/Region/invalid/side-hole-alias-loopref-on-v2.invalid.firmfixture b/fixtures/FirmamentV2/Region/invalid/side-hole-alias-loopref-on-v2.invalid.firmfixturenew file mode 100644index 00000000..04ee306b--- /dev/null+++ b/fixtures/FirmamentV2/Region/invalid/side-hole-alias-loopref-on-v2.invalid.firmfixture@@ -0,0 +1,22 @@+// fixture-id: side-hole-alias-loopref-on-v2+// case: firmament-v2-side-hole-alias-loopref-on+// category: Region+// syntax-version: FirmamentV2+// validity: invalid+// implementation: parser-backed+// expected: invalid+// expected-stage: parsed+// expected-diagnostic: firmament-v2-side-hole-alias-must-resolve-to-face+// parser-backed: true++model SideHoleLoopAliasOnV2 {+ units mm+ solid base: Box {+ size: [10, 8, 6]+ expose {+ face(+X).outerLoop => rightLoop+ face(-X) => left+ }+ }+ modify base { region sideHole on rightLoop { cut Cylinder { radius: 1 through: left } } }+}diff --git a/fixtures/FirmamentV2/Region/invalid/side-hole-alias-unknown-on-v2.invalid.firmfixture b/fixtures/FirmamentV2/Region/invalid/side-hole-alias-unknown-on-v2.invalid.firmfixturenew file mode 100644index 00000000..47a97080--- /dev/null+++ b/fixtures/FirmamentV2/Region/invalid/side-hole-alias-unknown-on-v2.invalid.firmfixture@@ -0,0 +1,16 @@+// fixture-id: side-hole-alias-unknown-on-v2+// case: firmament-v2-side-hole-alias-unknown-on+// category: Region+// syntax-version: FirmamentV2+// validity: invalid+// implementation: parser-backed+// expected: invalid+// expected-stage: parsed+// expected-diagnostic: firmament-v2-alias-unresolved+// parser-backed: true++model SideHoleUnknownAttachAliasV2 {+ units mm+ solid base: Box { size: [10, 8, 6] expose { face(-X) => left } }+ modify base { region sideHole on right { cut Cylinder { radius: 1 through: left } } }+}diff --git a/fixtures/FirmamentV2/Region/invalid/side-hole-alias-unknown-through-v2.invalid.firmfixture b/fixtures/FirmamentV2/Region/invalid/side-hole-alias-unknown-through-v2.invalid.firmfixturenew file mode 100644index 00000000..818f4880--- /dev/null+++ b/fixtures/FirmamentV2/Region/invalid/side-hole-alias-unknown-through-v2.invalid.firmfixture@@ -0,0 +1,16 @@+// fixture-id: side-hole-alias-unknown-through-v2+// case: firmament-v2-side-hole-alias-unknown-through+// category: Region+// syntax-version: FirmamentV2+// validity: invalid+// implementation: parser-backed+// expected: invalid+// expected-stage: parsed+// expected-diagnostic: firmament-v2-alias-unresolved+// parser-backed: true++model SideHoleUnknownThroughAliasV2 {+ units mm+ solid base: Box { size: [10, 8, 6] expose { face(+X) => right } }+ modify base { region sideHole on right { cut Cylinder { radius: 1 through: left } } }+}diff --git a/fixtures/FirmamentV2/Region/invalid/side-hole-alias-wrong-face-v2.invalid.firmfixture b/fixtures/FirmamentV2/Region/invalid/side-hole-alias-wrong-face-v2.invalid.firmfixturenew file mode 100644index 00000000..d66fe917--- /dev/null+++ b/fixtures/FirmamentV2/Region/invalid/side-hole-alias-wrong-face-v2.invalid.firmfixture@@ -0,0 +1,22 @@+// fixture-id: side-hole-alias-wrong-face-v2+// case: firmament-v2-side-hole-alias-wrong-face+// category: Region+// syntax-version: FirmamentV2+// validity: invalid+// implementation: parser-backed+// expected: invalid+// expected-stage: parsed+// expected-diagnostic: firmament-v2-side-hole-alias-resolves-to-unsupported-face+// parser-backed: true++model SideHoleWrongFaceAliasV2 {+ units mm+ solid base: Box {+ size: [10, 8, 6]+ expose {+ face(+Y) => topish+ face(-X) => left+ }+ }+ modify base { region sideHole on topish { cut Cylinder { radius: 1 through: left } } }+}diff --git a/fixtures/FirmamentV2/Region/valid/side-hole-aliases-v2.valid.firmfixture b/fixtures/FirmamentV2/Region/valid/side-hole-aliases-v2.valid.firmfixturenew file mode 100644index 00000000..a3d9058a--- /dev/null+++ b/fixtures/FirmamentV2/Region/valid/side-hole-aliases-v2.valid.firmfixture@@ -0,0 +1,45 @@+// fixture-id: side-hole-aliases-v2+// case: firmament-v2-side-hole-aliases+// 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+// expected-region-kind: FaceAttachedRegion+// expected-entry-face: +X+// expected-through-face: -X+// expected-attach-alias: right+// expected-through-alias: left+// expected-tool: Cylinder+// expected-radius: 1+// expected-center: [1, 0]+// expected-center-frame: face(+X):u=+Y,v=+Z+// parser-backed: true+// notes: AIR-FIRMAMENT-X8 parser-backed controlled V2 side-hole selector alias fixture.++model SideHoleAliasV2 {+ units mm++ solid base: Box {+ size: [10, 8, 6]++ expose {+ face(+X) => right+ face(-X) => left+ }+ }++ modify base {+ region sideHole on right {+ cut Cylinder {+ radius: 1+ center: [1, 0]+ through: left+ }+ }+ }+}