Skip to content

Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel

Implement F3 bounded cross-radius cylindrical fillet termination

Yuechen Life18a606be3e
diff --git a/Aetheris.Kernel.Core.Tests/Brep/EdgeFinishing/BrepBoundedFilletTests.cs b/Aetheris.Kernel.Core.Tests/Brep/EdgeFinishing/BrepBoundedFilletTests.cs
index 0ee5d06b..18c63405 100644
--- a/Aetheris.Kernel.Core.Tests/Brep/EdgeFinishing/BrepBoundedFilletTests.cs
+++ b/Aetheris.Kernel.Core.Tests/Brep/EdgeFinishing/BrepBoundedFilletTests.cs
@@ -86,6 +86,38 @@ public sealed class BrepBoundedFilletTests
binding => secondPass.Value.Geometry.GetSurface(binding.SurfaceGeometryId).Kind == SurfaceGeometryKind.Cylinder);
}
+ [Fact]
+ public void FilletTrustedPolyhedralSingleInternalConcaveEdge_Builds_ChainedCylindricalTermination_IntoLargerRadiusCylindricalContext()
+ {
+ var source = CreatePlanarSourceWithNotchComposition();
+ var firstPreflight = BrepBoundedManufacturingFilletPreflight.ResolveInternalConcaveVerticalEdge(
+ source.SafeBooleanComposition!,
+ BrepBoundedManufacturingFilletEdge.InnerXMaxYMin,
+ radius: 1.5d);
+ Assert.True(firstPreflight.IsSuccess);
+
+ var firstPass = BrepBoundedFillet.FilletTrustedPolyhedralSingleInternalConcaveEdge(source, firstPreflight.Value, 1.5d);
+ Assert.True(firstPass.IsSuccess, string.Join(Environment.NewLine, firstPass.Diagnostics.Select(d => d.Message)));
+
+ var chainedPreflight = BrepBoundedManufacturingFilletPreflight.ResolveInternalConcaveVerticalEdges(
+ source.SafeBooleanComposition!,
+ [BrepBoundedManufacturingFilletEdge.InnerXMaxYMin, BrepBoundedManufacturingFilletEdge.InnerXMaxYMax],
+ radius: 1d);
+ Assert.True(chainedPreflight.IsSuccess);
+
+ var secondPass = BrepBoundedFillet.FilletTrustedPolyhedralSingleInternalConcaveEdge(firstPass.Value, chainedPreflight.Value, 1d);
+ Assert.True(secondPass.IsSuccess, string.Join(Environment.NewLine, secondPass.Diagnostics.Select(d => d.Message)));
+
+ var cylinderRadii = secondPass.Value.Bindings.FaceBindings
+ .Select(binding => secondPass.Value.Geometry.GetSurface(binding.SurfaceGeometryId))
+ .Where(surface => surface.Kind == SurfaceGeometryKind.Cylinder && surface.Cylinder is not null)
+ .Select(surface => surface.Cylinder!.Value.Radius)
+ .DistinctBy(value => System.Math.Round(value, 6))
+ .ToArray();
+ Assert.Contains(cylinderRadii, value => System.Math.Abs(value - 1d) <= 1e-6);
+ Assert.Contains(cylinderRadii, value => System.Math.Abs(value - 1.5d) <= 1e-6);
+ }
+
[Fact]
public void FilletTrustedPolyhedralSingleInternalConcaveEdge_Rejects_ChainedCylindricalTermination_ForMismatchedRadius()
{
@@ -110,7 +142,8 @@ public sealed class BrepBoundedFilletTests
Assert.Contains(
secondPass.Diagnostics,
d => d.Message.Contains("chained_same_radius_fillet_with_cylindrical_termination", StringComparison.Ordinal)
- && d.Message.Contains("hasMatchingRadiusVerticalCylinder=False", StringComparison.Ordinal));
+ && d.Message.Contains("hasMatchingRadiusVerticalCylinder=False", StringComparison.Ordinal)
+ && d.Message.Contains("hasLargerRadiusVerticalCylinder=False", StringComparison.Ordinal));
}
private static BrepBody CreatePlanarSourceWithLRootComposition()
diff --git a/Aetheris.Kernel.Core/Brep/EdgeFinishing/BrepBoundedFillet.cs b/Aetheris.Kernel.Core/Brep/EdgeFinishing/BrepBoundedFillet.cs
index bce87d81..efb1bda3 100644
--- a/Aetheris.Kernel.Core/Brep/EdgeFinishing/BrepBoundedFillet.cs
+++ b/Aetheris.Kernel.Core/Brep/EdgeFinishing/BrepBoundedFillet.cs
@@ -86,10 +86,10 @@ public static class BrepBoundedFillet
context => context.IsBoundedRadius,
context => context.HasLocalChainedInteraction,
context => context.HasCylindricalSourceFaces,
- context => context.HasMatchingRadiusVerticalCylindricalSourceFace,
+ context => context.HasMatchingRadiusVerticalCylindricalSourceFace || context.HasLargerRadiusVerticalCylindricalSourceFace,
context => context.IsCylindricalTerminationSupported),
Score: context => context.HasCylindricalSourceFaces ? 175d : 0d,
- RejectionReason: context => $"requires supported chained same-radius cylindrical-context termination context (trusted={context.IsTrustedSource}, count={context.SelectionCount}, concave={context.IsInternalConcave}, bounded={context.IsBoundedRadius}, interacting={context.HasLocalChainedInteraction}, hasCylindricalSourceFaces={context.HasCylindricalSourceFaces}, hasMatchingRadiusVerticalCylinder={context.HasMatchingRadiusVerticalCylindricalSourceFace}, supported={context.IsCylindricalTerminationSupported})",
+ RejectionReason: context => $"requires supported chained same-radius cylindrical-context termination context (trusted={context.IsTrustedSource}, count={context.SelectionCount}, concave={context.IsInternalConcave}, bounded={context.IsBoundedRadius}, interacting={context.HasLocalChainedInteraction}, hasCylindricalSourceFaces={context.HasCylindricalSourceFaces}, hasMatchingRadiusVerticalCylinder={context.HasMatchingRadiusVerticalCylindricalSourceFace}, hasLargerRadiusVerticalCylinder={context.HasLargerRadiusVerticalCylindricalSourceFace}, supported={context.IsCylindricalTerminationSupported})",
TieBreakerPriority: 2),
new JudgmentCandidate<BrepBoundedFilletContext>(
Name: RejectCandidate,
@@ -103,7 +103,7 @@ public static class BrepBoundedFillet
{
if (context.SelectionCount == 2 && context.HasLocalChainedInteraction && context.HasCylindricalSourceFaces)
{
- return $"chained_same_radius_fillet_with_cylindrical_termination: requires supported chained same-radius cylindrical-context termination context (hasMatchingRadiusVerticalCylinder={context.HasMatchingRadiusVerticalCylindricalSourceFace}, supported={context.IsCylindricalTerminationSupported}).";
+ return $"chained_same_radius_fillet_with_cylindrical_termination: requires supported chained same-radius cylindrical-context termination context (hasMatchingRadiusVerticalCylinder={context.HasMatchingRadiusVerticalCylindricalSourceFace}, hasLargerRadiusVerticalCylinder={context.HasLargerRadiusVerticalCylindricalSourceFace}, supported={context.IsCylindricalTerminationSupported}).";
}
return "No bounded single-edge/chained fillet candidate was admissible.";
@@ -118,7 +118,8 @@ public static class BrepBoundedFillet
"firmament.fillet-bounded")]);
}
- if (!TryApplyCornerFillets(loop, context.Selection.Corners, context.Radius, out var filletedLoop, out var filletFailure))
+ var verticalCylinders = GetVerticalCylindricalFaceSignatures(sourceBody);
+ if (!TryApplyCornerFillets(loop, context.Selection.Corners, context.Radius, verticalCylinders, out var filletedLoop, out var filletFailure))
{
return KernelResult<BrepBody>.Failure([Failure(
$"Bounded fillet local builder could not construct the selected internal-edge cylindrical cut chain: {filletFailure}",
@@ -129,7 +130,6 @@ public static class BrepBoundedFillet
filletedLoop,
context.Selection.MinZ,
context.Selection.MaxZ,
- context.Radius,
sourceBody.SafeBooleanComposition);
}
@@ -137,7 +137,6 @@ public static class BrepBoundedFillet
IReadOnlyList<LoopSegment2D> segments,
double minZ,
double maxZ,
- double radius,
SafeBooleanComposition? safeBooleanComposition)
{
var height = maxZ - minZ;
@@ -227,13 +226,14 @@ public static class BrepBoundedFillet
var centerTop = new Point3D(segment.Center!.Value.X, segment.Center.Value.Y, maxZ);
var startVector = new Vector3D(segment.Start.X - segment.Center.Value.X, segment.Start.Y - segment.Center.Value.Y, 0d);
var referenceAxis = Direction3D.Create(startVector);
+ var segmentRadius = System.Math.Sqrt(startVector.X * startVector.X + startVector.Y * startVector.Y);
var (startAngle, endAngle) = ComputeArcParameterRange(segment.Center.Value, segment.Start, segment.End, segment.IsClockwise);
- geometry.AddCurve(new CurveGeometryId(curveId), CurveGeometry.FromCircle(new Circle3Curve(centerBottom, zAxis, radius, referenceAxis)));
+ geometry.AddCurve(new CurveGeometryId(curveId), CurveGeometry.FromCircle(new Circle3Curve(centerBottom, zAxis, segmentRadius, referenceAxis)));
bindings.AddEdgeBinding(new EdgeGeometryBinding(bottomEdge, new CurveGeometryId(curveId), new ParameterInterval(startAngle, endAngle)));
curveId++;
- geometry.AddCurve(new CurveGeometryId(curveId), CurveGeometry.FromCircle(new Circle3Curve(centerTop, zAxis, radius, referenceAxis)));
+ geometry.AddCurve(new CurveGeometryId(curveId), CurveGeometry.FromCircle(new Circle3Curve(centerTop, zAxis, segmentRadius, referenceAxis)));
bindings.AddEdgeBinding(new EdgeGeometryBinding(topEdge, new CurveGeometryId(curveId), new ParameterInterval(startAngle, endAngle)));
curveId++;
}
@@ -263,7 +263,8 @@ public static class BrepBoundedFillet
var center = segment.Center!.Value;
var origin = new Point3D(center.X, center.Y, minZ);
var referenceAxis = Direction3D.Create(new Vector3D(segment.Start.X - center.X, segment.Start.Y - center.Y, 0d));
- geometry.AddSurface(new SurfaceGeometryId(surfaceId), SurfaceGeometry.FromCylinder(new CylinderSurface(origin, zAxis, radius, referenceAxis)));
+ var segmentRadius = System.Math.Sqrt((segment.Start.X - center.X) * (segment.Start.X - center.X) + (segment.Start.Y - center.Y) * (segment.Start.Y - center.Y));
+ geometry.AddSurface(new SurfaceGeometryId(surfaceId), SurfaceGeometry.FromCylinder(new CylinderSurface(origin, zAxis, segmentRadius, referenceAxis)));
}
bindings.AddFaceBinding(new FaceGeometryBinding(sideFaces[i], new SurfaceGeometryId(surfaceId)));
@@ -316,6 +317,7 @@ public static class BrepBoundedFillet
IReadOnlyList<(double X, double Y)> loop,
IReadOnlyList<BoundedManufacturingFilletCornerSelection> corners,
double radius,
+ IReadOnlyList<VerticalCylinderSignature> verticalCylinders,
out List<LoopSegment2D> filletedLoop,
out string failure)
{
@@ -331,6 +333,7 @@ public static class BrepBoundedFillet
var signedArea = ComputeSignedArea(loop);
var isCounterClockwise = signedArea > 0d;
var cornerDataByIndex = new Dictionary<int, ((double X, double Y) CutA, (double X, double Y) CutB, (double X, double Y) Center)>();
+ var preservedLargerRadiusCornerCount = 0;
foreach (var cornerSelection in corners)
{
var cornerIndices = Enumerable.Range(0, loop.Count)
@@ -365,19 +368,43 @@ public static class BrepBoundedFillet
var incomingLength = System.Math.Sqrt(incoming.X * incoming.X + incoming.Y * incoming.Y);
var outgoingLength = System.Math.Sqrt(outgoing.X * outgoing.X + outgoing.Y * outgoing.Y);
- if (radius >= incomingLength || radius >= outgoingLength)
+ var incomingUnit = (X: incoming.X / incomingLength, Y: incoming.Y / incomingLength);
+ var outgoingUnit = (X: outgoing.X / outgoingLength, Y: outgoing.Y / outgoingLength);
+ var effectiveRadius = radius;
+ var largerRadiusTermination = TryResolveLargerRadiusTermination(
+ corner,
+ incomingUnit,
+ outgoingUnit,
+ incomingLength,
+ outgoingLength,
+ radius,
+ verticalCylinders,
+ out var largerRadius);
+ if (largerRadiusTermination)
+ {
+ effectiveRadius = largerRadius;
+ preservedLargerRadiusCornerCount++;
+ }
+
+ if (effectiveRadius >= incomingLength || effectiveRadius >= outgoingLength)
{
failure = "radius exceeds one of the local orthogonal edge spans";
return false;
}
- var cutA = (corner.X + incoming.X / incomingLength * radius, corner.Y + incoming.Y / incomingLength * radius);
- var cutB = (corner.X + outgoing.X / outgoingLength * radius, corner.Y + outgoing.Y / outgoingLength * radius);
- var center = (corner.X + incoming.X / incomingLength * radius + outgoing.X / outgoingLength * radius,
- corner.Y + incoming.Y / incomingLength * radius + outgoing.Y / outgoingLength * radius);
+ var cutA = (corner.X + incomingUnit.X * effectiveRadius, corner.Y + incomingUnit.Y * effectiveRadius);
+ var cutB = (corner.X + outgoingUnit.X * effectiveRadius, corner.Y + outgoingUnit.Y * effectiveRadius);
+ var center = (corner.X + incomingUnit.X * effectiveRadius + outgoingUnit.X * effectiveRadius,
+ corner.Y + incomingUnit.Y * effectiveRadius + outgoingUnit.Y * effectiveRadius);
cornerDataByIndex[indexToFillet] = (cutA, cutB, center);
}
+ if (preservedLargerRadiusCornerCount > 1)
+ {
+ failure = "cross-radius chained cylindrical termination supports at most one larger-radius cylindrical anchor corner";
+ return false;
+ }
+
foreach (var index in cornerDataByIndex.Keys)
{
var nextIndex = (index + 1) % loop.Count;
@@ -601,6 +628,65 @@ public static class BrepBoundedFillet
private static bool NearlyEqual(double a, double b)
=> System.Math.Abs(a - b) <= 1e-9;
+ private static IReadOnlyList<VerticalCylinderSignature> GetVerticalCylindricalFaceSignatures(BrepBody body)
+ {
+ var cylinders = new List<VerticalCylinderSignature>();
+ foreach (var binding in body.Bindings.FaceBindings)
+ {
+ if (!body.Geometry.TryGetSurface(binding.SurfaceGeometryId, out var surface) || surface is null || surface.Kind != SurfaceGeometryKind.Cylinder || surface.Cylinder is null)
+ {
+ continue;
+ }
+
+ var cylinder = surface.Cylinder.Value;
+ if (!NearlyEqual(cylinder.Axis.X, 0d)
+ || !NearlyEqual(cylinder.Axis.Y, 0d)
+ || !NearlyEqual(System.Math.Abs(cylinder.Axis.Z), 1d))
+ {
+ continue;
+ }
+
+ cylinders.Add(new VerticalCylinderSignature(cylinder.Origin.X, cylinder.Origin.Y, cylinder.Radius));
+ }
+
+ return cylinders;
+ }
+
+ private static bool TryResolveLargerRadiusTermination(
+ (double X, double Y) corner,
+ (double X, double Y) incomingUnit,
+ (double X, double Y) outgoingUnit,
+ double incomingLength,
+ double outgoingLength,
+ double baseRadius,
+ IReadOnlyList<VerticalCylinderSignature> verticalCylinders,
+ out double largerRadius)
+ {
+ largerRadius = 0d;
+ foreach (var cylinder in verticalCylinders)
+ {
+ if (!double.IsFinite(cylinder.Radius) || cylinder.Radius <= baseRadius + 1e-9)
+ {
+ continue;
+ }
+
+ if (cylinder.Radius >= incomingLength || cylinder.Radius >= outgoingLength)
+ {
+ continue;
+ }
+
+ var centerX = corner.X + incomingUnit.X * cylinder.Radius + outgoingUnit.X * cylinder.Radius;
+ var centerY = corner.Y + incomingUnit.Y * cylinder.Radius + outgoingUnit.Y * cylinder.Radius;
+ if (NearlyEqual(centerX, cylinder.CenterX) && NearlyEqual(centerY, cylinder.CenterY))
+ {
+ largerRadius = cylinder.Radius;
+ return true;
+ }
+ }
+
+ return false;
+ }
+
private static FaceId AddFaceWithLoop(TopologyBuilder builder, IReadOnlyList<EdgeUse> edgeUses)
{
var loopId = builder.AllocateLoopId();
@@ -651,6 +737,8 @@ public static class BrepBoundedFillet
public static LoopSegment2D Arc((double X, double Y) start, (double X, double Y) end, (double X, double Y) center, bool isClockwise)
=> new(LoopSegmentKind.Arc, start, end, center, isClockwise, 0.5d * double.Pi * System.Math.Sqrt((start.X - center.X) * (start.X - center.X) + (start.Y - center.Y) * (start.Y - center.Y)));
}
+
+ private readonly record struct VerticalCylinderSignature(double CenterX, double CenterY, double Radius);
}
internal readonly record struct BrepBoundedFilletContext(
@@ -660,6 +748,7 @@ internal readonly record struct BrepBoundedFilletContext(
bool IsPlanarPlanar,
bool HasCylindricalSourceFaces,
bool HasMatchingRadiusVerticalCylindricalSourceFace,
+ bool HasLargerRadiusVerticalCylindricalSourceFace,
bool IsCylindricalTerminationSupported,
bool IsInternalConcave,
bool IsBoundedRadius,
@@ -704,11 +793,25 @@ internal readonly record struct BrepBoundedFilletContext(
&& NearlyEqual(cylinder.Axis.Y, 0d)
&& NearlyEqual(System.Math.Abs(cylinder.Axis.Z), 1d);
});
+ var hasLargerRadiusVerticalCylinder = sourceBody.Bindings.FaceBindings.Any(binding =>
+ {
+ var surface = sourceBody.Geometry.GetSurface(binding.SurfaceGeometryId);
+ if (surface.Kind != SurfaceGeometryKind.Cylinder || surface.Cylinder is null)
+ {
+ return false;
+ }
+
+ var cylinder = surface.Cylinder.Value;
+ return cylinder.Radius > radius + 1e-9
+ && NearlyEqual(cylinder.Axis.X, 0d)
+ && NearlyEqual(cylinder.Axis.Y, 0d)
+ && NearlyEqual(System.Math.Abs(cylinder.Axis.Z), 1d);
+ });
var bounded = radius < selection.MaxAllowedRadius;
var cylindricalTerminationSupported =
selection.Corners.Count == 2
&& selection.HasLocalInteraction
- && hasMatchingRadiusVerticalCylinder
+ && (hasMatchingRadiusVerticalCylinder || hasLargerRadiusVerticalCylinder)
&& bounded;
return KernelResult<BrepBoundedFilletContext>.Success(new BrepBoundedFilletContext(
IsTrustedSource: true,
@@ -717,6 +820,7 @@ internal readonly record struct BrepBoundedFilletContext(
IsPlanarPlanar: planar,
HasCylindricalSourceFaces: hasCylindricalFaces,
HasMatchingRadiusVerticalCylindricalSourceFace: hasMatchingRadiusVerticalCylinder,
+ HasLargerRadiusVerticalCylindricalSourceFace: hasLargerRadiusVerticalCylinder,
IsCylindricalTerminationSupported: cylindricalTerminationSupported,
IsInternalConcave: true,
IsBoundedRadius: bounded,
diff --git a/Aetheris.Kernel.Firmament.Tests/FirmamentPrimitiveExecutionTests.cs b/Aetheris.Kernel.Firmament.Tests/FirmamentPrimitiveExecutionTests.cs
index 4990a571..a49fc7a2 100644
--- a/Aetheris.Kernel.Firmament.Tests/FirmamentPrimitiveExecutionTests.cs
+++ b/Aetheris.Kernel.Firmament.Tests/FirmamentPrimitiveExecutionTests.cs
@@ -539,6 +539,37 @@ public sealed class FirmamentPrimitiveExecutionTests
&& diagnostic.Message.Contains("hasMatchingRadiusVerticalCylinder=False", StringComparison.Ordinal));
}
+ [Fact]
+ public void Compile_Executes_BoundedFillet_ChainedCylindricalTermination_ForCrossRadiusFollowOnPair()
+ {
+ var result = CompileFixture("testdata/firmament/fixtures/m5b-valid-fillet-chained-cross-radius-cylindrical-termination.firmament");
+
+ Assert.True(result.Compilation.IsSuccess, string.Join(Environment.NewLine, result.Compilation.Diagnostics.Select(d => d.Message)));
+ var execution = result.Compilation.Value.PrimitiveExecutionResult!;
+ var second = Assert.Single(execution.ExecutedBooleans, executed => executed.FeatureId == "chained_cross_radius_termination");
+ var cylinderRadii = second.Body.Bindings.FaceBindings
+ .Select(face => second.Body.Geometry.GetSurface(face.SurfaceGeometryId))
+ .Where(surface => surface.Kind == Aetheris.Kernel.Core.Geometry.SurfaceGeometryKind.Cylinder && surface.Cylinder is not null)
+ .Select(surface => surface.Cylinder!.Value.Radius)
+ .DistinctBy(value => System.Math.Round(value, 6))
+ .ToArray();
+ Assert.Contains(cylinderRadii, value => System.Math.Abs(value - 0.2d) <= 1e-6);
+ Assert.Contains(cylinderRadii, value => System.Math.Abs(value - 0.3d) <= 1e-6);
+ }
+
+ [Fact]
+ public void Compile_Rejects_BoundedFillet_ChainedCylindricalTermination_Attempt_WhenAnchorRadiusIsSmaller()
+ {
+ var result = CompileFixture("testdata/firmament/fixtures/m5b-invalid-fillet-chained-cross-radius-cylindrical-termination-smaller-anchor.firmament");
+
+ Assert.False(result.Compilation.IsSuccess);
+ Assert.Contains(result.Compilation.Diagnostics, diagnostic =>
+ diagnostic.Source == "firmament.fillet-bounded"
+ && diagnostic.Message.Contains("chained_same_radius_fillet_with_cylindrical_termination", StringComparison.Ordinal)
+ && diagnostic.Message.Contains("hasMatchingRadiusVerticalCylinder=False", StringComparison.Ordinal)
+ && diagnostic.Message.Contains("hasLargerRadiusVerticalCylinder=False", StringComparison.Ordinal));
+ }
+
[Fact]
public void Compile_Mixed_Document_With_Unsupported_Boolean_Fails_Before_Publishing_Success_Artifact()
{
diff --git a/testdata/firmament/fixtures/m5b-invalid-fillet-chained-cross-radius-cylindrical-termination-smaller-anchor.firmament b/testdata/firmament/fixtures/m5b-invalid-fillet-chained-cross-radius-cylindrical-termination-smaller-anchor.firmament
new file mode 100644
index 00000000..4f78722b
--- /dev/null
+++ b/testdata/firmament/fixtures/m5b-invalid-fillet-chained-cross-radius-cylindrical-termination-smaller-anchor.firmament
@@ -0,0 +1,62 @@
+firmament:
+ version: 1
+
+model:
+ name: m5b_invalid_fillet_chained_cross_radius_cylindrical_termination_smaller_anchor
+ units: mm
+
+ops[5]:
+ -
+ op: box
+ id: base
+ size[3]:
+ 12
+ 4
+ 10
+ -
+ op: add
+ id: mid
+ to: base
+ with:
+ op: box
+ size[3]:
+ 6
+ 2
+ 10
+ place:
+ on: origin
+ offset[3]:
+ 0
+ 2
+ 0
+ -
+ op: add
+ id: croot
+ to: mid
+ with:
+ op: box
+ size[3]:
+ 12
+ 2
+ 10
+ place:
+ on: origin
+ offset[3]:
+ 0
+ 4
+ 0
+ -
+ op: fillet
+ id: first_smaller_fillet
+ from: croot
+ edges[1]:
+ inner_x_min_y_min
+ radius: 0.2
+ -
+ op: fillet
+ id: chained_cross_radius_attempt
+ from: first_smaller_fillet
+ edges[2]:
+ inner_x_min_y_min
+ inner_x_min_y_max
+ radius: 0.4
diff --git a/testdata/firmament/fixtures/m5b-valid-fillet-chained-cross-radius-cylindrical-termination.firmament b/testdata/firmament/fixtures/m5b-valid-fillet-chained-cross-radius-cylindrical-termination.firmament
new file mode 100644
index 00000000..214d5b55
--- /dev/null
+++ b/testdata/firmament/fixtures/m5b-valid-fillet-chained-cross-radius-cylindrical-termination.firmament
@@ -0,0 +1,62 @@
+firmament:
+ version: 1
+
+model:
+ name: m5b_valid_fillet_chained_cross_radius_cylindrical_termination
+ units: mm
+
+ops[5]:
+ -
+ op: box
+ id: base
+ size[3]:
+ 12
+ 4
+ 10
+ -
+ op: add
+ id: mid
+ to: base
+ with:
+ op: box
+ size[3]:
+ 6
+ 2
+ 10
+ place:
+ on: origin
+ offset[3]:
+ 0
+ 2
+ 0
+ -
+ op: add
+ id: croot
+ to: mid
+ with:
+ op: box
+ size[3]:
+ 12
+ 2
+ 10
+ place:
+ on: origin
+ offset[3]:
+ 0
+ 4
+ 0
+ -
+ op: fillet
+ id: first_larger_fillet
+ from: croot
+ edges[1]:
+ inner_x_min_y_min
+ radius: 0.3
+ -
+ op: fillet
+ id: chained_cross_radius_termination
+ from: first_larger_fillet
+ edges[2]:
+ inner_x_min_y_min
+ inner_x_min_y_max
+ radius: 0.2