mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-12-05 09:29:25 -05:00
fix(fill): refill clamp gaps when Ctrl+F fills one part
The copy tool's Ctrl+F fills through FillGroup, which only dropped the parts that hit a clamp. A single part now fills through FillItem, so it also takes the gaps those drops leave (N26-2J7: 194 -> 195 parts). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6a10f2a959
commit
5bc39be8ca
2 files changed
+21
No files matched your search
@@ -434,6 +434,21 @@ public class ClampZoneInteractiveFillTests
|
||||
Assert.Equal(58, parts.Count);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void SinglePartGroupFillTakesTheGapBesideTheClamps()
|
||||
{
|
||||
// The desktop's Ctrl+F fill passes the copied part as a group of one; it must refill
|
||||
// the gap the dropped clamp hits leave, as the item fill does.
|
||||
var plate = RailPlate(out var zones);
|
||||
var group = new List<Part> { new(RectDrawing(15, 7)) };
|
||||
|
||||
var parts = PlateFillService.FillGroup("Fill", plate, group, plate.WorkArea(),
|
||||
null, CancellationToken.None);
|
||||
|
||||
AssertClearOfClamps(parts, zones);
|
||||
Assert.Equal(58, parts.Count);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TheClampedRowLinesUpBetweenTheClamps()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user