Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel
Clarify blind prismatic continuation as explicit deferred reject
Yuechen Li755ac41c4fc9
diff --git a/Aetheris.Kernel.Core.Tests/Brep/Boolean/BrepBooleanTests.cs b/Aetheris.Kernel.Core.Tests/Brep/Boolean/BrepBooleanTests.csindex ba5d44bb..e7eb92bc 100644--- a/Aetheris.Kernel.Core.Tests/Brep/Boolean/BrepBooleanTests.cs+++ b/Aetheris.Kernel.Core.Tests/Brep/Boolean/BrepBooleanTests.cs@@ -1851,7 +1851,7 @@ public sealed class BrepBooleanTestsvar withHole = BrepBoolean.Subtract(root, holeTool);Assert.True(withHole.IsSuccess);- var slotTool = TransformBody(StandardLibraryPrimitives.CreateSlotCut(16d, 8d, 10d, 4d).Value, Transform3D.CreateTranslation(new Vector3D(0d, 0d, -5d)));+ var slotTool = StandardLibraryPrimitives.CreateSlotCut(16d, 8d, 24d, 4d).Value;var result = BrepBoolean.Subtract(withHole.Value, slotTool);Assert.True(result.IsSuccess);@@ -1868,7 +1868,7 @@ public sealed class BrepBooleanTestsvar withHole = BrepBoolean.Subtract(root, holeTool);Assert.True(withHole.IsSuccess);- var slotTool = TransformBody(StandardLibraryPrimitives.CreateSlotCut(16d, 8d, 10d, 4d).Value, Transform3D.CreateTranslation(new Vector3D(0d, 0d, -5d)));+ var slotTool = StandardLibraryPrimitives.CreateSlotCut(16d, 8d, 24d, 4d).Value;var result = BrepBoolean.Subtract(withHole.Value, slotTool);Assert.False(result.IsSuccess);@@ -1877,7 +1877,7 @@ public sealed class BrepBooleanTests}[Fact]- public void MixedThroughVoid_BlindThenPrismaticContainingFootprint_Succeeds()+ public void BlindPocketContinuation_UnsupportedCase_Rejects(){var root = BrepPrimitives.CreateBox(20d, 20d, 20d).Value;var blindHoleTool = TransformBody(BrepPrimitives.CreateCylinder(2d, 8d).Value, Transform3D.CreateTranslation(new Vector3D(0d, 0d, 6d)));@@ -1885,13 +1885,12 @@ public sealed class BrepBooleanTestsAssert.True(withBlindHole.IsSuccess);Assert.Equal(SupportedBooleanHoleSpanKind.BlindFromTop, Assert.Single(withBlindHole.Value.SafeBooleanComposition!.Holes).SpanKind);- var slotTool = StandardLibraryPrimitives.CreateSlotCut(16d, 8d, 24d, 4d).Value;+ var slotTool = StandardLibraryPrimitives.CreateSlotCut(16d, 8d, 8d, 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);+ Assert.False(result.IsSuccess);+ var diagnostic = Assert.Single(result.Diagnostics);+ Assert.Contains("blind-pocket continuation", diagnostic.Message, StringComparison.Ordinal);}[Fact]diff --git a/Aetheris.Kernel.Core/Brep/Boolean/BrepBoolean.cs b/Aetheris.Kernel.Core/Brep/Boolean/BrepBoolean.csindex de55363a..cedc887e 100644--- a/Aetheris.Kernel.Core/Brep/Boolean/BrepBoolean.cs+++ b/Aetheris.Kernel.Core/Brep/Boolean/BrepBoolean.cs@@ -1834,7 +1834,17 @@ public static class BrepBooleanreturn false;}+ var root = leftComposition.RootDescriptor.Box;+ var isThroughCut = prismTool.Bounds.MinZ <= (root.MinZ + tolerance.Linear)+ && prismTool.Bounds.MaxZ >= (root.MaxZ - tolerance.Linear);+var hasPriorSubtractHistory = leftComposition.Holes.Count > 0 || (leftComposition.OpenSlots?.Count ?? 0) > 0;+ if (hasPriorSubtractHistory && !isThroughCut)+ {+ unsupportedReason = "Boolean Subtract: bounded prismatic blind-pocket continuation on safe compositions is deferred pending a bounded analytic-plus-orthogonal reconstruction path.";+ return false;+ }+if (hasPriorSubtractHistory){if (!SupportsBoundedAnalyticHistoryForPrismaticContinuation(leftComposition, prismTool.Footprint, tolerance, out var historyReason))@@ -1844,7 +1854,6 @@ public static class BrepBoolean}}- var root = leftComposition.RootDescriptor.Box;if (!hasPriorSubtractHistory&& (prismTool.Bounds.MinZ > root.MinZ + tolerance.Linear || prismTool.Bounds.MaxZ < root.MaxZ - tolerance.Linear)){diff --git a/docs/boolean-deferred.md b/docs/boolean-deferred.mdindex 71e86ca8..57daa717 100644--- a/docs/boolean-deferred.md+++ b/docs/boolean-deferred.md@@ -31,7 +31,7 @@ The following items remain deferred:- broad add/intersect expansion outside the current narrow box-box subset- general BRep booleans- bounded mixed analytic-hole + prismatic continuation rebuild path on safe box roots (recognition now exists; bounded reconstruction remains deferred)-- safe-composition prismatic blind-pocket continuation (recognition-classification gap + bounded reconstruction path still deferred)+- safe-composition prismatic blind-pocket continuation (explicitly rejected with deterministic diagnostic: bounded analytic+orthogonal reconstruction path still deferred)- multi-sphere and mixed sphere+prismatic continuation in one subtract chain## Known blocker: rotated cone through-hole