Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel
Support coplanar seam blind-drill mouths
Yuechen Lic94d46c138f1
diff --git a/Aetheris.CLI/CliRunner.cs b/Aetheris.CLI/CliRunner.csindex 814ab9bf..1fb98d7b 100644--- a/Aetheris.CLI/CliRunner.cs+++ b/Aetheris.CLI/CliRunner.cs@@ -532,6 +532,19 @@ public static class CliRunner]);}var composeResults = composeRequests.Select(request => SemanticTopologySelectionResolver.Resolve(emittedCompose.Body, emittedCompose.Correspondence, request)).ToArray();+ var mouthEdges = corridor is null ? [] : emittedCompose.Correspondence.Descendants+ .Where(x => x.SourceStableId == corridor.HoleId && x.Role == SemanticTopologyRole.TopBoundary && x.Edge is not null)+ .Select(x => x.Edge!.Value).OrderBy(x => x.Value).ToArray();+ var mouthTopology = corridor is null ? null : new+ {+ MouthOwnership = emittedCompose.Correspondence.ProvenanceChain.Contains("MultiFaceCoplanarMouth", StringComparer.Ordinal) ? "MultiFaceCoplanar" : "SingleFace",+ affectedHostFaceIds = emittedCompose.Plan?.TopologyPlan?.FaceMappings.Where(x => x.Kind == "HostFaceReplacement").Select(x => x.FaceId.Value).OrderBy(x => x).ToArray(),+ planningSeam = emittedCompose.Correspondence.ProvenanceChain.Contains("ExactLineCircleSplit", StringComparer.Ordinal) ? "section-stack-internal" : null,+ mouthArcDescendants = mouthEdges.Select(x => x.Value),+ intersectionVertices = emittedCompose.Plan?.TopologyPlan?.Topology.Edges.Where(x => mouthEdges.Contains(x.Id)).SelectMany(x => new[] { x.StartVertexId.Value, x.EndVertexId.Value }).Distinct().OrderBy(x => x).ToArray(),+ semanticMouthLoopOrder = composeResults.Where(x => x.Request.Role == SemanticTopologyRole.HoleEntryLoop).SelectMany(x => x.OrderedChain).Select(x => x.StableId),+ noCap = emittedCompose.Correspondence.ProvenanceChain.Contains("NoInternalCaps", StringComparer.Ordinal)+ };stdout.WriteLine(JsonSerializer.Serialize(new{body = emittedCompose.Correspondence.BodyStableId,@@ -549,6 +562,7 @@ public static class CliRunnerConservativeRejection = corridor.Classification == BlindDrillToolCorridorClassification.FullRadiusTipClearanceFailed,diagnostics = corridor.Diagnostics},+ mouthTopology,arrangement = stack.Slabs.Select(s => new { slab = new[] { s.From, s.To }, fragments = s.Arrangement?.AtomicFragments.Select(f => new { f.StableId, source = f.Source.Provenance.StableId, f.FromParameter, f.ToParameter, f.MaterialOnLeft, f.Retained }) }),diagnostics = composeDiagnostics.Concat(composeParseDiagnostics).Concat(bridgeDiagnostics).Distinct()}, JsonOptions));diff --git a/Aetheris.Kernel.Firmament.Tests/SectionStackBlindDrillCavityPlanTests.cs b/Aetheris.Kernel.Firmament.Tests/SectionStackBlindDrillCavityPlanTests.csindex 14bba146..b6280f55 100644--- a/Aetheris.Kernel.Firmament.Tests/SectionStackBlindDrillCavityPlanTests.cs+++ b/Aetheris.Kernel.Firmament.Tests/SectionStackBlindDrillCavityPlanTests.cs@@ -32,14 +32,93 @@ public sealed class SectionStackBlindDrillCavityPlanTests}[Fact]- public void ComposeSource_MouthCrossingInternalSlabIsRejectedBeforeTopologyMaterialization()+ public void ComposeSource_MouthCrossingInternalSlab_IsOneExactMultiFaceMouth(){- var source = Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, "../../../../fixtures/FirmamentV2/ProfileComposition/invalid/construction-plane-blind-drill-mouth-crosses-slab.firmament"));+ var source = Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, "../../../../fixtures/FirmamentV2/ProfileComposition/valid/construction-plane-blind-drill-mouth-crosses-slab.firmament"));+ var output = Path.Combine(Path.GetTempPath(), "aetheris-seam-mouth-" + Guid.NewGuid().ToString("N") + ".step");- var exported = FirmamentBuildAndExport.Run(source, Path.Combine(Path.GetTempPath(), "aetheris-unreachable.step"));+ try+ {+ var exported = FirmamentBuildAndExport.Run(source, output);+ Assert.True(exported.IsSuccess, string.Join(" | ", exported.Diagnostics.Select(x => x.Message)));+ var imported = Step242Importer.ImportBody(File.ReadAllText(output));+ Assert.True(imported.IsSuccess, string.Join(" | ", imported.Diagnostics.Select(x => x.Message)));+ var mass = BrepMassProperties.Evaluate(imported.Value);+ Assert.True(mass.IsEnclosed, string.Join(" | ", mass.Diagnostics));+ Assert.True(mass.IsOrientationConsistent, string.Join(" | ", mass.Diagnostics));+ }+ finally+ {+ if (File.Exists(output)) File.Delete(output);+ }+ }++ [Fact]+ public void ComposeSource_MouthTangentToInternalSlab_IsRejectedWithTypedDiagnostic()+ {+ var source = Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, "../../../../fixtures/FirmamentV2/ProfileComposition/invalid/construction-plane-blind-drill-mouth-crosses-slab.firmament"));+ var exported = FirmamentBuildAndExport.Run(source, Path.Combine(Path.GetTempPath(), "aetheris-tangent-unreachable.step"));Assert.False(exported.IsSuccess);- Assert.Contains(exported.Diagnostics, x => x.Message == "SectionStackBlindDrillMouthCrossesHostPlanningPartition");+ Assert.Contains(exported.Diagnostics, x => x.Message == "SectionStackMouthSeamTangent");+ }++ [Fact]+ public void CoplanarSeamMouth_UsesSharedIntersectionVertices_AndRemovesTheSeamAcrossOpening()+ {+ var stack = Stack(); var host = PrismaticSectionStackEmitter.TryPlan(stack).Plan!;+ var placement = new AirConstructionPlaneHolePlacement("construction:+X", "concept:+X", new Point3D(-20, 0, 5),+ Direction3D.Create(new Vector3D(0, 1, 0)), Direction3D.Create(new Vector3D(0, 0, 1)), Direction3D.Create(new Vector3D(1, 0, 0)), 0, 0, "test", "test");+ var feature = AirHoleFeature.CreateConstructionPlaneSimpleShaft("SeamBlind", "Host.SeamBlind", "Host", placement, new AirHoleShaft(2),+ new AirHoleEndCondition.ShaftDepth(10), new AirProvenance("test", "test", "SeamBlind", "Host.SeamBlind", "test", AirSelectionClass.None, AirRuleKind.None, "test", true, []), new AirHoleTermination.DrillPoint());+ var corridor = TransverseBlindDrillToolCorridor.Prove(feature, stack, placement);+ var mouthFaces = host.TopologyPlan!.FaceMappings.Where(mapping => mapping.Kind == "PrismaticSide" && mapping.SourceStableId.Contains("West", StringComparison.Ordinal)).Select(mapping => mapping.FaceId).OrderBy(id => id.Value).ToArray();++ var cavity = SectionStackBlindDrillCavityPlanner.TryPlan(new(stack, host, feature, placement, corridor, mouthFaces), out var diagnostics);++ Assert.NotNull(cavity); Assert.Equal(2, cavity!.FaceReplacements.Count);+ Assert.Contains("SectionStackMouthOwnershipMultiFaceCoplanar", diagnostics);+ var plan = cavity.ReplacementHostPlan.TopologyPlan!;+ var originalSeam = host.TopologyPlan.Topology.Loops+ .Where(loop => mouthFaces.Contains(host.TopologyPlan.Topology.Faces.Single(face => face.LoopIds.Contains(loop.Id)).Id))+ .SelectMany(loop => loop.CoedgeIds).Select(id => host.TopologyPlan.Topology.Coedges.Single(coedge => coedge.Id == id).EdgeId)+ .GroupBy(id => id).Single(group => group.Count() == 2).Key;+ var mouthEdges = plan.Correspondence.Descendants.Where(x => x.SourceStableId == feature.FeatureId && x.Role == SemanticTopologyRole.TopBoundary).Select(x => x.Edge!.Value).ToArray();+ Assert.Equal(2, mouthEdges.Distinct().Count());+ Assert.Single(plan.Correspondence.Descendants.Where(x => x.SourceStableId == feature.FeatureId && x.Role == SemanticTopologyRole.HoleEntryLoop));+ var intersectionVertices = plan.Topology.Edges.Where(edge => mouthEdges.Contains(edge.Id)).SelectMany(edge => new[] { edge.StartVertexId, edge.EndVertexId }).Distinct().ToArray();+ Assert.Equal(2, intersectionVertices.Length);+ Assert.All(cavity.FaceReplacements, replacement =>+ {+ var face = plan.Topology.Faces.Single(x => x.Id == replacement.ReplacementFaceIds.Single());+ var edges = face.LoopIds.SelectMany(loopId => plan.Topology.Loops.Single(loop => loop.Id == loopId).CoedgeIds).Select(coedgeId => plan.Topology.Coedges.Single(coedge => coedge.Id == coedgeId).EdgeId).ToArray();+ Assert.Contains(edges, edge => mouthEdges.Contains(edge));+ Assert.DoesNotContain(originalSeam, edges);+ });+ var materialized = PrismaticSectionStackBrepMaterializer.TryMaterialize(plan);+ Assert.NotNull(materialized.Body); Assert.Empty(materialized.Diagnostics);+ var mass = BrepMassProperties.Evaluate(materialized.Body!);+ Assert.True(mass.IsEnclosed, string.Join(" | ", mass.Diagnostics));+ Assert.True(mass.IsOrientationConsistent, string.Join(" | ", mass.Diagnostics));+ }++ [Fact]+ public void CoplanarSeamMouth_OffCenter_UsesAsymmetricExactArcTrims()+ {+ var stack = Stack(); var host = PrismaticSectionStackEmitter.TryPlan(stack).Plan!;+ var placement = new AirConstructionPlaneHolePlacement("construction:+X", "concept:+X", new Point3D(-20, 0, 4.5),+ Direction3D.Create(new Vector3D(0, 1, 0)), Direction3D.Create(new Vector3D(0, 0, 1)), Direction3D.Create(new Vector3D(1, 0, 0)), 0, 0, "test", "test");+ var feature = AirHoleFeature.CreateConstructionPlaneSimpleShaft("SeamBlindOffset", "Host.SeamBlindOffset", "Host", placement, new AirHoleShaft(2),+ new AirHoleEndCondition.ShaftDepth(10), new AirProvenance("test", "test", "SeamBlindOffset", "Host.SeamBlindOffset", "test", AirSelectionClass.None, AirRuleKind.None, "test", true, []), new AirHoleTermination.DrillPoint());+ var corridor = TransverseBlindDrillToolCorridor.Prove(feature, stack, placement);+ var faces = host.TopologyPlan!.FaceMappings.Where(x => x.Kind == "PrismaticSide" && x.SourceStableId.Contains("West", StringComparison.Ordinal)).Select(x => x.FaceId).ToArray();+ var cavity = SectionStackBlindDrillCavityPlanner.TryPlan(new(stack, host, feature, placement, corridor, faces), out _);++ Assert.NotNull(cavity);+ var plan = cavity!.ReplacementHostPlan.TopologyPlan!;+ var arcs = plan.Correspondence.Descendants.Where(x => x.SourceStableId == feature.FeatureId && x.Role == SemanticTopologyRole.TopBoundary).Select(x => plan.Bindings.EdgeBindings.Single(binding => binding.EdgeId == x.Edge).TrimInterval!.Value).ToArray();+ Assert.Equal(2, arcs.Length);+ Assert.NotEqual(arcs[0].End - arcs[0].Start, arcs[1].End - arcs[1].Start);}[Fact]diff --git a/Aetheris.Kernel.Firmament/Materializer/SectionStackBlindDrillCavityPlan.cs b/Aetheris.Kernel.Firmament/Materializer/SectionStackBlindDrillCavityPlan.csindex f4b96450..d756f4c8 100644--- a/Aetheris.Kernel.Firmament/Materializer/SectionStackBlindDrillCavityPlan.cs+++ b/Aetheris.Kernel.Firmament/Materializer/SectionStackBlindDrillCavityPlan.cs@@ -19,7 +19,17 @@ internal sealed record SectionStackBlindDrillCavityInput(AirHoleFeature Hole,AirConstructionPlaneHolePlacement Placement,BlindDrillToolCorridorEvidence Corridor,- FaceId MouthHostFaceId);+ IReadOnlyList<FaceId> MouthHostFaceIds)+{+ public SectionStackBlindDrillCavityInput(+ PrismaticSectionStackConstruction host,+ PrismaticSectionStackBrepPlan hostPlan,+ AirHoleFeature hole,+ AirConstructionPlaneHolePlacement placement,+ BlindDrillToolCorridorEvidence corridor,+ FaceId mouthHostFaceId)+ : this(host, hostPlan, hole, placement, corridor, [mouthHostFaceId]) { }+}internal sealed record SectionStackHostFaceReplacement(FaceId OriginalFaceId, IReadOnlyList<FaceId> ReplacementFaceIds);@@ -42,6 +52,13 @@ internal static class SectionStackBlindDrillCavityPlannerpublic static SectionStackBlindDrillCavityPlan? TryPlan(SectionStackBlindDrillCavityInput input, out IReadOnlyList<string> diagnostics){+ if (input.MouthHostFaceIds.Count == 2)+ return TryPlanAcrossCoplanarPlanningSeam(input, out diagnostics);+ if (input.MouthHostFaceIds.Count != 1)+ {+ diagnostics = ["SectionStackMouthArcOwnershipAmbiguous"];+ return null;+ }var d = new List<string>();if (input.Corridor.Classification != BlindDrillToolCorridorClassification.CorridorProven)d.Add("SectionStackBlindDrillCorridorNotProven");@@ -55,11 +72,12 @@ internal static class SectionStackBlindDrillCavityPlannerd.Add("SectionStackBlindDrillMissingAuthoritativeHostPlan");if (d.Count != 0) { diagnostics = d; return null; }- var mapping = source!.FaceMappings.SingleOrDefault(x => x.FaceId == input.MouthHostFaceId && x.Kind == "PrismaticSide");+ var mouthHostFaceId = input.MouthHostFaceIds[0];+ var mapping = source!.FaceMappings.SingleOrDefault(x => x.FaceId == mouthHostFaceId && x.Kind == "PrismaticSide");if (mapping is null) d.Add("SectionStackBlindDrillMouthFaceProvenanceMissing");- if (!source.Topology.TryGetFace(input.MouthHostFaceId, out var originalFace) || originalFace is null) d.Add("SectionStackBlindDrillMouthFaceMissing");+ if (!source.Topology.TryGetFace(mouthHostFaceId, out var originalFace) || originalFace is null) d.Add("SectionStackBlindDrillMouthFaceMissing");SurfaceGeometry? originalSurface = null;- if (!source.Bindings.TryGetFaceBinding(input.MouthHostFaceId, out var originalBinding)+ if (!source.Bindings.TryGetFaceBinding(mouthHostFaceId, out var originalBinding)|| !source.Geometry.TryGetSurface(originalBinding.SurfaceGeometryId, out originalSurface)|| originalSurface?.Kind != SurfaceGeometryKind.Plane)d.Add("SectionStackBlindDrillMouthRequiresPlanarHostSideFace");@@ -73,7 +91,7 @@ internal static class SectionStackBlindDrillCavityPlannerif (shaft < -Tol || tipLength <= Tol) d.Add("SectionStackBlindDrillDepthInvalid");if (d.Count != 0) { diagnostics = d; return null; }- var topology = CopyTopologyExceptShells(source.Topology, input.MouthHostFaceId);+ var topology = CopyTopologyExceptShells(source.Topology, mouthHostFaceId);var geometry = CopyGeometry(source.Geometry); var bindings = CopyBindings(source.Bindings);var points = source.VertexPoints.ToDictionary(x => x.Key, x => x.Value);var nextVertex = source.Topology.Vertices.Max(x => x.Id.Value) + 1;@@ -113,7 +131,7 @@ internal static class SectionStackBlindDrillCavityPlannervar shaftFace = Face([shaftLoop], SurfaceGeometry.FromCylinder(new CylinderSurface(mouth, input.Placement.AxisZ, r, input.Placement.AxisX)), false);var coneFace = Face([coneLoop], SurfaceGeometry.FromCone(new ConeSurface(points[tip], Direction3D.Create(-axis), point!.PointAngleDegrees * Math.PI / 360d, input.Placement.AxisX)), false);- var shell = source.Topology.Shells.Single(); topology.AddShell(new Shell(shell.Id, shell.FaceIds.Where(x => x != input.MouthHostFaceId).Append(replacementFace).Append(shaftFace).Append(coneFace).ToArray()));+ var shell = source.Topology.Shells.Single(); topology.AddShell(new Shell(shell.Id, shell.FaceIds.Where(x => x != mouthHostFaceId).Append(replacementFace).Append(shaftFace).Append(coneFace).ToArray()));var body = source.Topology.Bodies.Single(); topology.AddBody(new Body(body.Id, body.ShellIds.ToArray()));var descendants = source.Correspondence.Descendants.Concat(new SemanticTopologyDescendant[]{@@ -126,17 +144,176 @@ internal static class SectionStackBlindDrillCavityPlannernew($"plan:{input.Hole.FeatureId}:tip", "Vertex", SemanticTopologyRole.HoleTipVertex, input.Hole.FeatureId, Vertex: tip, ParentStableId: input.Hole.FeatureId)}).ToArray();var correspondence = new SemanticTopologyCorrespondence(source.Correspondence.BodyStableId, descendants, source.Correspondence.ProvenanceChain.Concat(["SectionStackBlindDrillCavityPlan", "ConstructionProvenanceMouthFace", "NoInternalCaps"]).ToArray());- var mappings = source.FaceMappings.Where(x => x.FaceId != input.MouthHostFaceId).Append(new PrismaticSectionStackFacePlanMapping(replacementFace, "HostFaceReplacement", mapping!.SourceStableId, mapping.ConstructionStableId, mapping.SlabFrom, mapping.SlabTo, mapping.Provenance))+ var mappings = source.FaceMappings.Where(x => x.FaceId != mouthHostFaceId).Append(new PrismaticSectionStackFacePlanMapping(replacementFace, "HostFaceReplacement", mapping!.SourceStableId, mapping.ConstructionStableId, mapping.SlabFrom, mapping.SlabTo, mapping.Provenance)).Append(new PrismaticSectionStackFacePlanMapping(shaftFace, "BlindDrillShaft", input.Hole.FeatureId, mapping.ConstructionStableId, mapping.SlabFrom, mapping.SlabTo, ["SectionStackBlindDrillCavityPlan", "NoInternalCaps"])).Append(new PrismaticSectionStackFacePlanMapping(coneFace, "BlindDrillPoint", input.Hole.FeatureId, mapping.ConstructionStableId, mapping.SlabFrom, mapping.SlabTo, ["SectionStackBlindDrillCavityPlan", "NoInternalCaps"])) .ToArray();var topologyPlan = new PrismaticSectionStackTopologyPlan($"{source.StableId}:blind:{input.Hole.FeatureId}", topology, geometry, bindings, points, mappings, correspondence, correspondence.ProvenanceChain);var replacement = new PrismaticSectionStackBrepPlan($"{input.HostPlan.Signature}:blind:{input.Hole.FeatureId}", points.Count, topology.Edges.Count(), topology.Faces.Count(), input.HostPlan.Policy, true, correspondence, topologyPlan);d.Add("SectionStackBlindDrillCavityPlanCreated"); d.Add("SectionStackBlindDrillNoInternalCaps"); diagnostics = d;- return new($"section-stack-blind:{input.Hole.FeatureId}", input.HostPlan, replacement, [new(input.MouthHostFaceId, [replacementFace])], d);+ return new($"section-stack-blind:{input.Hole.FeatureId}", input.HostPlan, replacement, [new(mouthHostFaceId, [replacementFace])], d);+ }++ /// <summary>+ /// Bounded X1 variant of the same insertion: two adjacent section slabs own+ /// complementary exact arcs of one physical Mouth. The seam remains a+ /// planning boundary outside the circle and is deliberately absent through+ /// the opening. This is not a planar-arrangement or Boolean operation.+ /// </summary>+ private static SectionStackBlindDrillCavityPlan? TryPlanAcrossCoplanarPlanningSeam(SectionStackBlindDrillCavityInput input, out IReadOnlyList<string> diagnostics)+ {+ var d = new List<string>();+ var point = input.Hole.Termination as AirHoleTermination.DrillPoint;+ var source = input.HostPlan.TopologyPlan;+ if (input.Corridor.Classification != BlindDrillToolCorridorClassification.CorridorProven) d.Add("SectionStackBlindDrillCorridorNotProven");+ if (input.Corridor.ValidationPolicy != BlindDrillClearancePolicy.FullRadiusThroughTotalDepth) d.Add("SectionStackBlindDrillUnsupportedClearancePolicy");+ if (point is null || input.Hole.EndCondition is AirHoleEndCondition.ThroughAll) d.Add("SectionStackBlindDrillRequiresBlindDrillPoint");+ if (source is null) d.Add("SectionStackBlindDrillMissingAuthoritativeHostPlan");+ if (d.Count != 0) { diagnostics = d; return null; }++ var faceIds = input.MouthHostFaceIds.Distinct().OrderBy(x => x.Value).ToArray();+ if (faceIds.Length != 2) { diagnostics = ["SectionStackMouthArcOwnershipAmbiguous"]; return null; }+ var mappings = faceIds.Select(id => source!.FaceMappings.SingleOrDefault(x => x.FaceId == id && x.Kind == "PrismaticSide")).ToArray();+ if (mappings.Any(x => x is null)) d.Add("SectionStackBlindDrillMouthFaceProvenanceMissing");+ var faces = faceIds.Select(id => source!.Topology.TryGetFace(id, out var face) ? face : null).ToArray();+ if (faces.Any(x => x is null)) d.Add("SectionStackBlindDrillMouthFaceMissing");+ var bindings = new FaceGeometryBinding?[2];+ var surfaces = new SurfaceGeometry?[2];+ for (var index = 0; index < faceIds.Length; index++)+ {+ if (source!.Bindings.TryGetFaceBinding(faceIds[index], out var binding))+ {+ bindings[index] = binding;+ if (source.Geometry.TryGetSurface(binding.SurfaceGeometryId, out var surface)) surfaces[index] = surface;+ }+ }+ if (surfaces.Any(x => x?.Kind != SurfaceGeometryKind.Plane)) d.Add("SectionStackMouthSeamNotCoplanar");+ if (d.Count != 0) { diagnostics = d; return null; }++ var axis = input.Placement.AxisZ.ToVector(); var mouth = input.Placement.WorldMouthCenter;+ var normal = surfaces[0]!.Plane!.Value.Normal.ToVector();+ if (surfaces.Any(surface => Math.Abs(Math.Abs(surface!.Plane!.Value.Normal.ToVector().Dot(normal)) - 1d) > Tol+ || Math.Abs((surface.Plane.Value.Origin - surfaces[0]!.Plane!.Value.Origin).Dot(normal)) > Tol+ || Math.Abs(Math.Abs(axis.Dot(surface.Plane.Value.Normal.ToVector())) - 1d) > Tol+ || Math.Abs((mouth - surface.Plane.Value.Origin).Dot(surface.Plane.Value.Normal.ToVector())) > Tol))+ d.Add("SectionStackMouthSeamNotCoplanar");+ // Construction source identity plus adjacent slab extents is the proof+ // that this is a planning partition, not an exterior/material edge.+ if (mappings[0]!.SourceStableId != mappings[1]!.SourceStableId+ || mappings.Any(mapping => mapping!.SlabFrom is null || mapping.SlabTo is null)+ || Math.Abs(mappings[0]!.SlabTo!.Value - mappings[1]!.SlabFrom!.Value) > Tol && Math.Abs(mappings[1]!.SlabTo!.Value - mappings[0]!.SlabFrom!.Value) > Tol)+ d.Add("SectionStackMouthSeamPhysicalBoundary");+ if (d.Count != 0) { diagnostics = d; return null; }++ var loops = faces.Select(face => source!.Topology.Loops.Single(loop => loop.Id == face!.LoopIds.Single())).ToArray();+ var edgeSets = loops.Select(loop => loop.CoedgeIds.Select(id => source!.Topology.Coedges.Single(c => c.Id == id).EdgeId).ToHashSet()).ToArray();+ var common = edgeSets[0].Intersect(edgeSets[1]).OrderBy(id => id.Value).ToArray();+ if (common.Length != 1) { diagnostics = ["SectionStackMouthSeamPhysicalBoundary"]; return null; }+ var seamId = common[0]; var seam = source!.Topology.Edges.Single(edge => edge.Id == seamId);+ if (!source.Bindings.TryGetEdgeBinding(seamId, out var seamBinding) || !source.Geometry.TryGetCurve(seamBinding.CurveGeometryId, out var seamCurve) || seamCurve.Kind != CurveGeometryKind.Line3)+ { diagnostics = ["SectionStackMouthSeamPhysicalBoundary"]; return null; }+ var seamStart = source.VertexPoints[seam.StartVertexId]; var seamEnd = source.VertexPoints[seam.EndVertexId];+ var seamVector = seamEnd - seamStart; var seamLength = seamVector.Length;+ if (seamLength <= Tol) { diagnostics = ["SectionStackMouthSeamDegenerate"]; return null; }+ var seamDirection = seamVector / seamLength;+ var relative = seamStart - mouth;+ var projected = relative.Dot(seamDirection);+ var closest = relative - seamDirection * projected;+ var discriminant = input.Hole.Shaft.Radius * input.Hole.Shaft.Radius - closest.LengthSquared;+ if (Math.Abs(discriminant) <= Tol) { diagnostics = ["SectionStackMouthSeamTangent"]; return null; }+ if (discriminant < 0d) { diagnostics = ["SectionStackMouthArcOwnershipAmbiguous"]; return null; }+ var delta = Math.Sqrt(discriminant); var t0 = -projected - delta; var t1 = -projected + delta;+ if (t0 <= Tol || t1 >= seamLength - Tol || t1 - t0 <= Tol) { diagnostics = ["SectionStackMouthArcOwnershipAmbiguous"]; return null; }++ var topology = CopyTopologyExceptShells(source.Topology, faceIds);+ var geometry = CopyGeometry(source.Geometry); var resultBindings = CopyBindings(source.Bindings);+ var points = source.VertexPoints.ToDictionary(x => x.Key, x => x.Value);+ var nextVertex = source.Topology.Vertices.Max(x => x.Id.Value) + 1;+ var nextEdge = source.Topology.Edges.Max(x => x.Id.Value) + 1;+ var nextCoedge = source.Topology.Coedges.Max(x => x.Id.Value) + 1;+ var nextLoop = source.Topology.Loops.Max(x => x.Id.Value) + 1;+ var nextFace = source.Topology.Faces.Max(x => x.Id.Value) + 1;+ var nextCurve = source.Geometry.Curves.Max(x => x.Key.Value) + 1;+ var nextSurface = source.Geometry.Surfaces.Max(x => x.Key.Value) + 1;+ VertexId Vertex(Point3D p) { var id = new VertexId(nextVertex++); topology.AddVertex(new Vertex(id)); points[id] = p; return id; }+ EdgeId Edge(VertexId a, VertexId b, CurveGeometry curve, ParameterInterval trim, bool oriented = true)+ { var id = new EdgeId(nextEdge++); var curveId = new CurveGeometryId(nextCurve++); topology.AddEdge(new Edge(id, a, b)); geometry.AddCurve(curveId, curve); resultBindings.AddEdgeBinding(new EdgeGeometryBinding(id, curveId, trim, oriented)); return id; }+ LoopId Loop(params (EdgeId Edge, bool Reverse)[] uses)+ { var id = new LoopId(nextLoop++); var coedges = uses.Select(_ => new CoedgeId(nextCoedge++)).ToArray(); for (var i = 0; i < uses.Length; i++) topology.AddCoedge(new Coedge(coedges[i], uses[i].Edge, id, coedges[(i + 1) % uses.Length], coedges[(i + uses.Length - 1) % uses.Length], uses[i].Reverse)); topology.AddLoop(new Loop(id, coedges)); return id; }+ FaceId Face(IReadOnlyList<LoopId> faceLoops, SurfaceGeometry surface, bool sameSense)+ { var id = new FaceId(nextFace++); var surfaceId = new SurfaceGeometryId(nextSurface++); topology.AddFace(new Face(id, faceLoops)); geometry.AddSurface(surfaceId, surface); resultBindings.AddFaceBinding(new FaceGeometryBinding(id, surfaceId, sameSense)); return id; }++ // Sorted seam parameters are the deterministic identity and ordering of+ // the two shared physical intersection vertices.+ var i0 = Vertex(seamStart + seamDirection * t0); var i1 = Vertex(seamStart + seamDirection * t1);+ var seamLine = new Line3Curve(seamStart, Direction3D.Create(seamVector));+ var before = Edge(seam.StartVertexId, i0, CurveGeometry.FromLine(seamLine), new(0d, t0));+ var after = Edge(i1, seam.EndVertexId, CurveGeometry.FromLine(seamLine), new(t1, seamLength));+ var circle = new Circle3Curve(mouth, input.Placement.AxisZ, input.Hole.Shaft.Radius, input.Placement.AxisX);+ double Angle(Point3D p) => Math.Atan2((p - mouth).Dot(circle.YAxis.ToVector()), (p - mouth).Dot(circle.XAxis.ToVector()));+ var a0 = Angle(points[i0]); var a1 = Angle(points[i1]); while (a1 <= a0) a1 += 2d * Math.PI;+ var ccwMid = circle.Evaluate((a0 + a1) / 2d);+ var ccwOwner = Array.FindIndex(mappings, mapping => ccwMid.Z >= mapping!.SlabFrom!.Value - Tol && ccwMid.Z <= mapping.SlabTo!.Value + Tol);+ if (ccwOwner < 0 || (ccwMid.Z >= mappings[0]!.SlabFrom!.Value - Tol && ccwMid.Z <= mappings[0]!.SlabTo!.Value + Tol && ccwMid.Z >= mappings[1]!.SlabFrom!.Value - Tol && ccwMid.Z <= mappings[1]!.SlabTo!.Value + Tol))+ { diagnostics = ["SectionStackMouthArcOwnershipAmbiguous"]; return null; }+ var otherOwner = 1 - ccwOwner;+ var ccwArc = Edge(i0, i1, CurveGeometry.FromCircle(circle), new(a0, a1));+ var cwArc = Edge(i1, i0, CurveGeometry.FromCircle(circle), new(a1, a0 + 2d * Math.PI));+ var arcForFace = new[] { ccwArc, cwArc }; arcForFace[ccwOwner] = ccwArc; arcForFace[otherOwner] = cwArc;++ LoopId ReplaceSeam(Loop original, EdgeId arc)+ {+ var forwardArcReverse = arc == cwArc;+ var uses = new List<(EdgeId Edge, bool Reverse)>();+ foreach (var coedgeId in original.CoedgeIds)+ {+ var coedge = source.Topology.Coedges.Single(c => c.Id == coedgeId);+ if (coedge.EdgeId != seamId) uses.Add((coedge.EdgeId, coedge.IsReversed));+ else if (!coedge.IsReversed) { uses.Add((before, false)); uses.Add((arc, forwardArcReverse)); uses.Add((after, false)); }+ else { uses.Add((after, true)); uses.Add((arc, !forwardArcReverse)); uses.Add((before, true)); }+ }+ return Loop(uses.ToArray());+ }+ var hostLoops = new[] { ReplaceSeam(loops[0], arcForFace[0]), ReplaceSeam(loops[1], arcForFace[1]) };+ var replacementFaces = new[] { Face([hostLoops[0]], surfaces[0]!, bindings[0]!.Value.SameSense), Face([hostLoops[1]], surfaces[1]!, bindings[1]!.Value.SameSense) };++ var radial = input.Placement.AxisX.ToVector(); var shaft = input.Corridor.ShaftDepth; var tipLength = input.Corridor.TipLength;+ var transitionCenter = mouth + axis * shaft; var transitionA = Vertex(transitionCenter + radial * input.Hole.Shaft.Radius); var transitionB = Vertex(transitionCenter - radial * input.Hole.Shaft.Radius); var tip = Vertex(transitionCenter + axis * tipLength);+ var transitionCircle = new Circle3Curve(transitionCenter, input.Placement.AxisZ, input.Hole.Shaft.Radius, input.Placement.AxisX);+ var transitionArcA = Edge(transitionA, transitionB, CurveGeometry.FromCircle(transitionCircle), new(0d, Math.PI)); var transitionArcB = Edge(transitionB, transitionA, CurveGeometry.FromCircle(transitionCircle), new(Math.PI, 2d * Math.PI));+ var shaftSeam = Edge(i0, transitionA, CurveGeometry.FromLine(new Line3Curve(points[i0], Direction3D.Create(points[transitionA] - points[i0]))), new(0d, (points[transitionA] - points[i0]).Length));+ var coneSeam = Edge(transitionA, tip, CurveGeometry.FromLine(new Line3Curve(points[transitionA], Direction3D.Create(points[tip] - points[transitionA]))), new(0d, (points[tip] - points[transitionA]).Length));+ var mouthLoop = Loop((ccwArc, false), (cwArc, false));+ var transitionLoop = Loop((transitionArcA, false), (transitionArcB, false));+ var shaftLoop = Loop((ccwArc, false), (cwArc, false), (shaftSeam, false), (transitionArcB, true), (transitionArcA, true), (shaftSeam, true));+ var coneLoop = Loop((transitionArcA, false), (transitionArcB, false), (coneSeam, false), (coneSeam, true));+ var shaftFace = Face([shaftLoop], SurfaceGeometry.FromCylinder(new CylinderSurface(mouth, input.Placement.AxisZ, input.Hole.Shaft.Radius, input.Placement.AxisX)), false);+ var coneFace = Face([coneLoop], SurfaceGeometry.FromCone(new ConeSurface(points[tip], Direction3D.Create(-axis), point!.PointAngleDegrees * Math.PI / 360d, input.Placement.AxisX)), false);+ var shell = source.Topology.Shells.Single(); topology.AddShell(new Shell(shell.Id, shell.FaceIds.Where(id => !faceIds.Contains(id)).Concat(replacementFaces).Append(shaftFace).Append(coneFace).ToArray()));+ var body = source.Topology.Bodies.Single(); topology.AddBody(new Body(body.Id, body.ShellIds.ToArray()));+ var descendants = source.Correspondence.Descendants.Concat(new SemanticTopologyDescendant[]+ {+ new($"plan:{input.Hole.FeatureId}:mouth-loop", "Loop", SemanticTopologyRole.HoleEntryLoop, input.Hole.FeatureId, Loop: mouthLoop, ParentStableId: input.Hole.FeatureId, GeometryPreview:"MultiFaceCoplanar"),+ new($"plan:{input.Hole.FeatureId}:mouth-edge:0", "Edge", SemanticTopologyRole.TopBoundary, input.Hole.FeatureId, Edge: ccwArc, ParentStableId: input.Hole.FeatureId),+ new($"plan:{input.Hole.FeatureId}:mouth-edge:1", "Edge", SemanticTopologyRole.TopBoundary, input.Hole.FeatureId, Edge: cwArc, ParentStableId: input.Hole.FeatureId),+ new($"plan:{input.Hole.FeatureId}:shaft", "Face", SemanticTopologyRole.HoleWallFace, input.Hole.FeatureId, Face: shaftFace, ParentStableId: input.Hole.FeatureId),+ new($"plan:{input.Hole.FeatureId}:transition-loop", "Loop", SemanticTopologyRole.HoleShaftToDrillPointLoop, input.Hole.FeatureId, Loop: transitionLoop, ParentStableId: input.Hole.FeatureId),+ new($"plan:{input.Hole.FeatureId}:point", "Face", SemanticTopologyRole.HoleDrillPointFace, input.Hole.FeatureId, Face: coneFace, ParentStableId: input.Hole.FeatureId),+ new($"plan:{input.Hole.FeatureId}:tip", "Vertex", SemanticTopologyRole.HoleTipVertex, input.Hole.FeatureId, Vertex: tip, ParentStableId: input.Hole.FeatureId)+ }).ToArray();+ var provenance = source.Correspondence.ProvenanceChain.Concat(["SectionStackBlindDrillCavityPlan", "MultiFaceCoplanarMouth", "ExactLineCircleSplit", "NoInternalCaps"]).ToArray();+ var correspondence = new SemanticTopologyCorrespondence(source.Correspondence.BodyStableId, descendants, provenance);+ var faceMappings = source.FaceMappings.Where(mapping => !faceIds.Contains(mapping.FaceId)).Concat(replacementFaces.Select((face, index) => new PrismaticSectionStackFacePlanMapping(face, "HostFaceReplacement", mappings[index]!.SourceStableId, mappings[index]!.ConstructionStableId, mappings[index]!.SlabFrom, mappings[index]!.SlabTo, mappings[index]!.Provenance.Concat(["MultiFaceCoplanarMouth"]).ToArray())))+ .Append(new PrismaticSectionStackFacePlanMapping(shaftFace, "BlindDrillShaft", input.Hole.FeatureId, mappings[0]!.ConstructionStableId, mappings[0]!.SlabFrom, mappings[1]!.SlabTo, ["SectionStackBlindDrillCavityPlan", "NoInternalCaps"]))+ .Append(new PrismaticSectionStackFacePlanMapping(coneFace, "BlindDrillPoint", input.Hole.FeatureId, mappings[0]!.ConstructionStableId, mappings[0]!.SlabFrom, mappings[1]!.SlabTo, ["SectionStackBlindDrillCavityPlan", "NoInternalCaps"])) .ToArray();+ var topologyPlan = new PrismaticSectionStackTopologyPlan($"{source.StableId}:blind:{input.Hole.FeatureId}:seam", topology, geometry, resultBindings, points, faceMappings, correspondence, provenance);+ var replacement = new PrismaticSectionStackBrepPlan($"{input.HostPlan.Signature}:blind:{input.Hole.FeatureId}:seam", points.Count, topology.Edges.Count(), topology.Faces.Count(), input.HostPlan.Policy, true, correspondence, topologyPlan);+ d.AddRange(["SectionStackMouthSeamAdmitted", "SectionStackMouthTwoIntersections", "SectionStackMouthOwnershipMultiFaceCoplanar", "SectionStackMouthSeamRemovedThroughOpening", "SectionStackBlindDrillNoInternalCaps"]);+ diagnostics = d;+ return new($"section-stack-blind:{input.Hole.FeatureId}", input.HostPlan, replacement, faceIds.Zip(replacementFaces).Select(x => new SectionStackHostFaceReplacement(x.First, [x.Second])).ToArray(), d);}- private static TopologyModel CopyTopologyExceptShells(TopologyModel source, FaceId excludedFace)- { var copy = new TopologyModel(); foreach (var x in source.Vertices) copy.AddVertex(x); foreach (var x in source.Edges) copy.AddEdge(x); foreach (var x in source.Coedges) copy.AddCoedge(x); foreach (var x in source.Loops) copy.AddLoop(x); foreach (var x in source.Faces.Where(x => x.Id != excludedFace)) copy.AddFace(x); return copy; }+ private static TopologyModel CopyTopologyExceptShells(TopologyModel source, params FaceId[] excludedFaces)+ { var excluded = excludedFaces.ToHashSet(); var copy = new TopologyModel(); foreach (var x in source.Vertices) copy.AddVertex(x); foreach (var x in source.Edges) copy.AddEdge(x); foreach (var x in source.Coedges) copy.AddCoedge(x); foreach (var x in source.Loops) copy.AddLoop(x); foreach (var x in source.Faces.Where(x => !excluded.Contains(x.Id))) copy.AddFace(x); return copy; }private static BrepGeometryStore CopyGeometry(BrepGeometryStore source) { var copy = new BrepGeometryStore(); foreach (var x in source.Curves) copy.AddCurve(x.Key, x.Value); foreach (var x in source.Surfaces) copy.AddSurface(x.Key, x.Value); return copy; }private static BrepBindingModel CopyBindings(BrepBindingModel source) { var copy = new BrepBindingModel(); foreach (var x in source.EdgeBindings) copy.AddEdgeBinding(x); foreach (var x in source.FaceBindings) copy.AddFaceBinding(x); return copy; }}@@ -179,9 +356,9 @@ public static class SectionStackBlindDrillComposeBridgeif (corridor.Classification != BlindDrillToolCorridorClassification.CorridorProven){ d.AddRange(corridor.Diagnostics); d.Add("SectionStackBlindDrillClearanceContractRejected"); diagnostics = d; return null; }- var face = FindMouthFace(hostPlan.TopologyPlan!, placement, feature.Shaft.Radius, d);- if (face is null) { diagnostics = d; return null; }- var cavity = SectionStackBlindDrillCavityPlanner.TryPlan(new(stack, hostPlan, feature, placement, corridor, face.Value), out var cavityDiagnostics);+ var faces = FindMouthFaces(hostPlan.TopologyPlan!, placement, feature.Shaft.Radius, d);+ if (faces is null) { diagnostics = d; return null; }+ var cavity = SectionStackBlindDrillCavityPlanner.TryPlan(new(stack, hostPlan, feature, placement, corridor, faces), out var cavityDiagnostics);d.AddRange(cavityDiagnostics);if (cavity is null) { diagnostics = d; return null; }d.Add("SectionStackBlindDrillComposeBridge");@@ -189,7 +366,7 @@ public static class SectionStackBlindDrillComposeBridgereturn cavity.ReplacementHostPlan;}- private static FaceId? FindMouthFace(PrismaticSectionStackTopologyPlan plan, AirConstructionPlaneHolePlacement placement, double radius, List<string> diagnostics)+ private static IReadOnlyList<FaceId>? FindMouthFaces(PrismaticSectionStackTopologyPlan plan, AirConstructionPlaneHolePlacement placement, double radius, List<string> diagnostics){var mouth = placement.WorldMouthCenter; var axis = placement.AxisZ.ToVector();var compatible = plan.FaceMappings.Where(x => x.Kind == "PrismaticSide")@@ -200,17 +377,26 @@ public static class SectionStackBlindDrillComposeBridge&& Math.Abs((mouth - surface.Plane.Value.Origin).Dot(surface.Plane.Value.Normal.ToVector())) <= Tol).ToArray();var candidates = compatible.Where(x => x.SlabFrom is { } from && x.SlabTo is { } to && mouth.Z - radius >= from - Tol && mouth.Z + radius <= to + Tol).ToArray();- if (candidates.Length != 1)+ if (candidates.Length == 1){- diagnostics.Add(candidates.Length == 0 && compatible.Length > 0- ? "SectionStackBlindDrillMouthCrossesHostPlanningPartition"- : "SectionStackBlindDrillMouthProvenanceNotFound");- return null;+ var tangent = compatible.Any(x => x.FaceId != candidates[0].FaceId+ && ((x.SlabTo is { } to && Math.Abs(mouth.Z - radius - to) <= Tol)+ || (x.SlabFrom is { } from && Math.Abs(mouth.Z + radius - from) <= Tol)));+ if (tangent)+ {+ diagnostics.Add("SectionStackMouthSeamTangent");+ return null;+ }+ return [candidates[0].FaceId];+ }+ var crossed = compatible.Where(x => x.SlabFrom is { } from && x.SlabTo is { } to && mouth.Z + radius > from + Tol && mouth.Z - radius < to - Tol).OrderBy(x => x.FaceId.Value).ToArray();+ if (crossed.Length == 2)+ {+ return crossed.Select(x => x.FaceId).ToArray();}- var candidate = candidates[0];- // The current exact insertion keeps the circular inner loop in one- // planar host face. Refuse a seam-crossing mouth rather than creating- // duplicated arcs or a false one-face ownership claim.- return candidate.FaceId;+ diagnostics.Add(candidates.Length == 0 && compatible.Length > 0+ ? "SectionStackBlindDrillMouthCrossesHostPlanningPartition"+ : "SectionStackBlindDrillMouthProvenanceNotFound");+ return null;}}diff --git a/docs/firmament/blind-drill-clearance-contract-x1.md b/docs/firmament/blind-drill-clearance-contract-x1.mdindex beee3c50..11b44542 100644--- a/docs/firmament/blind-drill-clearance-contract-x1.md+++ b/docs/firmament/blind-drill-clearance-contract-x1.md@@ -45,9 +45,8 @@ clearance-cylinder length, slab chord proofs, classification, semanticdescendants, and the no-cap plan provenance under `holeContract`. The emittedcavity still contains no validation-cylinder geometry.-The current Mouth operation is intentionally narrower than the clearance-proof: the complete Mouth circle must fit in exactly one planar host-side-face partition. A Mouth which crosses an internal section-stack planning seam-is rejected as `SectionStackBlindDrillMouthCrossesHostPlanningPartition`.-This prevents an untrue single-face ownership claim while the explicit-multi-face circular-Mouth replacement operation remains future work.+The clearance proof remains independent from topology ownership. X1 also+admits one circular Mouth crossing one internal coplanar section-stack planning+seam when it has exactly two line-circle intersections. The planner replaces+the two host outer loops with complementary exact arc ownership and removes+the seam through the opening; tangent and ambiguous cases remain typed rejects.diff --git a/docs/firmament/semantic-selections-x1.md b/docs/firmament/semantic-selections-x1.mdindex cd336eec..fb282931 100644--- a/docs/firmament/semantic-selections-x1.md+++ b/docs/firmament/semantic-selections-x1.md@@ -45,8 +45,10 @@ The verification artifact is `artifacts/semantic-top-boundary-chamfer.step`, SHAThis is the Cadmata handoff shape. It intentionally includes geometry preview only where the producer has one, and does not add rendering or interactive selection editing.For a Construction Plane Hole, `inspect-selections` additionally resolves the-compiler-published `MouthLoop`, `ExitLoop`, and `ShaftWallFaces` roles. The-source frame, AIR placement, local-frame plan, final topology ids, and each+compiler-published `MouthLoop`, `ExitLoop`, and `ShaftWallFaces` roles. A+coplanar section-stack seam can distribute one physical Mouth across exact arc+descendants, but still resolves one semantic `MouthLoop`; no geometric fallback+is introduced. The source frame, AIR placement, local-frame plan, final topology ids, and eachresult appear together; no geometric predicate is introduced. See[Construction Plane Hole source X3](construction-plane-hole-source-x3.md).diff --git a/docs/kernel/section-stack-mouth-seam-split-x1.md b/docs/kernel/section-stack-mouth-seam-split-x1.mdnew file mode 100644index 00000000..1f98f62a--- /dev/null+++ b/docs/kernel/section-stack-mouth-seam-split-x1.md@@ -0,0 +1,11 @@+# Section-stack Mouth seam split X1++`SECTION-STACK-MOUTH-SEAM-SPLIT-X1` admits one blind DrillPoint Hole whose circular Mouth crosses one internal straight section-stack planning seam between two coplanar side faces. A planning seam may divide face ownership. It must not divide the semantic Hole.++The operation extends `SectionStackBlindDrillCavityPlanner`; it does not use a Boolean or a generic face splitter. Construction-owned face mappings prove the two side faces have the same source side, adjacent slab extents, matching planar support, and one shared planned line edge. Other source identities, non-coplanarity, missing/ambiguous shared seams, and tangent contacts are rejected.++The exact line/circle solve orders the two seam parameters and creates exactly two shared vertices. The physical circle is split into two `Circle3` arc edges, with angular trims selected by the slab region containing each arc midpoint. Each affected face receives a replacement outer loop: its old seam use is changed to the retained seam segment, its owned circular arc, and the other retained segment. Thus the seam has no edge through the open Mouth and no planar cap is introduced.++The two exact arcs retain a single semantic `HoleEntryLoop`; inspection selects one MouthLoop and two MouthEdges, while the shaft cylinder, DrillPoint cone, and Tip remain the pre-existing blind-cavity topology. The Mouth is one physical circle even when its exact arc descendants belong to several coplanar planned faces.++Admitted scope is one straight internal seam with exactly two intersections in the existing construction-plane blind-hole lane. Curved/non-coplanar hosts, physical edges, void boundaries, arbitrary arrangements, overlapping holes, and tangent/coincident contacts remain deferred.diff --git a/docs/kernel/section-stack-transverse-cavity-plan-x1.md b/docs/kernel/section-stack-transverse-cavity-plan-x1.mdindex db0d46fb..04a4e3c8 100644--- a/docs/kernel/section-stack-transverse-cavity-plan-x1.md+++ b/docs/kernel/section-stack-transverse-cavity-plan-x1.md@@ -22,7 +22,11 @@ Corridor evidence proves that the drilling tool fits. The cavity plan proves tha- It adds one exact cylindrical shaft wall, one shaft-to-DrillPoint loop, one exact conical wall, and one Tip to the same authoritative shell. There is no Exit or cap at the shaft/cone seam.- The replacement map and plan-owned semantic descendants are published before `PrismaticSectionStackBrepMaterializer` consumes the final plan.-The current admitted topology insertion deliberately requires the complete Mouth to lie in one planar side-face partition. It does not yet split a Mouth across host partitions or split a transverse cylinder/cone along world-Z host partitions. Those cases remain rejected at the planner boundary rather than being represented with false caps or detached tool bodies.+The planner additionally admits one exact circular Mouth across one internal+coplanar planning seam. It splits the Mouth into two owned circular arcs and+replaces the affected outer loops, retaining only the seam segments outside the+opening. The shaft and cone are not partitioned. Non-coplanar, physical-edge,+tangent, and arbitrary multi-face cases remain rejected at the planner boundary.`SectionStackBlindDrillComposeBridge` is the source-facing seam used by thecompose exporter and selection inspection. It converts the source-owneddiff --git a/docs/reconstruction/ctc01-reconstruction-a1.md b/docs/reconstruction/ctc01-reconstruction-a1.mdindex ec558da7..b9ec7fc3 100644--- a/docs/reconstruction/ctc01-reconstruction-a1.md+++ b/docs/reconstruction/ctc01-reconstruction-a1.md@@ -395,3 +395,6 @@ No production geometry feature, parser feature, STEP importer/exporter behavior,- Firmament filtered tests: 497 passed, 2 failed. Failures are `FirmamentV2StaticLogicTests.Match_NonExhaustive_ReportsEveryMissingVariant` and `EnumDuplicate_InvalidScrutinee_AndSelectedFailureAreDiagnosed`; both are in the pre-existing modified parser area and were not changed for this audit.- CLI filtered tests: 128 passed, 0 failed.- Final reconstruction build: passed and reproduced SHA-256 `202d0599248beb926cdfe55f1a1fd833b8db17bfb411871276d6ba92b3903937`.+# CTC-01 reconstruction A1++Section-stack planning seams are ownership partitions, not physical material boundaries. The bounded blind DrillPoint lane can now preserve one semantic circular Mouth when it crosses one internal coplanar seam: two exact descendant arcs carry face ownership, while the semantic Hole, shaft, cone, and Tip remain singular. This is sufficient for CTC-01-style composed-host authoring in the admitted one-seam case; arbitrary face arrangements remain out of scope.diff --git a/fixtures/FirmamentV2/ProfileComposition/invalid/construction-plane-blind-drill-mouth-crosses-slab.firmament b/fixtures/FirmamentV2/ProfileComposition/invalid/construction-plane-blind-drill-mouth-crosses-slab.firmamentindex 186453d4..7c4664e0 100644--- a/fixtures/FirmamentV2/ProfileComposition/invalid/construction-plane-blind-drill-mouth-crosses-slab.firmament+++ b/fixtures/FirmamentV2/ProfileComposition/invalid/construction-plane-blind-drill-mouth-crosses-slab.firmament@@ -1,5 +1,4 @@-// The clearance proof spans both slabs, but the exact Mouth circle crosses the-// side-face planning seam. X1 must reject rather than manufacture split arcs.+// Tangency is not admitted: X1 requires two exact circle/seam intersections.Concept Struct SideLayout {PositiveXDatum: Plane { Origin: [-20mm, 0mm, 0mm]; Normal: [1, 0, 0]; Up: [0, 0, 1] }}@@ -16,7 +15,7 @@ Struct Composition { Compose SideBlindHost {Add Upper { Profile: Stock; From: 0mm; To: 10mm }Hole<Shaft> SideBlind {From: PositiveXWorkplane- Center: Point2(0mm, 0mm)+ Center: Point2(0mm, 1mm)Diameter: 2mmEnd: ShaftDepth(10mm)Termination: DrillPointdiff --git a/fixtures/FirmamentV2/ProfileComposition/valid/construction-plane-blind-drill-mouth-crosses-slab.firmament b/fixtures/FirmamentV2/ProfileComposition/valid/construction-plane-blind-drill-mouth-crosses-slab.firmamentnew file mode 100644index 00000000..1151afc5--- /dev/null+++ b/fixtures/FirmamentV2/ProfileComposition/valid/construction-plane-blind-drill-mouth-crosses-slab.firmament@@ -0,0 +1,24 @@+// One physical side surface is planned as two coplanar section-stack faces.+// The circular Mouth crosses their internal z=0 planning seam.+Concept Struct SideLayout {+ PositiveXDatum: Plane { Origin: [-20mm, 0mm, 0mm]; Normal: [1, 0, 0]; Up: [0, 0, 1] }+}+Construction Plane PositiveXWorkplane { Trace: SideLayout.PositiveXDatum }+Concept Struct Layout On XY { Rect2 Guide { Center: [0mm, 0mm]; Size: [40mm, 20mm] } }+Profile Stock Using Layout { Loop Outer {+ Segment South { Trace: Guide.Bottom; From: Guide.BottomLeft; To: Guide.BottomRight }+ Segment East { Trace: Guide.Right; From: Guide.BottomRight; To: Guide.TopRight }+ Segment North { Trace: Guide.Top; From: Guide.TopRight; To: Guide.TopLeft }+ Segment West { Trace: Guide.Left; From: Guide.TopLeft; To: Guide.BottomLeft }+} }+Struct Composition { Compose SideBlindHost {+ Base Lower { Profile: Stock; From: -10mm; To: 0mm }+ Add Upper { Profile: Stock; From: 0mm; To: 10mm }+ Hole<Shaft> SideBlind {+ From: PositiveXWorkplane+ Center: Point2(0mm, 0mm)+ Diameter: 2mm+ End: ShaftDepth(10mm)+ Termination: DrillPoint+ }+} }