From 3b9f5ca5fa05421fbbed09d6a62feba892788720 Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Wed, 30 Sep 2026 21:46:29 -0400 Subject: [PATCH] test: remove customer drawing names from tests GeometrySimplifierTests hardcoded a customer DXF on one user's desktop and returned early when it was missing, so the test passed without running anywhere else. Read the path from the optional "SimplifierGapDxfPath" entry in test-config.json and report a skip when it is not configured, matching the other external-fixture tests. Replace the customer part name in a RemnantFinderTests comment with a neutral description. Customer drawings stay outside the repository. --- OpenNest.Tests/Fill/RemnantFinderTests.cs | 2 +- OpenNest.Tests/Geometry/GeometrySimplifierTests.cs | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/OpenNest.Tests/Fill/RemnantFinderTests.cs b/OpenNest.Tests/Fill/RemnantFinderTests.cs index 4f137a9..0f88d87 100644 --- a/OpenNest.Tests/Fill/RemnantFinderTests.cs +++ b/OpenNest.Tests/Fill/RemnantFinderTests.cs @@ -326,7 +326,7 @@ public class RemnantFinderTests [Fact] public void DensePack_FindsGapAtTop() { - // Reproduce real plate: 120x60, 68 parts of SULLYS-004. + // Reproduce a real plate: 120x60 with 68 copies of one production part. // Main grid tops out at y=53.14 (obstacle). Two rotated parts on the // right extend to y=58.49 but only at x > 106. The gap at x < 106 // from y=53.14 to y=59.8 is ~106 x 6.66 — should be found. diff --git a/OpenNest.Tests/Geometry/GeometrySimplifierTests.cs b/OpenNest.Tests/Geometry/GeometrySimplifierTests.cs index 4caac48..5c45510 100644 --- a/OpenNest.Tests/Geometry/GeometrySimplifierTests.cs +++ b/OpenNest.Tests/Geometry/GeometrySimplifierTests.cs @@ -1,4 +1,3 @@ -using System.IO; using System.Linq; using OpenNest.Geometry; using OpenNest.IO; @@ -386,12 +385,15 @@ public class GeometrySimplifierTests return System.Math.Acos(dot) * 180.0 / System.Math.PI; } - [Fact] - public void Apply_DynaPanDxf_NoGapsAfterSimplification() + /// + /// Optional real-drawing check. The DXF stays outside the repository; set + /// "SimplifierGapDxfPath" in OpenNest.Tests/test-config.json to run it. + /// + [SkippableFact] + public void Apply_RealDxf_NoGapsAfterSimplification() { - var path = @"C:\Users\aisaacs\Desktop\Sullys Q29 DXFs\SULLYS-031 Dyna Pan.dxf"; - if (!File.Exists(path)) - return; // skip if file not available + var path = TestConfig.GetExistingPath("SimplifierGapDxfPath"); + Skip.If(path == null, "SimplifierGapDxfPath not configured in test-config.json or file not found"); var result = Dxf.Import(path); var shapes = ShapeBuilder.GetShapes(result.Entities);