Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel
Preserve edge curve sense and diagnose curved finish planners
Yuechen Li269a144ca35a
diff --git a/Aetheris.Kernel.Core/Step242/Step242Exporter.cs b/Aetheris.Kernel.Core/Step242/Step242Exporter.csindex 621d107e..fbbb1e46 100644--- a/Aetheris.Kernel.Core/Step242/Step242Exporter.cs+++ b/Aetheris.Kernel.Core/Step242/Step242Exporter.cs@@ -793,7 +793,13 @@ public static class Step242Exporterreturn Failure($"Unsupported curve kind '{curve.Kind}'.", $"Edge:{edgeId.Value}");}- var edgeCurveId = writer.AddEntity("EDGE_CURVE", "$", Step242TextWriter.Ref(startVertexId), Step242TextWriter.Ref(endVertexId), Step242TextWriter.Ref(geometryCurveId), Step242TextWriter.BooleanLogical(true));+ // EDGE_CURVE.same_sense is the binding between the parametric curve and+ // the topology edge, not a blanket export constant. In particular, a+ // clockwise Profile arc has an increasing trim interval whose geometric+ // direction is opposite the edge's authored start/end vertices. Writing+ // .T. here inverted that relation for downstream CAD, so cylindrical+ // faces at reflex arcs were trimmed through the complementary sweep.+ var edgeCurveId = writer.AddEntity("EDGE_CURVE", "$", Step242TextWriter.Ref(startVertexId), Step242TextWriter.Ref(endVertexId), Step242TextWriter.Ref(geometryCurveId), Step242TextWriter.BooleanLogical(edgeBinding.OrientedEdgeSense));return KernelResult<string>.Success(edgeCurveId);}diff --git a/Aetheris.Kernel.Firmament.Tests/Integration/LineArcProfileExtrudeEmitterTests.cs b/Aetheris.Kernel.Firmament.Tests/Integration/LineArcProfileExtrudeEmitterTests.csindex 0d831978..fa2f8563 100644--- a/Aetheris.Kernel.Firmament.Tests/Integration/LineArcProfileExtrudeEmitterTests.cs+++ b/Aetheris.Kernel.Firmament.Tests/Integration/LineArcProfileExtrudeEmitterTests.cs@@ -1,4 +1,5 @@using Aetheris.Kernel.Core.Step242;+using Aetheris.Kernel.Core.Brep.Verification;using Aetheris.Kernel.Firmament.Materializer;namespace Aetheris.Kernel.Firmament.Tests.Integration;@@ -46,6 +47,26 @@ public class LineArcProfileExtrudeEmitterTestsAssert.Equal(12, body.Topology.Edges.Count());}+ [Fact]+ public void ExportsClockwiseArcEdgesWithFalseSameSenseSoTheirCylindricalFacesKeepTheMinorTrim()+ {+ var result = LineArcProfileExtrudeEmitter.TryEmit(new LineArcProfileExtrudeRequest([RectOuter(30, 20), HorizontalSlot(0, 0, 12, 2)], 8));+ var body = Assert.IsType<Aetheris.Kernel.Core.Brep.BrepBody>(result.Body);+ Assert.Contains(body.Bindings.EdgeBindings, binding => !binding.OrientedEdgeSense);++ var exported = Step242Exporter.ExportBody(body);+ Assert.True(exported.IsSuccess);+ Assert.Matches(@"(?s)EDGE_CURVE\(\$,#[0-9]+,#[0-9]+,#[0-9]+,\.F\.\)", exported.Value!);++ var reimported = Step242Importer.ImportBody(exported.Value!);+ Assert.True(reimported.IsSuccess);+ Assert.Equal(body.Topology.Faces.Count(), reimported.Value.Topology.Faces.Count());+ Assert.Contains(reimported.Value.Bindings.EdgeBindings, binding => !binding.OrientedEdgeSense);+ var mass = BrepMassProperties.Evaluate(reimported.Value);+ var expectedVolume = 8d * (600d - 32d - (4d * Math.PI));+ Assert.InRange(mass.AbsoluteVolume, expectedVolume - .5d, expectedVolume + .5d);+ }+public static IEnumerable<object[]> ValidCases(){yield return ["rectangle", new LineArcProfileExtrudeRequest([RectOuter(20, 10)], 5), 6, 0];diff --git a/Aetheris.Kernel.Firmament.Tests/Integration/ProfileBoundaryChamferTests.cs b/Aetheris.Kernel.Firmament.Tests/Integration/ProfileBoundaryChamferTests.csindex 073c4c82..3754e5d8 100644--- a/Aetheris.Kernel.Firmament.Tests/Integration/ProfileBoundaryChamferTests.cs+++ b/Aetheris.Kernel.Firmament.Tests/Integration/ProfileBoundaryChamferTests.cs@@ -198,6 +198,22 @@ public sealed class ProfileBoundaryChamferTestsAssert.Contains("ProfileBoundaryFilletJunctionTopologyNotMaterialized", ProfileFilletShellPlanner.TryPlan(Profile(), threeTarget!, threeRadius, threeClearance).Diagnostics);}+ [Fact]+ public void CurvedWholeLoopFinishesNameTheFirstArcStationAndRequiredExactPlanner()+ {+ const string chamfer = "Modify Body { EdgeFinish TopBreak { Target: Bracket.Outer On: Top Kind: Chamfer Distance: 4mm } }";+ Assert.True(ProfileBoundaryChamferSourceBinder.TryBind(chamfer, CurvedProfile(), "Bracket", out var chamferTarget, out var distance, out var chamferDiagnostic), chamferDiagnostic);+ var chamferPlan = ProfileBoundaryChamferPlanner.TryPlan(CurvedProfile(), chamferTarget!, distance);+ Assert.False(chamferPlan.Succeeded);+ Assert.StartsWith("ProfileBoundaryChamferArcSegmentPlannerRequired:station=ReflexSmall:scope=Target:segment=ReflexSmallArc:sourceFamily=Arc:material=Reflex:sourceRadius=2:finishDistance=4:radiusRelation=LessThan:missingPlanner=ChamferArcDerivedExtrusionEdge", Assert.Single(chamferPlan.Diagnostics));++ const string fillet = "Modify Body { EdgeFinish TopRound { Target: Bracket.Outer On: Top Kind: Fillet Radius: 4mm } }";+ Assert.True(ProfileBoundaryChamferSourceBinder.TryBindFillet(fillet, CurvedProfile(), "Bracket", out var filletTarget, out var radius, out var clearance, out var filletDiagnostic), filletDiagnostic);+ var filletPlan = ProfileFilletShellPlanner.TryPlan(CurvedProfile(), filletTarget!, radius, clearance);+ Assert.False(filletPlan.Succeeded);+ Assert.StartsWith("ProfileBoundaryFilletArcSegmentPlannerRequired:station=ReflexSmall:scope=Target:segment=ReflexSmallArc:sourceFamily=Arc:material=Reflex:sourceRadius=2:finishRadius=4:radiusRelation=LessThan:missingPlanner=FilletArcDerivedExtrusionEdge", Assert.Single(filletPlan.Diagnostics));+ }+[Fact]public void ReflexSphereSeamCompatibilityIsExplicitAndNeverReplacesTheToroidalDefault(){@@ -234,4 +250,20 @@ public sealed class ProfileBoundaryChamferTestsvar segments = points.Select((point, index) => new ResolvedProfileSegment2D(names[index], new LineArcLineSegment2D(point, points[(index + 1) % points.Length]), new ProfileSegmentProvenance($"profile:Bracket.Outer.{names[index]}", "test", "test", "test", "XY"))).ToArray();return new ResolvedProfile2D("Bracket", "XY", [new ResolvedProfileLoop2D("Outer", true, segments)], LocalStartDepth: 0d, LocalEndDepth: 8d);}++ private static ResolvedProfile2D CurvedProfile()+ {+ var segments = new ResolvedProfileSegment2D[]+ {+ Segment("Bottom", new LineArcLineSegment2D((0d, 0d), (20d, 0d))),+ Segment("Right", new LineArcLineSegment2D((20d, 0d), (20d, 10d))),+ Segment("TopLead", new LineArcLineSegment2D((20d, 10d), (10d, 10d))),+ Segment("ReflexSmallArc", new LineArcCircularArc2D((10d, 8d), 2d, Math.PI / 2d, -Math.PI / 2d)),+ Segment("Return", new LineArcLineSegment2D((12d, 8d), (0d, 0d)))+ };+ return new ResolvedProfile2D("Bracket", "XY", [new ResolvedProfileLoop2D("Outer", true, segments)], LocalStartDepth: 0d, LocalEndDepth: 8d);++ static ResolvedProfileSegment2D Segment(string name, LineArcProfileCurve2D geometry) =>+ new(name, geometry, new ProfileSegmentProvenance($"profile:Bracket.Outer.{name}", "test", "test", "test", "XY"));+ }}diff --git a/Aetheris.Kernel.Firmament/Materializer/ProfileBoundaryChamfer.cs b/Aetheris.Kernel.Firmament/Materializer/ProfileBoundaryChamfer.csindex 5e4bdf72..4b9c3593 100644--- a/Aetheris.Kernel.Firmament/Materializer/ProfileBoundaryChamfer.cs+++ b/Aetheris.Kernel.Firmament/Materializer/ProfileBoundaryChamfer.cs@@ -130,7 +130,6 @@ public static class ProfileBoundaryChamferSourceBinderif (closed) chainKind = ProfileBoundaryChamferChainKind.ClosedLoop;else if (ordered.Count == 1) chainKind = ProfileBoundaryChamferChainKind.SingleSegment;var orderedSegments = ordered.Select(index => loop.Segments[index]).ToArray();- if (orderedSegments.Any(segment => segment.Geometry is not LineArcLineSegment2D)) { diagnostic = "ProfileBoundaryFilletSegmentKindUnsupported"; return false; }endClearance = clearanceMatch.Success && double.TryParse(clearanceMatch.Groups["value"].Value, NumberStyles.Float, CultureInfo.InvariantCulture, out var explicitClearance) ? explicitClearance : radius;if (!double.IsFinite(endClearance) || endClearance <= 0d) { diagnostic = "ProfileBoundaryFilletEndClearanceMustBePositive"; return false; }@@ -235,7 +234,8 @@ public static class ProfileBoundaryChamferPlannerif (loop is null) return Fail("ProfileBoundaryChamferLoopUnknown");if (!loop.IsOuter) return Fail("ProfileBoundaryChamferInnerLoopUnsupported");if (profile.Loops.Count != 1) return Fail("ProfileBoundaryChamferInnerLoopUnsupported");- if (loop.Segments.Any(x => x.Geometry is not LineArcLineSegment2D)) return Fail("ProfileBoundaryChamferSegmentKindUnsupported");+ if (loop.Segments.Any(x => x.Geometry is not LineArcLineSegment2D))+ return Fail(ProfileBoundaryCurvedFinishDiagnostic.ForFirstSelectedArc(profile, loop, target, distance, "Chamfer") ?? "ProfileBoundaryChamferSegmentKindUnsupported");var lines = loop.Segments.Select(x => (LineArcLineSegment2D)x.Geometry).ToArray();var selected = target.SegmentIds.Select(id => Array.FindIndex(loop.Segments.ToArray(), x => x.Name == id)).ToHashSet();if (selected.Count != target.SegmentIds.Count || selected.Any(x => x < 0)) return Fail("ProfileBoundaryChamferSegmentUnknown");@@ -478,6 +478,74 @@ public static class ProfileBoundaryChamferPlannerprivate static int IndexOf(ResolvedProfileLoop2D loop, string segmentId) => loop.Segments.Select((segment, index) => (segment, index)).Single(x => x.segment.Name == segmentId).index;}+/// <summary>+/// Keeps the line/arc boundary explicit when a source-bound finish cannot yet be+/// materialized. This is intentionally a planner diagnostic, not an attempt to+/// infer an anonymous BRep edge or to approximate an offset surface.+/// </summary>+public static class ProfileBoundaryCurvedFinishDiagnostic+{+ private const double Tolerance = 1e-8;++ public static string? ForFirstSelectedArc(+ ResolvedProfile2D profile,+ ResolvedProfileLoop2D loop,+ ProfileBoundaryChamferTarget target,+ double finishSize,+ string finishKind)+ {+ var selected = target.SegmentIds.ToHashSet(StringComparer.Ordinal);+ var pair = loop.Segments+ .Select((segment, index) => (segment, index))+ .FirstOrDefault(item => selected.Contains(item.segment.Name) && item.segment.Geometry is LineArcCircularArc2D);+ var sourceScope = "Target";+ if (pair.segment is null)+ {+ pair = loop.Segments+ .Select((segment, index) => (segment, index))+ .FirstOrDefault(item => item.segment.Geometry is LineArcCircularArc2D);+ sourceScope = "Host";+ }+ if (pair.segment?.Geometry is not LineArcCircularArc2D arc)+ return null;++ var winding = SignedArea(loop);+ var materialSide = loop.IsOuter ? Math.Sign(winding) : -Math.Sign(winding);+ var material = Math.Sign(arc.SweepAngleRadians) * materialSide >= 0d ? "Convex" : "Reflex";+ var relation = arc.Radius < finishSize - Tolerance ? "LessThan"+ : arc.Radius > finishSize + Tolerance ? "GreaterThan"+ : "Equal";+ var station = sourceScope == "Target" ? StationName(pair.segment.Name) : TargetStationName(target) ?? StationName(pair.segment.Name);+ var amount = finishKind == "Chamfer" ? "finishDistance" : "finishRadius";+ return $"ProfileBoundary{finishKind}ArcSegmentPlannerRequired:station={station}:scope={sourceScope}:segment={pair.segment.Name}:sourceFamily=Arc:material={material}:sourceRadius={arc.Radius.ToString("R", CultureInfo.InvariantCulture)}:{amount}={finishSize.ToString("R", CultureInfo.InvariantCulture)}:radiusRelation={relation}:missingPlanner={finishKind}ArcDerivedExtrusionEdge";+ }++ private static string StationName(string segmentName)+ {+ var match = Regex.Match(segmentName, @"^(?<material>Convex|Reflex)(?<size>Sharp|Small|Medium|Large)Arc$", RegexOptions.CultureInvariant);+ return match.Success ? match.Groups["material"].Value + match.Groups["size"].Value : segmentName;+ }++ private static string? TargetStationName(ProfileBoundaryChamferTarget target) =>+ target.SelectionProvenance.StartsWith("Selection:", StringComparison.Ordinal)+ ? target.SelectionProvenance["Selection:".Length..].Replace("Station", string.Empty, StringComparison.Ordinal)+ : null;++ private static double SignedArea(ResolvedProfileLoop2D loop)+ {+ var points = loop.Segments.Select(segment => Start(segment.Geometry)).ToArray();+ if (points.Any(point => point is null)) return 0d;+ return points.Select((point, index) => point!.Value.X * points[(index + 1) % points.Length]!.Value.Y - points[(index + 1) % points.Length]!.Value.X * point.Value.Y).Sum() * .5d;+ }++ private static (double X, double Y)? Start(LineArcProfileCurve2D geometry) => geometry switch+ {+ LineArcLineSegment2D line => line.Start,+ LineArcCircularArc2D arc => (arc.Center.X + arc.Radius * Math.Cos(arc.StartAngleRadians), arc.Center.Y + arc.Radius * Math.Sin(arc.StartAngleRadians)),+ _ => null+ };+}+/// <summary>/// Authoritative M1 materializer for a finite straight Profile-boundary round. The/// end faces are quarter-discs in planes normal to the selected segment; this keeps@@ -668,12 +736,13 @@ public static class ProfileFilletShellPlannervar m1 = ProfileStraightEdgeFilletPlanner.TryPlan(profile, target, radius, clearance);return new(m1.Succeeded, m1.Body, m1.Correspondence, null, m1.Plan, m1.Diagnostics);}- if (target.ChainKind == ProfileBoundaryChamferChainKind.ClosedLoop) return Fail("ProfileBoundaryFilletLoopTopologyNotMaterialized");- if (target.SegmentIds.Count != 2) return Fail("ProfileBoundaryFilletJunctionTopologyNotMaterialized");var loop = profile.Loops.SingleOrDefault(x => x.Name == target.LoopId);if (loop is null) return Fail("ProfileBoundaryFilletLoopUnknown");if (!loop.IsOuter || profile.Loops.Count != 1) return Fail("ProfileBoundaryFilletInnerLoopUnsupported");- if (loop.Segments.Any(segment => segment.Geometry is not LineArcLineSegment2D)) return Fail("ProfileBoundaryFilletSegmentKindUnsupported");+ if (loop.Segments.Any(segment => segment.Geometry is not LineArcLineSegment2D))+ return Fail(ProfileBoundaryCurvedFinishDiagnostic.ForFirstSelectedArc(profile, loop, target, radius, "Fillet") ?? "ProfileBoundaryFilletSegmentKindUnsupported");+ if (target.ChainKind == ProfileBoundaryChamferChainKind.ClosedLoop) return Fail("ProfileBoundaryFilletLoopTopologyNotMaterialized");+ if (target.SegmentIds.Count != 2) return Fail("ProfileBoundaryFilletJunctionTopologyNotMaterialized");if (!double.IsFinite(radius) || radius <= Tol) return Fail("ProfileBoundaryFilletRadiusMustBePositive");if (!double.IsFinite(clearance) || clearance <= Tol) return Fail("ProfileBoundaryFilletEndClearanceMustBePositive");var a = IndexOf(loop, target.SegmentIds[0]); var b = IndexOf(loop, target.SegmentIds[1]); var count = loop.Segments.Count;diff --git a/docs/firmament/profile-boundary-chamfer-m1.md b/docs/firmament/profile-boundary-chamfer-m1.mdindex 1c1fb6ad..914c355d 100644--- a/docs/firmament/profile-boundary-chamfer-m1.md+++ b/docs/firmament/profile-boundary-chamfer-m1.md@@ -22,7 +22,7 @@ Modify Body { EdgeFinish Break { Target: BreakChain On: Top Kind: Chamfer Distan`On` is required. `Top` and `Bottom` are evaluated in the Profile extrusion's local construction-plane axis, not global Z. The inset uses exact line support offsets: material side follows resolved loop winding, selected-selected supports intersect exactly, and an open chain is closed by planar triangular termination patches without extending the finish to another source segment.-The current contract is one outer line-only Profile loop, a positive equal distance below the extrusion thickness, and one segment/connected chain/whole loop. Curves, inner loops, disconnected or duplicate chains, and legacy `Face: +Z / Target: Boundary` requests receive typed rejection diagnostics.+The current materialized contract is one outer line-only Profile loop, a positive equal distance below the extrusion thickness, and one segment/connected chain/whole loop. Curves are source-bound but not silently coerced: a selected circular arc now reports `ProfileBoundaryChamferArcSegmentPlannerRequired` with station/segment, convex-or-reflex material side, source radius, finish distance, radius relation, and the exact missing `ChamferArcDerivedExtrusionEdge` planner. The X1 chimera card documents the required conical section-transition routes. Inner loops, disconnected or duplicate chains, and legacy `Face: +Z / Target: Boundary` requests receive typed rejection diagnostics.Junction polarity is classified from resolved Profile semantics, never BRep edge direction: predecessor/successor tangents give the signed turn; loop winding and outer/inner role determine the material side. A positive material-side turn is a `ConvexProfileJunction`; a negative one is a `ReflexProfileJunction`. Thus an orthogonal outer CCW L notch has a `-90°` signed turn and a `270°` material interior angle. The planar inset construction intersects the two inward line supports at either class; it does not use a distinct rolling-surface patch. `profile-chamfer-reflex-junction-top.firmament`, the Bottom counterpart, and the mixed L-loop fixture make those guarantees explicit.diff --git a/docs/firmament/profile-edgefinish-chimera-x1.md b/docs/firmament/profile-edgefinish-chimera-x1.mdnew file mode 100644index 00000000..4940e6e1--- /dev/null+++ b/docs/firmament/profile-edgefinish-chimera-x1.md@@ -0,0 +1,89 @@+# Profile EdgeFinish chimera X1 — source-card and planner boundary++X1 introduces the permanent *source* conformance card for Profile edge finishes:+`fixtures/FirmamentV2/Canonical/valid/profile-edgefinish-chimera-base.firmament`.+It is a single CCW outer Profile extruded from 0 to 24 mm. `F = 4 mm`; the+rounded source radii are Small = 2 mm, Medium = 4 mm, and Large = 8 mm.+The explicit straight isolation runs are 32–40 mm (at least `8F`).++The eight source-bound selections are `ConvexSharpStation`, `ConvexSmallStation`,+`ConvexMediumStation`, `ConvexLargeStation`, `ReflexSharpStation`,+`ReflexSmallStation`, `ReflexMediumStation`, and `ReflexLargeStation`. Rounded+stations own a named arc (`ConvexSmallArc`, etc.); sharp stations own the two+adjacent named lines. This is deliberately a Profile identity contract, never a+BRep-edge discovery contract.++## Baseline evidence++The base fixture builds and exports as a line/arc extrusion. It has one body,+one closed shell according to the STEP importer, 19 Profile segments (13 lines+and 6 circular arcs), and bounds `[0, 0, 0]` to `[420, 100, 24]`. The literal+source-space assertion is independently obtained by Green's theorem on the+line/arc boundary: area `38240 mm^2 × 24 mm = 917760 mm^3`.++The profile extrusion exporter now preserves `EDGE_CURVE.same_sense` for+clockwise arcs. Independent STEP reimport therefore agrees with the source+proof at `917760 mm^3`; this specifically prevents reflex cylindrical faces+from being trimmed through their complementary sweep by SolidWorks. The compact+section-normalization report still needs separate directed-arc graph work, but+it is no longer used to contradict this exact-prism volume evidence. The+canonical V2 parser still does not evaluate this assertion itself for+source-bound Profile selections, so that parser integration remains follow-up+work rather than silently claimed coverage.++The persistent base artifact is+`artifacts/edgefinish/profile-edgefinish-chimera-base.step` (23,383 bytes,+SHA-256 `7aa40fe01467be3475716261e2ce0019266a9cb1677108aceb57072a976f22ed`).+Its production canonicalization is+`artifacts/edgefinish/profile-edgefinish-chimera-base.canonical.step` (23,579+bytes, SHA-256 `15b1949efe524364f9664d9f84bb8f022f279f9e9ff837b9e051e89ac99157fc`).++## Current admission matrix++The fixtures for whole-loop Chamfer and Fillet are present, but are intentionally+not called a passing conformance result. Both current materializers are+line-only. The first source-ordered curved station is reported exactly rather+than hidden behind a loop-topology fallback:++| Route | Actual whole-loop result | First diagnostic |+| --- | --- | --- |+| Chamfer, Top, Distance 4 | Not admitted | `ProfileBoundaryChamferArcSegmentPlannerRequired:station=ReflexSmall:...:radiusRelation=LessThan:missingPlanner=ChamferArcDerivedExtrusionEdge` |+| Fillet, Top, Radius 4 | Not admitted | `ProfileBoundaryFilletArcSegmentPlannerRequired:station=ReflexSmall:...:radiusRelation=LessThan:missingPlanner=FilletArcDerivedExtrusionEdge` |+| Fillet, ReflexSharp, SphereSeamCompatibility | Not admitted on this mixed line/arc host | the same typed arc-host planner boundary, scoped to `ReflexSharpStation` |++The sharp line-line primitives remain covered by their existing focused fixtures:+convex uses cylinders plus a sphere; reflex defaults to the exact rolling+horn-torus patch, and `SphereSeamCompatibility` remains an explicit distinct+override. X1 does not alter that policy.++## Derived rounded-source surface matrix++This is the exact geometry a bounded rounded-source planner must own; it is not+claimed as emitted topology today. For a Top chamfer, the section transition of+an arc-derived cylinder is a right circular cone. Convex material offsets to+`Rs - F`; reflex material offsets to `Rs + F`.++| Station class | Rs/F | Chamfer surface/admission | Fillet rolling surface |+| --- | --- | --- | --- |+| Convex Small | 0.5 | cone crosses its axis: invalid without a specific collapsed-offset policy | signed major locus `Rs-F=-2`; equivalent spindle torus (`R=2, r=4`), not admitted |+| Convex Medium | 1 | cone apex at the axis: bounded degenerate if trimmed topology is explicitly represented | spherical limit (`R=0, r=4`), bounded degeneracy requiring a dedicated planner |+| Convex Large | 2 | regular conical frustum | ring torus (`R=4, r=4`) is horn, so interop-sensitive and requires a trimmed-patch planner |+| Reflex Small | 0.5 | regular conical frustum | ring torus (`R=6, r=4`), regular |+| Reflex Medium | 1 | regular conical frustum | ring torus (`R=8, r=4`), regular |+| Reflex Large | 2 | regular conical frustum | ring torus (`R=12, r=4`), regular |++The sharp rows are line-line junctions, not arc offsets: convex selects the+existing sphere junction; reflex selects the existing horn torus by default.++## Required next bounded work++The missing subsystem is not a generic BRep fillet or Boolean fallback. It is a+source-bound line/arc Profile section-transition and rolling-patch planner that+can emit, trim, and compose Plane/Cylinder/Cone/Torus/Sphere faces in Profile+order. It must first provide a mixed line/arc shell route before focused sharp+station selections can reuse the existing junction emitters on this card.++Consequently, no Chamfer/Fillet/compatibility STEP artifact, external-kernel+smoke result, finished-body volume, canonical hash, or successful whole-loop+support matrix is recorded yet. The base artifact is correct source-prism+evidence, but not the finished-feature conformance card.diff --git a/docs/firmament/profile-fillet-common-cases-x2.md b/docs/firmament/profile-fillet-common-cases-x2.mdindex 3b8db80e..cdc3c313 100644--- a/docs/firmament/profile-fillet-common-cases-x2.md+++ b/docs/firmament/profile-fillet-common-cases-x2.md@@ -59,6 +59,17 @@ The next bounded implementation must create one authoritativereflex-junction, and endpoint-termination subplans, then emit the completeshell from that plan. It cannot be obtained safely by stitching M1 endpointfaces or by generic B-rep edge editing.++## Rounded source boundary++Circular Profile source segments are bound as source semantics but are not yet+materialized by this line-only shell route. Their rejection is intentionally+specific: `ProfileBoundaryFilletArcSegmentPlannerRequired` identifies the+station, source arc, material side, source radius, requested radius, relation,+and missing `FilletArcDerivedExtrusionEdge` planner. The X1 chimera card+derives the required toroidal family: convex rolling has signed major locus+`Rs - F` (spindle / sphere-limit / horn boundaries); reflex rolling has+`Rs + F` (regular ring torus for positive `Rs`).# Profile fillet common casesTwo adjacent outer straight segments at a supported 90-degree reflex vertexdiff --git a/docs/firmament/v2-canonical-authoring.md b/docs/firmament/v2-canonical-authoring.mdindex 43a72b9d..7dfab2e1 100644--- a/docs/firmament/v2-canonical-authoring.md+++ b/docs/firmament/v2-canonical-authoring.md@@ -248,6 +248,7 @@ specific unsupported diagnostics.- `fixtures/FirmamentV2/Canonical/valid/profile-compose-l-bracket.firmament`- `fixtures/FirmamentV2/Canonical/valid/profile-straight-edge-fillet-top.firmament`- `fixtures/FirmamentV2/Canonical/valid/profile-straight-edge-fillet-bottom.firmament`+- `fixtures/FirmamentV2/Canonical/valid/profile-edgefinish-chimera-base.firmament` (curved-source baseline card)- `fixtures/FirmamentV2/Canonical/valid/box-hole-pmi.firmament`- `fixtures/FirmamentV2/Canonical/valid/semantic-slot-capsule.firmament`- `fixtures/FirmamentV2/Canonical/valid/semantic-slot-rounded-rectangle.firmament`@@ -268,3 +269,9 @@ specific unsupported diagnostics.Legacy lowercase and phase-style inputs remain compatibility inputs duringmigration. New authoring should use the canonical root shown above.++Profile EdgeFinish targets are always source-bound (`Profile.Outer`, a source+segment, or a named source-chain selection). Current materialized Chamfer and+Fillet routes cover line-only source loops; circular source segments bind and+report a station-specific missing exact planner rather than falling back to+anonymous BRep edge inference. See `profile-edgefinish-chimera-x1.md`.diff --git a/fixtures/FirmamentV2/Canonical/valid/profile-edgefinish-chimera-base.firmament b/fixtures/FirmamentV2/Canonical/valid/profile-edgefinish-chimera-base.firmamentnew file mode 100644index 00000000..a4f4c250--- /dev/null+++ b/fixtures/FirmamentV2/Canonical/valid/profile-edgefinish-chimera-base.firmament@@ -0,0 +1,44 @@+Model ProfileEdgeFinishChimeraBase {+ Units: mm+ // F = 4 mm. The eight stations are isolated by at least 8F of straight run.+ Concept Path ChimeraOutline {+ Start: Point2(0mm, 0mm)+ Heading: 0deg+ Line Bottom { Length: 420mm }+ Line RightSide { Turn: 90deg; Length: 100mm }+ Line TopLead { Turn: 90deg; Length: 20mm }+ Line ConvexSharpDrop { Turn: 90deg; Length: 40mm }+ Line ReflexSharpRun { Turn: -90deg; Length: 40mm }+ Arc ReflexSmallArc { Turn: -90deg; Radius: 2mm }+ Line ReflexSmallRise { Length: 36mm }+ Arc ConvexSmallArc { Turn: 90deg; Radius: 2mm }+ Line BetweenSmallMedium { Length: 40mm }+ Arc ConvexMediumArc { Turn: 90deg; Radius: 4mm }+ Line MediumDrop { Length: 32mm }+ Arc ReflexMediumArc { Turn: -90deg; Radius: 4mm }+ Line BetweenMediumLarge { Length: 40mm }+ Arc ReflexLargeArc { Turn: -90deg; Radius: 8mm }+ Line LargeRise { Length: 24mm }+ Arc ConvexLargeArc { Turn: 90deg; Radius: 8mm }+ Line TopReturn { Length: 252mm }+ Close LeftSide+ }+ Profile Chimera From ChimeraOutline+ Struct Body { Extrude Chimera { Profile: Chimera; From: 0mm; To: 24mm } }++ // A station is a source-bound chain; no BRep edge discovery is involved.+ Selection ConvexSharpStation { Target: TopBoundary Source: Chimera.ProfileSegments([TopLead, ConvexSharpDrop]) Require: ConnectedChain }+ Selection ConvexSmallStation { Target: TopBoundary Source: Chimera.ProfileSegments([ReflexSmallRise, ConvexSmallArc, BetweenSmallMedium]) Require: ConnectedChain }+ Selection ConvexMediumStation { Target: TopBoundary Source: Chimera.ProfileSegments([BetweenSmallMedium, ConvexMediumArc, MediumDrop]) Require: ConnectedChain }+ Selection ConvexLargeStation { Target: TopBoundary Source: Chimera.ProfileSegments([LargeRise, ConvexLargeArc, TopReturn]) Require: ConnectedChain }+ Selection ReflexSharpStation { Target: TopBoundary Source: Chimera.ProfileSegments([ConvexSharpDrop, ReflexSharpRun]) Require: ConnectedChain }+ Selection ReflexSmallStation { Target: TopBoundary Source: Chimera.ProfileSegments([ReflexSharpRun, ReflexSmallArc, ReflexSmallRise]) Require: ConnectedChain }+ Selection ReflexMediumStation { Target: TopBoundary Source: Chimera.ProfileSegments([MediumDrop, ReflexMediumArc, BetweenMediumLarge]) Require: ConnectedChain }+ Selection ReflexLargeStation { Target: TopBoundary Source: Chimera.ProfileSegments([BetweenMediumLarge, ReflexLargeArc, LargeRise]) Require: ConnectedChain }++ Assert Volume Body {+ Expected: 917760mm^3+ Tolerance: 0.01mm^3+ Note: "Independent Green-theorem area 38240 mm^2 times 24 mm extrusion."+ }+}diff --git a/fixtures/FirmamentV2/Canonical/valid/profile-edgefinish-chimera-chamfer.firmament b/fixtures/FirmamentV2/Canonical/valid/profile-edgefinish-chimera-chamfer.firmamentnew file mode 100644index 00000000..14f2e3bd--- /dev/null+++ b/fixtures/FirmamentV2/Canonical/valid/profile-edgefinish-chimera-chamfer.firmament@@ -0,0 +1,37 @@+Model ProfileEdgeFinishChimeraChamfer {+ Units: mm+ // This source is deliberately byte-for-byte geometry-equivalent to the base card.+ Concept Path ChimeraOutline {+ Start: Point2(0mm, 0mm)+ Heading: 0deg+ Line Bottom { Length: 420mm }+ Line RightSide { Turn: 90deg; Length: 100mm }+ Line TopLead { Turn: 90deg; Length: 20mm }+ Line ConvexSharpDrop { Turn: 90deg; Length: 40mm }+ Line ReflexSharpRun { Turn: -90deg; Length: 40mm }+ Arc ReflexSmallArc { Turn: -90deg; Radius: 2mm }+ Line ReflexSmallRise { Length: 36mm }+ Arc ConvexSmallArc { Turn: 90deg; Radius: 2mm }+ Line BetweenSmallMedium { Length: 40mm }+ Arc ConvexMediumArc { Turn: 90deg; Radius: 4mm }+ Line MediumDrop { Length: 32mm }+ Arc ReflexMediumArc { Turn: -90deg; Radius: 4mm }+ Line BetweenMediumLarge { Length: 40mm }+ Arc ReflexLargeArc { Turn: -90deg; Radius: 8mm }+ Line LargeRise { Length: 24mm }+ Arc ConvexLargeArc { Turn: 90deg; Radius: 8mm }+ Line TopReturn { Length: 252mm }+ Close LeftSide+ }+ Profile Chimera From ChimeraOutline+ Struct Body { Extrude Chimera { Profile: Chimera; From: 0mm; To: 24mm } }+ Selection ConvexSharpStation { Target: TopBoundary Source: Chimera.ProfileSegments([TopLead, ConvexSharpDrop]) Require: ConnectedChain }+ Selection ConvexSmallStation { Target: TopBoundary Source: Chimera.ProfileSegments([ReflexSmallRise, ConvexSmallArc, BetweenSmallMedium]) Require: ConnectedChain }+ Selection ConvexMediumStation { Target: TopBoundary Source: Chimera.ProfileSegments([BetweenSmallMedium, ConvexMediumArc, MediumDrop]) Require: ConnectedChain }+ Selection ConvexLargeStation { Target: TopBoundary Source: Chimera.ProfileSegments([LargeRise, ConvexLargeArc, TopReturn]) Require: ConnectedChain }+ Selection ReflexSharpStation { Target: TopBoundary Source: Chimera.ProfileSegments([ConvexSharpDrop, ReflexSharpRun]) Require: ConnectedChain }+ Selection ReflexSmallStation { Target: TopBoundary Source: Chimera.ProfileSegments([ReflexSharpRun, ReflexSmallArc, ReflexSmallRise]) Require: ConnectedChain }+ Selection ReflexMediumStation { Target: TopBoundary Source: Chimera.ProfileSegments([MediumDrop, ReflexMediumArc, BetweenMediumLarge]) Require: ConnectedChain }+ Selection ReflexLargeStation { Target: TopBoundary Source: Chimera.ProfileSegments([BetweenMediumLarge, ReflexLargeArc, LargeRise]) Require: ConnectedChain }+ Modify Body { EdgeFinish ChimeraTopChamfer { Target: Chimera.Outer On: Top Kind: Chamfer Distance: 4mm } }+}diff --git a/fixtures/FirmamentV2/Canonical/valid/profile-edgefinish-chimera-fillet.firmament b/fixtures/FirmamentV2/Canonical/valid/profile-edgefinish-chimera-fillet.firmamentnew file mode 100644index 00000000..0ce17cd0--- /dev/null+++ b/fixtures/FirmamentV2/Canonical/valid/profile-edgefinish-chimera-fillet.firmament@@ -0,0 +1,37 @@+Model ProfileEdgeFinishChimeraFillet {+ Units: mm+ // This source is deliberately byte-for-byte geometry-equivalent to the base card.+ Concept Path ChimeraOutline {+ Start: Point2(0mm, 0mm)+ Heading: 0deg+ Line Bottom { Length: 420mm }+ Line RightSide { Turn: 90deg; Length: 100mm }+ Line TopLead { Turn: 90deg; Length: 20mm }+ Line ConvexSharpDrop { Turn: 90deg; Length: 40mm }+ Line ReflexSharpRun { Turn: -90deg; Length: 40mm }+ Arc ReflexSmallArc { Turn: -90deg; Radius: 2mm }+ Line ReflexSmallRise { Length: 36mm }+ Arc ConvexSmallArc { Turn: 90deg; Radius: 2mm }+ Line BetweenSmallMedium { Length: 40mm }+ Arc ConvexMediumArc { Turn: 90deg; Radius: 4mm }+ Line MediumDrop { Length: 32mm }+ Arc ReflexMediumArc { Turn: -90deg; Radius: 4mm }+ Line BetweenMediumLarge { Length: 40mm }+ Arc ReflexLargeArc { Turn: -90deg; Radius: 8mm }+ Line LargeRise { Length: 24mm }+ Arc ConvexLargeArc { Turn: 90deg; Radius: 8mm }+ Line TopReturn { Length: 252mm }+ Close LeftSide+ }+ Profile Chimera From ChimeraOutline+ Struct Body { Extrude Chimera { Profile: Chimera; From: 0mm; To: 24mm } }+ Selection ConvexSharpStation { Target: TopBoundary Source: Chimera.ProfileSegments([TopLead, ConvexSharpDrop]) Require: ConnectedChain }+ Selection ConvexSmallStation { Target: TopBoundary Source: Chimera.ProfileSegments([ReflexSmallRise, ConvexSmallArc, BetweenSmallMedium]) Require: ConnectedChain }+ Selection ConvexMediumStation { Target: TopBoundary Source: Chimera.ProfileSegments([BetweenSmallMedium, ConvexMediumArc, MediumDrop]) Require: ConnectedChain }+ Selection ConvexLargeStation { Target: TopBoundary Source: Chimera.ProfileSegments([LargeRise, ConvexLargeArc, TopReturn]) Require: ConnectedChain }+ Selection ReflexSharpStation { Target: TopBoundary Source: Chimera.ProfileSegments([ConvexSharpDrop, ReflexSharpRun]) Require: ConnectedChain }+ Selection ReflexSmallStation { Target: TopBoundary Source: Chimera.ProfileSegments([ReflexSharpRun, ReflexSmallArc, ReflexSmallRise]) Require: ConnectedChain }+ Selection ReflexMediumStation { Target: TopBoundary Source: Chimera.ProfileSegments([MediumDrop, ReflexMediumArc, BetweenMediumLarge]) Require: ConnectedChain }+ Selection ReflexLargeStation { Target: TopBoundary Source: Chimera.ProfileSegments([BetweenMediumLarge, ReflexLargeArc, LargeRise]) Require: ConnectedChain }+ Modify Body { EdgeFinish ChimeraTopFillet { Target: Chimera.Outer On: Top Kind: Fillet Radius: 4mm } }+}diff --git a/fixtures/FirmamentV2/Canonical/valid/profile-edgefinish-chimera-reflex-sphere-compat.firmament b/fixtures/FirmamentV2/Canonical/valid/profile-edgefinish-chimera-reflex-sphere-compat.firmamentnew file mode 100644index 00000000..40dd9540--- /dev/null+++ b/fixtures/FirmamentV2/Canonical/valid/profile-edgefinish-chimera-reflex-sphere-compat.firmament@@ -0,0 +1,37 @@+Model ProfileEdgeFinishChimeraReflexSphereCompatibility {+ Units: mm+ // Same canonical Profile as the base, Chamfer, and Fillet cards.+ Concept Path ChimeraOutline {+ Start: Point2(0mm, 0mm)+ Heading: 0deg+ Line Bottom { Length: 420mm }+ Line RightSide { Turn: 90deg; Length: 100mm }+ Line TopLead { Turn: 90deg; Length: 20mm }+ Line ConvexSharpDrop { Turn: 90deg; Length: 40mm }+ Line ReflexSharpRun { Turn: -90deg; Length: 40mm }+ Arc ReflexSmallArc { Turn: -90deg; Radius: 2mm }+ Line ReflexSmallRise { Length: 36mm }+ Arc ConvexSmallArc { Turn: 90deg; Radius: 2mm }+ Line BetweenSmallMedium { Length: 40mm }+ Arc ConvexMediumArc { Turn: 90deg; Radius: 4mm }+ Line MediumDrop { Length: 32mm }+ Arc ReflexMediumArc { Turn: -90deg; Radius: 4mm }+ Line BetweenMediumLarge { Length: 40mm }+ Arc ReflexLargeArc { Turn: -90deg; Radius: 8mm }+ Line LargeRise { Length: 24mm }+ Arc ConvexLargeArc { Turn: 90deg; Radius: 8mm }+ Line TopReturn { Length: 252mm }+ Close LeftSide+ }+ Profile Chimera From ChimeraOutline+ Struct Body { Extrude Chimera { Profile: Chimera; From: 0mm; To: 24mm } }+ Selection ConvexSharpStation { Target: TopBoundary Source: Chimera.ProfileSegments([TopLead, ConvexSharpDrop]) Require: ConnectedChain }+ Selection ConvexSmallStation { Target: TopBoundary Source: Chimera.ProfileSegments([ReflexSmallRise, ConvexSmallArc, BetweenSmallMedium]) Require: ConnectedChain }+ Selection ConvexMediumStation { Target: TopBoundary Source: Chimera.ProfileSegments([BetweenSmallMedium, ConvexMediumArc, MediumDrop]) Require: ConnectedChain }+ Selection ConvexLargeStation { Target: TopBoundary Source: Chimera.ProfileSegments([LargeRise, ConvexLargeArc, TopReturn]) Require: ConnectedChain }+ Selection ReflexSharpStation { Target: TopBoundary Source: Chimera.ProfileSegments([ConvexSharpDrop, ReflexSharpRun]) Require: ConnectedChain }+ Selection ReflexSmallStation { Target: TopBoundary Source: Chimera.ProfileSegments([ReflexSharpRun, ReflexSmallArc, ReflexSmallRise]) Require: ConnectedChain }+ Selection ReflexMediumStation { Target: TopBoundary Source: Chimera.ProfileSegments([MediumDrop, ReflexMediumArc, BetweenMediumLarge]) Require: ConnectedChain }+ Selection ReflexLargeStation { Target: TopBoundary Source: Chimera.ProfileSegments([BetweenMediumLarge, ReflexLargeArc, LargeRise]) Require: ConnectedChain }+ Modify Body { EdgeFinish ReflexSharpCompatibility { Target: ReflexSharpStation On: Top Kind: Fillet Radius: 4mm EndClearance: 4mm ReflexJunction: SphereSeamCompatibility } }+}diff --git a/testdata/step242/manifests/nist.v0.report.json b/testdata/step242/manifests/nist.v0.report.jsonindex 6003e7c2..293d8fea 100644--- a/testdata/step242/manifests/nist.v0.report.json+++ b/testdata/step242/manifests/nist.v0.report.json@@ -237,7 +237,7 @@"edges": 104,"faces": 42},- "canonicalSha256": "c46e656c14c16d654de70466d8d46e74ad2fbed7a2656d8bcc9b5a481f657057"+ "canonicalSha256": "42a7d1314b2ff79997cbecaf86dbe169018ca12687252a0de7873b01b2685c67"},{"fileId": "testdata_step242_nist_STC_nist_stc_06_asme1_ap242-e3",