Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel
FRIC-B1 route follow-on prismatic subtracts to kernel
Yuechen Li84fd4bc03aa1
diff --git a/Aetheris.Kernel.Firmament.Tests/FirmamentBooleanCanonicalSuccessTests.cs b/Aetheris.Kernel.Firmament.Tests/FirmamentBooleanCanonicalSuccessTests.csindex ed9b8bb9..01bc8d1f 100644--- a/Aetheris.Kernel.Firmament.Tests/FirmamentBooleanCanonicalSuccessTests.cs+++ b/Aetheris.Kernel.Firmament.Tests/FirmamentBooleanCanonicalSuccessTests.cs@@ -189,8 +189,9 @@ public sealed class FirmamentBooleanCanonicalSuccessTests[InlineData("testdata/firmament/fixtures/m13a-unsupported-overlapping-composed-holes.firmament", "hole_b", "overlaps previously accepted hole")][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", "unsupported follow-on tool kind 'sphere'")]- [InlineData("testdata/firmament/fixtures/m13a-unsupported-composed-subtract-box.firmament", "notch", "unsupported follow-on tool kind 'box'")]+ [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-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){var result = FirmamentCorpusHarness.Compile(FirmamentCorpusHarness.ReadFixtureText(fixturePath));@@ -391,7 +392,6 @@ public sealed class FirmamentBooleanCanonicalSuccessTests=> message.Contains("bounded boolean family only supports recognized axis-aligned boxes from BrepPrimitives.CreateBox(...).", StringComparison.Ordinal)|| message.Contains("sequential safe composition only supports subtracting supported cylinder/cone analytic holes", StringComparison.Ordinal)|| message.Contains("safe subtract", StringComparison.Ordinal)- || message.Contains("unsupported follow-on tool kind", StringComparison.Ordinal)|| message.Contains("Boolean feature", StringComparison.Ordinal)|| message.Contains("analytic hole surface kind", StringComparison.Ordinal)|| message.Contains("fully enclosed spherical cavity", StringComparison.Ordinal);diff --git a/Aetheris.Kernel.Firmament.Tests/FirmamentSafeSubtractFeatureGraphValidationTests.cs b/Aetheris.Kernel.Firmament.Tests/FirmamentSafeSubtractFeatureGraphValidationTests.csindex 96e9032d..e816b070 100644--- a/Aetheris.Kernel.Firmament.Tests/FirmamentSafeSubtractFeatureGraphValidationTests.cs+++ b/Aetheris.Kernel.Firmament.Tests/FirmamentSafeSubtractFeatureGraphValidationTests.cs@@ -22,8 +22,9 @@ public sealed class FirmamentSafeSubtractFeatureGraphValidationTests[InlineData("testdata/firmament/fixtures/m13a-unsupported-composed-add-ordering.firmament", KernelDiagnosticCode.ValidationFailed, "Boolean feature 'joined' (add) cannot continue the safe subtract chain rooted at 'hole_a'", "firmament.feature-graph.invalid-composition-order")][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.ValidationFailed, "Boolean feature 'cavity' (subtract) uses unsupported follow-on tool kind 'sphere'", "firmament.feature-graph.unsupported-follow-on-kind")]- [InlineData("testdata/firmament/fixtures/m13a-unsupported-composed-subtract-box.firmament", KernelDiagnosticCode.ValidationFailed, "Boolean feature 'notch' (subtract) uses unsupported follow-on tool kind 'box'", "firmament.feature-graph.unsupported-follow-on-kind")]+ [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-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,KernelDiagnosticCode expectedCode,diff --git a/Aetheris.Kernel.Firmament/Validation/FirmamentSafeSubtractFeatureGraphValidator.cs b/Aetheris.Kernel.Firmament/Validation/FirmamentSafeSubtractFeatureGraphValidator.csindex caa486ed..f250c6a4 100644--- a/Aetheris.Kernel.Firmament/Validation/FirmamentSafeSubtractFeatureGraphValidator.cs+++ b/Aetheris.Kernel.Firmament/Validation/FirmamentSafeSubtractFeatureGraphValidator.cs@@ -39,10 +39,10 @@ internal static class FirmamentSafeSubtractFeatureGraphValidatorif (!usesSupportedSafeHoleTool){- return Failure(- KernelDiagnosticCode.ValidationFailed,- $"Boolean feature '{boolean.FeatureId}' (subtract) uses unsupported follow-on tool kind '{boolean.Tool.OpName}' after safe subtract composition began on '{boolean.PrimaryReferenceFeatureId}'. Only nested cylinder or cone through-hole tools are supported in that chain.",- "firmament.feature-graph.unsupported-follow-on-kind");+ return KernelResult<FirmamentSafeSubtractFeatureGraphValidation>.Success(+ new FirmamentSafeSubtractFeatureGraphValidation(+ WasValidated: false,+ ResultState: FirmamentSafeSubtractFeatureGraphState.Other));}return ValidateSupportedSafeSubtract(boolean, executionBodiesByFeatureId, tolerance, resolvedToolBody);diff --git a/testdata/firmament/examples/README.md b/testdata/firmament/examples/README.mdindex 708b29e2..43eafe38 100644--- a/testdata/firmament/examples/README.md+++ b/testdata/firmament/examples/README.md@@ -35,4 +35,4 @@ Other combinations may fail and are intentionally not supported yet.- `p2_mirror_hole_pair.firmament` — bounded `pattern_mirror` example for principal-plane mirrored hole placement.- `schema_box_basic.firmament` — minimal schema-present export example showing schema presence without changing export body semantics; helper export path: `testdata/firmament/exports/schema_box_basic.step`.-Unsupported boolean requests are tracked as fixtures/tests, not presented in this working example pack. The supported safe subtract family remains narrow and explicit: `subtract(box, cylinder)` and `subtract(box, cone)` still require a Z-aligned tool, full span through the current box shell, non-degenerate boundary circles for cones, and strict in-bounds clearance with no tangent/grazing contact. Sequential composition is limited to repeated document-order subtracts from that same safe family only: `box → subtract cylinder/cone → subtract cylinder/cone`, while the intermediate result must stay representable as one outer box shell plus non-interfering analytic through-holes. This is not general multi-feature boolean support. The composability probe `composed_part_with_slot.firmament` captures a current blocker: `subtract(library_part, slot_cut)` reaches execution but fails the bounded sequential safe-composition gate because the existing connector part already contains a hole-family composition that does not admit an additional non-analytic slot tool. Box+cylinder `add`, box+cylinder `intersect`, rotated cylinders, partial-depth cuts, tangent/grazing cases, outside-footprint cuts, interfering multi-hole layouts, and unsupported subtract orderings remain unsupported. Box+cone `add`, box+cone `intersect`, tilted cones, partial-depth cone cuts, tangent/grazing cone cuts, apex-inside cases, outside-footprint cone cuts, and unsupported mixed-ordering requests remain unsupported. Box+sphere support is still narrow and truth-first: only `subtract(box, sphere)` with a strictly contained, non-tangent, fully enclosed cavity is supported, reconstructed via one outer shell plus one inner spherical shell. `add(box, sphere)`, `intersect(box, sphere)`, tangent cavity requests, and partially outside sphere requests remain unsupported. Box+torus booleans are currently unsupported in every audited form: `subtract(box, torus)`, `add(box, torus)`, and `intersect(box, torus)` all fail the real kernel boundary for centered, offset, fully contained, face-intersecting, and outside-footprint torus placements, so no box+torus example is included here. These files are intended to stay minimal, readable, and aligned with the implemented language surface. Export artifacts are kept separately under `testdata/firmament/exports/` so examples remain source-only and demo outputs stay easy to find.+Unsupported boolean requests are tracked as fixtures/tests, not presented in this working example pack. The supported safe subtract family remains narrow and explicit: `subtract(box, cylinder)` and `subtract(box, cone)` still require a Z-aligned tool, full span through the current box shell, non-degenerate boundary circles for cones, and strict in-bounds clearance with no tangent/grazing contact. Sequential composition is still bounded: analytic follow-on subtracts are pre-validated as safe-hole composition, while non-analytic follow-on tools are now passed through to kernel bounded-family routing for final admissibility/reconstruction diagnostics rather than being rejected by an upstream tool-kind gate. This is not general multi-feature boolean support. The composability probe `composed_part_with_slot.firmament` is now a successful routed case (`subtract(library_part, slot_cut)`) and remains useful as a regression check that follow-on prismatic routing reaches kernel execution. Box+cylinder `add`, box+cylinder `intersect`, rotated cylinders, partial-depth cuts, tangent/grazing cases, outside-footprint cuts, interfering multi-hole layouts, and unsupported subtract orderings remain unsupported. Box+cone `add`, box+cone `intersect`, tilted cones, partial-depth cone cuts, tangent/grazing cone cuts, apex-inside cases, outside-footprint cone cuts, and unsupported mixed-ordering requests remain unsupported. Box+sphere support is still narrow and truth-first: only `subtract(box, sphere)` with a strictly contained, non-tangent, fully enclosed cavity is supported, reconstructed via one outer shell plus one inner spherical shell. `add(box, sphere)`, `intersect(box, sphere)`, tangent cavity requests, and partially outside sphere requests remain unsupported. Box+torus booleans are currently unsupported in every audited form: `subtract(box, torus)`, `add(box, torus)`, and `intersect(box, torus)` all fail the real kernel boundary for centered, offset, fully contained, face-intersecting, and outside-footprint torus placements, so no box+torus example is included here. These files are intended to stay minimal, readable, and aligned with the implemented language surface. Export artifacts are kept separately under `testdata/firmament/exports/` so examples remain source-only and demo outputs stay easy to find.diff --git a/testdata/firmament/fixtures/m13a-unsupported-composed-subtract-straight-slot.firmament b/testdata/firmament/fixtures/m13a-unsupported-composed-subtract-straight-slot.firmamentnew file mode 100644index 00000000..b0bafe66--- /dev/null+++ b/testdata/firmament/fixtures/m13a-unsupported-composed-subtract-straight-slot.firmament@@ -0,0 +1,34 @@+firmament:+ version: 1++model:+ name: m13a_unsupported_composed_subtract_straight_slot+ units: mm++ops[3]:+ -+ op: box+ id: base+ size[3]:+ 40+ 30+ 12++ -+ op: subtract+ id: hole_a+ from: base+ with:+ op: cylinder+ radius: 4+ height: 20++ -+ op: subtract+ id: slot_b+ from: hole_a+ with:+ op: straight_slot+ length: 14+ width: 6+ height: 20