mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-12-04 01:59:25 -05:00
feat(cutting): tab parts by width when the plate has no support bed
With support tabs on and no support bed, nothing was tabbed and nothing said so. A new no-bed width range (NoBedTabMinWidth..NoBedTabMaxWidth, the short side of the part's minimum-area bounding rectangle) now picks the parts to tab instead. SupportTabSettings.Analyze makes the choice for Plan Cutting, hand-placed lead-ins and the pre-post review; without a bed any tab clear of inside corners counts. With no bed and no range, the plan notes that nothing was tabbed. Cutting Settings > Tabs gains the range fields, and the values persist with the cutting parameters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
07499fe1cd
commit
479883e7ac
18 files changed
+500
-52
No files matched your search
@@ -141,4 +141,18 @@ public class SupportGridPersistenceTests
|
||||
|
||||
Assert.True(restored.SupportTabs);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void NoBedTabRangeRoundTripsInCuttingParameters()
|
||||
{
|
||||
var parameters = new CuttingParameters { SupportTabs = true, NoBedTabMinWidth = 0.5, NoBedTabMaxWidth = 4 };
|
||||
|
||||
var restored = CuttingParametersSerializer.Deserialize(CuttingParametersSerializer.Serialize(parameters));
|
||||
var snapshot = CuttingParametersSerializer.FromDto(CuttingParametersSerializer.ToDto(parameters));
|
||||
|
||||
Assert.Equal(0.5, restored.NoBedTabMinWidth);
|
||||
Assert.Equal(4, restored.NoBedTabMaxWidth);
|
||||
Assert.Equal(4, snapshot.NoBedTabMaxWidth);
|
||||
Assert.Equal(0, CuttingParametersSerializer.Deserialize("{}").NoBedTabMaxWidth);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user