mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-10-02 19:22:12 -04:00
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.
This commit is contained in:
1 parent
0209a24008
commit
3b9f5ca5fa
2 files changed
+9
-7
No files matched your search
@@ -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.
|
||||
|
||||
@@ -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()
|
||||
/// <summary>
|
||||
/// Optional real-drawing check. The DXF stays outside the repository; set
|
||||
/// "SimplifierGapDxfPath" in OpenNest.Tests/test-config.json to run it.
|
||||
/// </summary>
|
||||
[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);
|
||||
|
||||
Reference in new issue
Block a user