style: apply CSharpier formatting to all C# sources
Repo-wide sweep with the pinned CSharpier 1.3.0 tool. Whitespace and line-wrapping only; OpenNest.Engine.Tests (109) and OpenNest.IO.Tests pass after reformat, full solution builds 0 errors. Added .csharpierignore so csproj/config XML keeps its existing layout (CSharpier's XML wrapping churns attributes with zero benefit). Formatting is now enforceable: dotnet csharpier check . passes.
This commit is contained in:
@@ -9,7 +9,12 @@ public class SplitIntegrationTest
|
||||
[Fact]
|
||||
public void Split_SpikeGroove_NoContinuityGaps()
|
||||
{
|
||||
var drawing = new RectangleShape { Name = "TEST", Length = 100, Width = 50 }.GetDrawing();
|
||||
var drawing = new RectangleShape
|
||||
{
|
||||
Name = "TEST",
|
||||
Length = 100,
|
||||
Width = 50,
|
||||
}.GetDrawing();
|
||||
|
||||
var sl = new SplitLine(50.0, CutOffAxis.Vertical);
|
||||
sl.FeaturePositions.Add(12.5);
|
||||
@@ -22,7 +27,7 @@ public class SplitIntegrationTest
|
||||
SpikeDepth = 0.75,
|
||||
SpikeWeldGap = 0.125,
|
||||
SpikeAngle = 45,
|
||||
SpikePairCount = 2
|
||||
SpikePairCount = 2,
|
||||
};
|
||||
|
||||
var results = DrawingSplitter.Split(drawing, new List<SplitLine> { sl }, parameters);
|
||||
@@ -31,8 +36,10 @@ public class SplitIntegrationTest
|
||||
foreach (var piece in results)
|
||||
{
|
||||
// Get cut entities only (no rapids)
|
||||
var pieceEntities = ConvertProgram.ToGeometry(piece.Program)
|
||||
.Where(e => e.Layer != SpecialLayers.Rapid).ToList();
|
||||
var pieceEntities = ConvertProgram
|
||||
.ToGeometry(piece.Program)
|
||||
.Where(e => e.Layer != SpecialLayers.Rapid)
|
||||
.ToList();
|
||||
|
||||
// Check that consecutive entity endpoints connect (no gaps)
|
||||
for (var i = 0; i < pieceEntities.Count - 1; i++)
|
||||
@@ -40,8 +47,10 @@ public class SplitIntegrationTest
|
||||
var end = GetEndPoint(pieceEntities[i]);
|
||||
var start = GetStartPoint(pieceEntities[i + 1]);
|
||||
var gap = end.DistanceTo(start);
|
||||
Assert.True(gap < 0.01,
|
||||
$"Gap of {gap:F6} between entities {i} and {i + 1} in {piece.Name}");
|
||||
Assert.True(
|
||||
gap < 0.01,
|
||||
$"Gap of {gap:F6} between entities {i} and {i + 1} in {piece.Name}"
|
||||
);
|
||||
}
|
||||
|
||||
// Area should be non-zero
|
||||
@@ -52,7 +61,12 @@ public class SplitIntegrationTest
|
||||
[Fact]
|
||||
public void Split_SpikeGroove_Horizontal_NoContinuityGaps()
|
||||
{
|
||||
var drawing = new RectangleShape { Name = "TEST", Length = 100, Width = 50 }.GetDrawing();
|
||||
var drawing = new RectangleShape
|
||||
{
|
||||
Name = "TEST",
|
||||
Length = 100,
|
||||
Width = 50,
|
||||
}.GetDrawing();
|
||||
|
||||
var sl = new SplitLine(25.0, CutOffAxis.Horizontal);
|
||||
sl.FeaturePositions.Add(25.0);
|
||||
@@ -65,7 +79,7 @@ public class SplitIntegrationTest
|
||||
SpikeDepth = 0.75,
|
||||
SpikeWeldGap = 0.125,
|
||||
SpikeAngle = 45,
|
||||
SpikePairCount = 2
|
||||
SpikePairCount = 2,
|
||||
};
|
||||
|
||||
var results = DrawingSplitter.Split(drawing, new List<SplitLine> { sl }, parameters);
|
||||
@@ -73,16 +87,20 @@ public class SplitIntegrationTest
|
||||
|
||||
foreach (var piece in results)
|
||||
{
|
||||
var pieceEntities = ConvertProgram.ToGeometry(piece.Program)
|
||||
.Where(e => e.Layer != SpecialLayers.Rapid).ToList();
|
||||
var pieceEntities = ConvertProgram
|
||||
.ToGeometry(piece.Program)
|
||||
.Where(e => e.Layer != SpecialLayers.Rapid)
|
||||
.ToList();
|
||||
|
||||
for (var i = 0; i < pieceEntities.Count - 1; i++)
|
||||
{
|
||||
var end = GetEndPoint(pieceEntities[i]);
|
||||
var start = GetStartPoint(pieceEntities[i + 1]);
|
||||
var gap = end.DistanceTo(start);
|
||||
Assert.True(gap < 0.01,
|
||||
$"Gap of {gap:F6} between entities {i} and {i + 1} in {piece.Name}");
|
||||
Assert.True(
|
||||
gap < 0.01,
|
||||
$"Gap of {gap:F6} between entities {i} and {i + 1} in {piece.Name}"
|
||||
);
|
||||
}
|
||||
|
||||
Assert.True(piece.Area > 0, $"{piece.Name} has zero area");
|
||||
@@ -95,7 +113,7 @@ public class SplitIntegrationTest
|
||||
{
|
||||
Line l => l.StartPoint,
|
||||
Arc a => a.StartPoint(),
|
||||
_ => new Vector(0, 0)
|
||||
_ => new Vector(0, 0),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -105,7 +123,7 @@ public class SplitIntegrationTest
|
||||
{
|
||||
Line l => l.EndPoint,
|
||||
Arc a => a.EndPoint(),
|
||||
_ => new Vector(0, 0)
|
||||
_ => new Vector(0, 0),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user