Skip to content

Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel

Generalize bounded prismatic continuation for blind-hole history

Yuechen Liac0476b4b228
diff --git a/Aetheris.Kernel.Core.Tests/Brep/Boolean/BrepBooleanTests.cs b/Aetheris.Kernel.Core.Tests/Brep/Boolean/BrepBooleanTests.cs
index d354b5a6..0252bfe4 100644
--- a/Aetheris.Kernel.Core.Tests/Brep/Boolean/BrepBooleanTests.cs
+++ b/Aetheris.Kernel.Core.Tests/Brep/Boolean/BrepBooleanTests.cs
@@ -1610,10 +1610,8 @@ public sealed class BrepBooleanTests
var containingTool = BrepBooleanBoxRecognition.CreateBoxFromExtents(new AxisAlignedBoxExtents(-12d, 12d, -12d, 12d, -6d, 6d)).Value;
var classification = BrepBoolean.ClassifyBooleanCase(safeCompositionResult.Value, containingTool, BooleanOperation.Subtract);
- Assert.Equal(BooleanExecutionClass.UnsupportedGeneralCase, classification.ExecutionClass);
- Assert.NotNull(classification.UnsupportedReason);
- Assert.Contains("recognized safe box-root subtract/intersect routing", classification.UnsupportedReason!, StringComparison.Ordinal);
- Assert.NotEmpty(classification.UnsupportedReason);
+ Assert.Equal(BooleanExecutionClass.PlanarOnly, classification.ExecutionClass);
+ Assert.Null(classification.UnsupportedReason);
}
[Fact]
@@ -1697,6 +1695,40 @@ public sealed class BrepBooleanTests
Assert.Contains("bounded mixed through-void builder", diagnostic.Message, StringComparison.Ordinal);
}
+ [Fact]
+ public void MixedThroughVoid_BlindThenPrismaticContainingFootprint_Succeeds()
+ {
+ var root = BrepPrimitives.CreateBox(20d, 20d, 20d).Value;
+ var blindHoleTool = TransformBody(BrepPrimitives.CreateCylinder(2d, 8d).Value, Transform3D.CreateTranslation(new Vector3D(0d, 0d, 6d)));
+ var withBlindHole = BrepBoolean.Subtract(root, blindHoleTool);
+ Assert.True(withBlindHole.IsSuccess);
+ Assert.Equal(SupportedBooleanHoleSpanKind.BlindFromTop, Assert.Single(withBlindHole.Value.SafeBooleanComposition!.Holes).SpanKind);
+
+ var slotTool = StandardLibraryPrimitives.CreateSlotCut(16d, 8d, 24d, 4d).Value;
+ var result = BrepBoolean.Subtract(withBlindHole.Value, slotTool);
+
+ Assert.True(result.IsSuccess, string.Join(Environment.NewLine, result.Diagnostics.Select(d => d.Message)));
+ Assert.NotNull(result.Value.SafeBooleanComposition?.ThroughVoids);
+ Assert.Single(result.Value.SafeBooleanComposition!.ThroughVoids!.PrismaticVoids);
+ Assert.Empty(result.Value.SafeBooleanComposition.ThroughVoids.AnalyticVoids);
+ }
+
+ [Fact]
+ public void MixedThroughVoid_BlindThenPrismaticPartialOverlap_RemainsRejected()
+ {
+ var root = BrepPrimitives.CreateBox(20d, 20d, 20d).Value;
+ var blindHoleTool = TransformBody(BrepPrimitives.CreateCylinder(2.5d, 8d).Value, Transform3D.CreateTranslation(new Vector3D(6.5d, 0d, 6d)));
+ var withBlindHole = BrepBoolean.Subtract(root, blindHoleTool);
+ Assert.True(withBlindHole.IsSuccess);
+
+ var slotTool = StandardLibraryPrimitives.CreateSlotCut(16d, 8d, 24d, 4d).Value;
+ var result = BrepBoolean.Subtract(withBlindHole.Value, slotTool);
+
+ Assert.False(result.IsSuccess);
+ var diagnostic = Assert.Single(result.Diagnostics);
+ Assert.Contains("requires prior subtract history to stay inside supported analytic-hole/open-slot families", diagnostic.Message, StringComparison.Ordinal);
+ }
+
[Fact]
public void Execute_NonBoxInput_ReturnsDeterministicNotImplementedWithoutThrowing()
{
diff --git a/Aetheris.Kernel.Core/Brep/Boolean/BrepBoolean.cs b/Aetheris.Kernel.Core/Brep/Boolean/BrepBoolean.cs
index f4c6c604..e4a72f8f 100644
--- a/Aetheris.Kernel.Core/Brep/Boolean/BrepBoolean.cs
+++ b/Aetheris.Kernel.Core/Brep/Boolean/BrepBoolean.cs
@@ -256,11 +256,6 @@ public static class BrepBoolean
var leftRecognized = BrepBooleanBoxRecognition.TryRecognizeAxisAlignedBox(leftBody, resolvedTolerance, out var leftBox, out _);
var rightRecognized = BrepBooleanBoxRecognition.TryRecognizeAxisAlignedBox(rightBody, resolvedTolerance, out var rightBox, out _);
var rightRecognizedPrismaticTool = BrepBooleanPrismaticToolRecognition.TryRecognize(rightBody, resolvedTolerance, out var rightPrismaticTool, out _);
- if (rightRecognized)
- {
- rightRecognizedPrismaticTool = false;
- rightPrismaticTool = null!;
- }
var rightAnalyticRecognized = BrepBooleanAnalyticSurfaceRecognition.TryRecognizeAnalyticSurface(rightBody, resolvedTolerance, out var analyticSurface, out _);
var leftSafeCompositionRecognizedFromBody = leftBody.SafeBooleanComposition is not null;
@@ -277,6 +272,19 @@ public static class BrepBoolean
leftHasSafeComposition = true;
}
+ if (rightRecognized && rightRecognizedPrismaticTool)
+ {
+ var supportsBoxPrismaticContinuation = operation == BooleanOperation.Subtract
+ && leftHasSafeComposition
+ && leftSafeComposition is { RootDescriptor.Kind: SafeBooleanRootKind.Box }
+ && (leftSafeComposition.Holes.Count > 0 || (leftSafeComposition.OpenSlots?.Count ?? 0) > 0);
+ if (!supportsBoxPrismaticContinuation)
+ {
+ rightRecognizedPrismaticTool = false;
+ rightPrismaticTool = null!;
+ }
+ }
+
var canClassifyBoundedOrthogonalUnionWithExistingRoot = false;
SafeBooleanComposition? additiveComposition = null;
string? additiveUnsupportedReason = null;
@@ -1787,10 +1795,16 @@ public static class BrepBoolean
return false;
}
+ if (leftComposition.ThroughVoids is { PrismaticVoids.Count: > 0 })
+ {
+ unsupportedReason = "Boolean Subtract: bounded prismatic subtract continuation does not yet support prior prismatic/open-slot through-void history.";
+ return false;
+ }
+
var hasPriorSubtractHistory = leftComposition.Holes.Count > 0 || (leftComposition.OpenSlots?.Count ?? 0) > 0;
if (hasPriorSubtractHistory)
{
- if (!SupportsBoundedAnalyticHistoryForPrismaticContinuation(leftComposition, tolerance, out var historyReason))
+ if (!SupportsBoundedAnalyticHistoryForPrismaticContinuation(leftComposition, prismTool.Footprint, tolerance, out var historyReason))
{
unsupportedReason = historyReason;
return false;
@@ -1836,6 +1850,7 @@ public static class BrepBoolean
private static bool SupportsBoundedAnalyticHistoryForPrismaticContinuation(
SafeBooleanComposition composition,
+ IReadOnlyList<(double X, double Y)> prismaticFootprint,
ToleranceContext tolerance,
out string unsupportedReason)
{
@@ -1847,11 +1862,6 @@ public static class BrepBoolean
foreach (var hole in composition.Holes)
{
- if (hole.SpanKind != SupportedBooleanHoleSpanKind.Through)
- {
- return false;
- }
-
if (hole.Surface.Kind is not (AnalyticSurfaceKind.Cylinder or AnalyticSurfaceKind.Cone))
{
return false;
@@ -1864,6 +1874,28 @@ public static class BrepBoolean
{
return false;
}
+
+ if (hole.SpanKind == SupportedBooleanHoleSpanKind.Through)
+ {
+ continue;
+ }
+
+ if (hole.SpanKind is not (SupportedBooleanHoleSpanKind.BlindFromTop or SupportedBooleanHoleSpanKind.BlindFromBottom))
+ {
+ return false;
+ }
+
+ var center = (X: hole.CenterX, Y: hole.CenterY);
+ if (!BrepBooleanPrismaticFootprintContainment.TryComputeContainmentMargin(center, prismaticFootprint, tolerance, out var minEdgeDistance))
+ {
+ return false;
+ }
+
+ var requiredMargin = hole.MaxBoundaryRadius + (2d * tolerance.Linear);
+ if (minEdgeDistance < requiredMargin)
+ {
+ return false;
+ }
}
unsupportedReason = string.Empty;
diff --git a/Aetheris.Kernel.Core/Brep/Boolean/BrepBooleanBoxMixedThroughVoidBuilder.cs b/Aetheris.Kernel.Core/Brep/Boolean/BrepBooleanBoxMixedThroughVoidBuilder.cs
index db49c946..12efa260 100644
--- a/Aetheris.Kernel.Core/Brep/Boolean/BrepBooleanBoxMixedThroughVoidBuilder.cs
+++ b/Aetheris.Kernel.Core/Brep/Boolean/BrepBooleanBoxMixedThroughVoidBuilder.cs
@@ -30,9 +30,11 @@ public static class BrepBooleanBoxMixedThroughVoidBuilder
}
var hole = composition.Holes[0];
- if (hole.SpanKind != SupportedBooleanHoleSpanKind.Through)
+ if (hole.SpanKind is not (SupportedBooleanHoleSpanKind.Through
+ or SupportedBooleanHoleSpanKind.BlindFromTop
+ or SupportedBooleanHoleSpanKind.BlindFromBottom))
{
- return Failure("Boolean Subtract: bounded mixed through-void builder currently supports only through analytic history.");
+ return Failure("Boolean Subtract: bounded mixed through-void builder currently supports through or exterior-opening blind analytic history.");
}
if (hole.Surface.Kind is not (AnalyticSurfaceKind.Cylinder or AnalyticSurfaceKind.Cone))
@@ -90,13 +92,12 @@ public static class BrepBooleanBoxMixedThroughVoidBuilder
var radius = hole.MaxBoundaryRadius;
var center = (X: hole.CenterX, Y: hole.CenterY);
- if (!IsPointInsidePolygon(center, footprint, tolerance))
+ if (!BrepBooleanPrismaticFootprintContainment.TryComputeContainmentMargin(center, footprint, tolerance, out var minEdgeDistance))
{
unsupportedReason = "Boolean Subtract: bounded mixed through-void builder currently supports only the containment interaction class where the analytic through-void lies inside the incoming prismatic footprint.";
return false;
}
- var minEdgeDistance = ComputeMinimumDistanceToPolygonEdges(center, footprint);
if (minEdgeDistance <= radius + (2d * tolerance.Linear))
{
unsupportedReason = "Boolean Subtract: bounded mixed through-void builder rejects tangent/edge-grazing analytic-prismatic interactions; containment requires strict positive radial margin.";
@@ -107,70 +108,6 @@ public static class BrepBooleanBoxMixedThroughVoidBuilder
return true;
}
- private static bool IsPointInsidePolygon(
- (double X, double Y) point,
- IReadOnlyList<(double X, double Y)> polygon,
- ToleranceContext tolerance)
- {
- var winding = false;
- for (var i = 0; i < polygon.Count; i++)
- {
- var a = polygon[i];
- var b = polygon[(i + 1) % polygon.Count];
- if (DistancePointToSegment(point, a, b) <= tolerance.Linear)
- {
- return true;
- }
-
- var intersects = ((a.Y > point.Y) != (b.Y > point.Y))
- && (point.X < (((b.X - a.X) * (point.Y - a.Y)) / (b.Y - a.Y + double.Epsilon)) + a.X);
- if (intersects)
- {
- winding = !winding;
- }
- }
-
- return winding;
- }
-
- private static double ComputeMinimumDistanceToPolygonEdges((double X, double Y) point, IReadOnlyList<(double X, double Y)> polygon)
- {
- var minDistance = double.PositiveInfinity;
- for (var i = 0; i < polygon.Count; i++)
- {
- var a = polygon[i];
- var b = polygon[(i + 1) % polygon.Count];
- var distance = DistancePointToSegment(point, a, b);
- if (distance < minDistance)
- {
- minDistance = distance;
- }
- }
-
- return minDistance;
- }
-
- private static double DistancePointToSegment((double X, double Y) point, (double X, double Y) a, (double X, double Y) b)
- {
- var abX = b.X - a.X;
- var abY = b.Y - a.Y;
- var abLengthSquared = (abX * abX) + (abY * abY);
- if (abLengthSquared <= double.Epsilon)
- {
- var dx = point.X - a.X;
- var dy = point.Y - a.Y;
- return System.Math.Sqrt((dx * dx) + (dy * dy));
- }
-
- var t = (((point.X - a.X) * abX) + ((point.Y - a.Y) * abY)) / abLengthSquared;
- t = System.Math.Max(0d, System.Math.Min(1d, t));
- var closestX = a.X + (t * abX);
- var closestY = a.Y + (t * abY);
- var ddx = point.X - closestX;
- var ddy = point.Y - closestY;
- return System.Math.Sqrt((ddx * ddx) + (ddy * ddy));
- }
-
private static IReadOnlyDictionary<VertexId, Point3D> GetVertexPoints(BrepBody source)
{
var points = new Dictionary<VertexId, Point3D>();
diff --git a/Aetheris.Kernel.Core/Brep/Boolean/BrepBooleanPrismaticFootprintContainment.cs b/Aetheris.Kernel.Core/Brep/Boolean/BrepBooleanPrismaticFootprintContainment.cs
new file mode 100644
index 00000000..5d8fd4b8
--- /dev/null
+++ b/Aetheris.Kernel.Core/Brep/Boolean/BrepBooleanPrismaticFootprintContainment.cs
@@ -0,0 +1,87 @@
+using Aetheris.Kernel.Core.Math;
+using Aetheris.Kernel.Core.Numerics;
+
+namespace Aetheris.Kernel.Core.Brep.Boolean;
+
+internal static class BrepBooleanPrismaticFootprintContainment
+{
+ public static bool TryComputeContainmentMargin(
+ (double X, double Y) point,
+ IReadOnlyList<(double X, double Y)> footprint,
+ ToleranceContext tolerance,
+ out double minimumEdgeDistance)
+ {
+ minimumEdgeDistance = 0d;
+ if (footprint.Count < 3 || !IsPointInsidePolygon(point, footprint, tolerance))
+ {
+ return false;
+ }
+
+ minimumEdgeDistance = ComputeMinimumDistanceToPolygonEdges(point, footprint);
+ return true;
+ }
+
+ private static bool IsPointInsidePolygon(
+ (double X, double Y) point,
+ IReadOnlyList<(double X, double Y)> polygon,
+ ToleranceContext tolerance)
+ {
+ var winding = false;
+ for (var i = 0; i < polygon.Count; i++)
+ {
+ var a = polygon[i];
+ var b = polygon[(i + 1) % polygon.Count];
+ if (DistancePointToSegment(point, a, b) <= tolerance.Linear)
+ {
+ return true;
+ }
+
+ var intersects = ((a.Y > point.Y) != (b.Y > point.Y))
+ && (point.X < (((b.X - a.X) * (point.Y - a.Y)) / (b.Y - a.Y + double.Epsilon)) + a.X);
+ if (intersects)
+ {
+ winding = !winding;
+ }
+ }
+
+ return winding;
+ }
+
+ private static double ComputeMinimumDistanceToPolygonEdges((double X, double Y) point, IReadOnlyList<(double X, double Y)> polygon)
+ {
+ var minDistance = double.PositiveInfinity;
+ for (var i = 0; i < polygon.Count; i++)
+ {
+ var a = polygon[i];
+ var b = polygon[(i + 1) % polygon.Count];
+ var distance = DistancePointToSegment(point, a, b);
+ if (distance < minDistance)
+ {
+ minDistance = distance;
+ }
+ }
+
+ return minDistance;
+ }
+
+ private static double DistancePointToSegment((double X, double Y) point, (double X, double Y) a, (double X, double Y) b)
+ {
+ var abX = b.X - a.X;
+ var abY = b.Y - a.Y;
+ var abLengthSquared = (abX * abX) + (abY * abY);
+ if (abLengthSquared <= double.Epsilon)
+ {
+ var dx = point.X - a.X;
+ var dy = point.Y - a.Y;
+ return System.Math.Sqrt((dx * dx) + (dy * dy));
+ }
+
+ var t = (((point.X - a.X) * abX) + ((point.Y - a.Y) * abY)) / abLengthSquared;
+ t = System.Math.Max(0d, System.Math.Min(1d, t));
+ var closestX = a.X + (t * abX);
+ var closestY = a.Y + (t * abY);
+ var ddx = point.X - closestX;
+ var ddy = point.Y - closestY;
+ return System.Math.Sqrt((ddx * ddx) + (ddy * ddy));
+ }
+}
diff --git a/Aetheris.Kernel.Firmament.Tests/FirmamentBooleanCanonicalSuccessTests.cs b/Aetheris.Kernel.Firmament.Tests/FirmamentBooleanCanonicalSuccessTests.cs
index 01bc8d1f..9a1875ca 100644
--- a/Aetheris.Kernel.Firmament.Tests/FirmamentBooleanCanonicalSuccessTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/FirmamentBooleanCanonicalSuccessTests.cs
@@ -190,7 +190,7 @@ public sealed class FirmamentBooleanCanonicalSuccessTests
[InlineData("testdata/firmament/fixtures/m13a-unsupported-tangent-composed-holes.firmament", "hole_b", "would be tangent to previously accepted hole")]
[InlineData("testdata/firmament/fixtures/m13a-unsupported-composed-add-ordering.firmament", "joined", "cannot continue the safe subtract chain rooted at 'hole_a'")]
[InlineData("testdata/firmament/fixtures/m13a-unsupported-composed-subtract-sphere.firmament", "cavity", "analytic tool surface kind 'Sphere'")]
- [InlineData("testdata/firmament/fixtures/m13a-unsupported-composed-subtract-box.firmament", "notch", "bounded top-level family")]
+ [InlineData("testdata/firmament/fixtures/m13a-unsupported-composed-subtract-box.firmament", "notch", "bounded mixed through-void builder rejects tangent/edge-grazing analytic-prismatic interactions")]
[InlineData("testdata/firmament/fixtures/m13a-unsupported-composed-subtract-straight-slot.firmament", "slot_b", "bounded mixed through-void builder rejects tangent/edge-grazing analytic-prismatic interactions")]
public void SequentialCompositionOutsideSafeSubset_RemainsRejectedWithoutFallback(string fixturePath, string expectedFeatureId, string expectedMessageFragment)
{
diff --git a/Aetheris.Kernel.Firmament.Tests/FirmamentSafeSubtractFeatureGraphValidationTests.cs b/Aetheris.Kernel.Firmament.Tests/FirmamentSafeSubtractFeatureGraphValidationTests.cs
index e816b070..226efd98 100644
--- a/Aetheris.Kernel.Firmament.Tests/FirmamentSafeSubtractFeatureGraphValidationTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/FirmamentSafeSubtractFeatureGraphValidationTests.cs
@@ -23,7 +23,7 @@ public sealed class FirmamentSafeSubtractFeatureGraphValidationTests
[InlineData("testdata/firmament/fixtures/m13a-unsupported-overlapping-composed-holes.firmament", KernelDiagnosticCode.NotImplemented, "Boolean feature 'hole_b' (subtract) overlaps previously accepted hole <unknown>", "BrepBoolean.AnalyticHole.HoleInterference")]
[InlineData("testdata/firmament/fixtures/m13a-unsupported-tangent-composed-holes.firmament", KernelDiagnosticCode.NotImplemented, "Boolean feature 'hole_b' (subtract) would be tangent to previously accepted hole <unknown>", "BrepBoolean.AnalyticHole.TangentContact")]
[InlineData("testdata/firmament/fixtures/m13a-unsupported-composed-subtract-sphere.firmament", KernelDiagnosticCode.NotImplemented, "Boolean feature 'cavity' (subtract): Boolean Subtract does not support analytic tool surface kind 'Sphere' in the safe boolean family.", "BrepBoolean.UnsupportedAnalyticSurfaceKind")]
- [InlineData("testdata/firmament/fixtures/m13a-unsupported-composed-subtract-box.firmament", KernelDiagnosticCode.NotImplemented, "Boolean feature 'notch' (subtract): Boolean Subtract: recognized safe box-root subtract/intersect routing could not match a bounded top-level family.", "BrepBoolean.RebuildResult")]
+ [InlineData("testdata/firmament/fixtures/m13a-unsupported-composed-subtract-box.firmament", KernelDiagnosticCode.NotImplemented, "Boolean feature 'notch' (subtract): Boolean Subtract: bounded mixed through-void builder rejects tangent/edge-grazing analytic-prismatic interactions", "BrepBooleanBoxMixedThroughVoidBuilder.Build")]
[InlineData("testdata/firmament/fixtures/m13a-unsupported-composed-subtract-straight-slot.firmament", KernelDiagnosticCode.NotImplemented, "Boolean feature 'slot_b' (subtract): Boolean Subtract: bounded mixed through-void builder rejects tangent/edge-grazing analytic-prismatic interactions", "BrepBooleanBoxMixedThroughVoidBuilder.Build")]
public void FeatureGraphValidator_FailsDeterministically_ForUnsupportedSequentialComposition(
string fixturePath,
@@ -75,4 +75,60 @@ public sealed class FirmamentSafeSubtractFeatureGraphValidationTests
&& diagnostic.Source == "firmament.feature-graph.unrecognized-additive-root"
&& diagnostic.Message.Contains("prior add result is not a recognized bounded orthogonal safe subtract root", StringComparison.Ordinal));
}
+
+ [Fact]
+ public void FeatureGraphValidator_PreservesRecognizedState_AfterPrismaticSubtract_WhenSafeCompositionMetadataExists()
+ {
+ const string fixture = """
+firmament:
+ version: 1
+
+model:
+ name: state_continuity_after_prismatic_subtract
+ units: mm
+
+ops[4]:
+ -
+ op: box
+ id: root
+ size[3]:
+ 40
+ 30
+ 12
+
+ -
+ op: subtract
+ id: seed_hole
+ from: root
+ with:
+ op: cylinder
+ radius: 3
+ height: 20
+
+ -
+ op: subtract
+ id: through_slot
+ from: seed_hole
+ with:
+ op: slot_cut
+ length: 20
+ width: 8
+ height: 20
+ corner_radius: 4
+
+ -
+ op: subtract
+ id: continuation_hole
+ from: through_slot
+ with:
+ op: cylinder
+ radius: 2
+ height: 20
+""";
+
+ var result = FirmamentCorpusHarness.Compile(fixture);
+
+ Assert.True(result.Compilation.IsSuccess, string.Join(Environment.NewLine, result.Compilation.Diagnostics.Select(d => d.Message)));
+ Assert.Equal(3, result.Compilation.Value.PrimitiveExecutionResult!.ExecutedBooleans.Count);
+ }
}
diff --git a/Aetheris.Kernel.Firmament/Execution/FirmamentPrimitiveExecutor.cs b/Aetheris.Kernel.Firmament/Execution/FirmamentPrimitiveExecutor.cs
index dc48dab0..46783bf6 100644
--- a/Aetheris.Kernel.Firmament/Execution/FirmamentPrimitiveExecutor.cs
+++ b/Aetheris.Kernel.Firmament/Execution/FirmamentPrimitiveExecutor.cs
@@ -457,6 +457,13 @@ internal static class FirmamentPrimitiveExecutor
: FirmamentSafeSubtractFeatureGraphState.BoundedOrthogonalAdditiveOutsideSafeRoot;
}
+ if (boolean.Kind == FirmamentLoweredBooleanKind.Subtract
+ && validatedResultState == FirmamentSafeSubtractFeatureGraphState.Other
+ && BrepBooleanSafeComposition.TryRecognize(resultBody, tolerance, out _, out _))
+ {
+ return FirmamentSafeSubtractFeatureGraphState.SafeSubtractComposition;
+ }
+
return validatedResultState;
}
diff --git a/docs/frictionlab/FRIC-B0-chimera-pressure-test.md b/docs/frictionlab/FRIC-B0-chimera-pressure-test.md
index a7566d87..c786b76c 100644
--- a/docs/frictionlab/FRIC-B0-chimera-pressure-test.md
+++ b/docs/frictionlab/FRIC-B0-chimera-pressure-test.md
@@ -4,9 +4,13 @@ Date: 2026-04-19 (UTC)
## Mission state
-**Success (FRIC-B0.1 corrective pass)**.
+**Success (FRIC-B0.2 bounded boolean-engine generalization pass)**.
-FRIC-B0 established a boundary map; FRIC-B0.1 corrects one misclassified datapoint (`zone_b_blind_cyl`) that INV-B0 proved was a contained cavity fixture bug. The corrected fixture now models a true exterior-opening blind hole and updates only the affected matrix row.
+FRIC-B0 established a boundary map; FRIC-B0.1 corrected one misclassified datapoint (`zone_b_blind_cyl`). FRIC-B0.2 then generalized the bounded prismatic-continuation rule for safe box-root subtract chains:
+
+- allow prior exterior-opening blind analytic history when prismatic footprint containment has strict radial margin,
+- preserve recognized safe-subtract graph state after successful non-analytic subtracts when safe composition metadata remains valid,
+- keep unsupported-builder families bounded out (non-box roots, open-slot/prismatic through-void continuation, tangent/grazing degeneracy, unsupported analytic continuation families).
## Source-of-truth inspection (code + CLI)
@@ -92,6 +96,12 @@ Zones:
- Corrected case builds successfully under process `default`.
8. `dotnet run --project Aetheris.CLI -- analyze artifacts/fric-b0.1/zone_b_blind_cyl_new.step --json`
- Confirms single-shell manifold body (no enclosed void shell), consistent with an exterior-opening blind hole.
+9. `dotnet run --project Aetheris.CLI --no-build -- build testdata/firmament/frictionlab/fric-b0/chimera_c_zone_cf_mixed_prismatic_baseline_blocked.firmament --json`
+ - Now passes after FRIC-B0.2 bounded continuation generalization.
+10. `dotnet run --project Aetheris.CLI --no-build -- build testdata/firmament/frictionlab/fric-b0/chimera_a_zone_h_partial_overlap.firmament --json`
+ - Now reaches kernel interaction classifier and rejects with tangent/edge-grazing containment diagnostic (instead of upstream tool-kind gate).
+11. `dotnet run --project Aetheris.CLI --no-build -- build testdata/firmament/frictionlab/fric-b0/chimera_c_zone_cc_open_slot_history.firmament --json`
+ - Remains rejected by explicit “prior prismatic/open-slot through-void history unsupported” boundary.
## Per-zone result matrix
@@ -104,7 +114,7 @@ Zones:
| A | `zone_e_slot_through` | `subtract(box, slot_cut through)` | Pass | n/a | Supported prismatic through-cut family | Safe to generalize now (already in family) |
| A | `zone_f_tri_prism` | `subtract(box, triangular_prism through)` | Pass | n/a | Supported prismatic family | Safe to generalize now (already in family) |
| A | `zone_g_box_prism` | `subtract(box, box through)` | Pass | n/a | Supported prismatic family | Safe to generalize now (already in family) |
-| A | `zone_h_partial_overlap_slot` | `subtract(box→analytic history, box prism)` | Reject | `unsupported follow-on tool kind 'box' ... Only nested cylinder or cone...` (`firmament.feature-graph.unsupported-follow-on-kind`) | Root/history feature-graph gate | Safe to generalize now (remove/relax gate for bounded prismatic continuation candidates) |
+| A | `zone_h_partial_overlap_slot` | `subtract(box→analytic history, box prism)` | Reject | `... rejects tangent/edge-grazing analytic-prismatic interactions ...` (`BrepBooleanBoxMixedThroughVoidBuilder.Build`) | Kernel interaction-class rejection (now reached after gate relaxation) | Correctly remains rejected (partial-overlap/tangent class stays bounded out) |
| A | `zone_i_hole_right` | second analytic hole in chain | Reject | `blind-hole continuation exceeds the bounded family...` (`BrepBoolean.AnalyticHole.BlindContinuationOutsideBoundedFamily`) | Analytic continuation + span classification fragility | Generalizable later with stronger bounded history/span model |
| A | `zone_j_grazing_prism` | analytic then edge-grazing prism | Reject | `unsupported follow-on tool kind 'box' ...` (`firmament.feature-graph.unsupported-follow-on-kind`) | Upstream gate prevents interaction classification | Generalizable later with new bounded representation (after gate relaxation + interaction classifier exposure) |
| B | `zone_ba_through_cyl` | `subtract(cylinder, through cylinder)` | Pass | n/a | Supported cylinder-root bore family | Safe to generalize now (already in family) |
@@ -112,10 +122,10 @@ Zones:
| B | `zone_bc_prismatic_slot` | `subtract(cylinder, straight_slot)` | Reject | `sequential safe composition only supports subtracting supported analytic holes...` (`BrepBoolean.RebuildResult`) | Non-box root prismatic continuation boundary | Generalizable later with new bounded representation |
| B | `zone_bd_box_prism` | `subtract(cylinder, box)` | Pass | n/a | Routed as bounded orthogonal pocket candidate | Safe now within narrow admissible overlap cases |
| C | `zone_cb_second_analytic_hole` | second analytic follow-on | Reject | `blind-hole continuation exceeds the bounded family...` (`BrepBoolean.AnalyticHole.BlindContinuationOutsideBoundedFamily`) | History-span continuation fragility | Generalizable later with new bounded representation |
-| C | `zone_cc_follow_on_prism` | open-slot history then prism | Reject | `... bounded orthogonal pocket family requires a single pocket mouth... through-slots ... deferred.` (`BrepBoolean.RebuildResult`) | Open-slot history + mouth-count boundary | Generalizable later with new bounded representation |
+| C | `zone_cc_follow_on_prism` | open-slot/prismatic through-void history then prism | Reject | `... prismatic subtract continuation does not yet support prior prismatic/open-slot through-void history.` (`BrepBoolean.RebuildResult`) | Open-slot/prismatic-through-void history boundary | **Must remain rejected** for this milestone (no continuation builder yet) |
| C | `zone_cd_follow_on_prism` | sphere-history then prism | Reject | `bounded boolean family only supports recognized axis-aligned boxes ...` (`BrepBoolean.RebuildResult`) | Non-safe-root follow-on boundary | **Must remain rejected** (for current bounded family) |
| C | `zone_ce_hole_2` | multi-analytic history continuation | Reject | `blind-hole continuation exceeds the bounded family...` (`BrepBoolean.AnalyticHole.BlindContinuationOutsideBoundedFamily`) | Mixed-count/history continuation limit | Generalizable later with new bounded representation |
-| C | `zone_cf_mixed_prismatic_attempt` | analytic then prismatic mixed baseline | Reject | `unsupported follow-on tool kind 'box' ...` (`firmament.feature-graph.unsupported-follow-on-kind`) | Upstream gate blocks mixed-through-void kernel path | Safe to generalize now (gate should permit bounded prismatic candidates for deeper classifier routing) |
+| C | `zone_cf_mixed_prismatic_attempt` | analytic then prismatic mixed baseline | Pass | n/a | Bounded mixed continuation (containment class) now routed and rebuilt | Improved by FRIC-B0.2 generalized continuation rule |
## Failure clusters