From 74515960470d8def1f08838c60d0cdebb20332a6 Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Sun, 4 Oct 2026 20:07:52 -0400 Subject: [PATCH] test(cutouts): keep the repeated-call determinism test, skipped on the open Fill defect Restore RepeatedCallsReturnIdenticalPoses for a 1 x 1 square and a 1.5 x 0.75 rectangle. Both cases fail intermittently because Default Fill can return different, equally scored lattices for identical calls (Project Memory opennest c98c21bd), so they are skipped with that reason until the defect is fixed rather than removed. --- .../Jobs/Cutouts/CutoutLatticeFillTests.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/OpenNest.Engine.Tests/Jobs/Cutouts/CutoutLatticeFillTests.cs b/OpenNest.Engine.Tests/Jobs/Cutouts/CutoutLatticeFillTests.cs index 3d37bec..ab9f616 100644 --- a/OpenNest.Engine.Tests/Jobs/Cutouts/CutoutLatticeFillTests.cs +++ b/OpenNest.Engine.Tests/Jobs/Cutouts/CutoutLatticeFillTests.cs @@ -53,6 +53,23 @@ public class CutoutLatticeFillTests AssertValidLayout(Ring(), Squares(1, 5), poses); } + // Both cases fail intermittently; unskip when Project Memory opennest issue c98c21bd is fixed. + private const string FillNondeterminism = "Open defect (Project Memory opennest c98c21bd): Default Fill can " + + "return different, equally scored lattices between identical calls."; + + [Theory] + [InlineData(1.0, 1.0, Skip = FillNondeterminism)] + [InlineData(1.5, 0.75, Skip = FillNondeterminism)] + public void RepeatedCallsReturnIdenticalPoses(double length, double width) + { + var part = JobBuilder.Part("part", TestShapes.Rectangle(length, width), 100); + + var first = CutoutLatticeFill.Fill(Ring(), 0, part, 100, Spacing); + var second = CutoutLatticeFill.Fill(Ring(), 0, part, 100, Spacing); + + Assert.Equal(first, second); + } + /// Places the ring 1" in from the sheet corner, moves the copies with it and runs /// the production layout check over the whole sheet. private static void AssertValidLayout(NestJobPart frame, NestJobPart insert, IReadOnlyList poses)