This commit is contained in:
parent
7959fe85cc
commit
b9485e4097
32 changed files with 4692 additions and 65 deletions
|
|
@ -221,13 +221,13 @@ describe('skirting cutting plan', () => {
|
|||
expect(failures.every((issue) => issue.roomId === invalid.id)).toBe(true);
|
||||
});
|
||||
|
||||
it('lets reused tails set wall joints while counting preparation and coping operations', () => {
|
||||
it('prefers one fewer saw pass over saving a stock board on a square room', () => {
|
||||
const room = rectangle(4000, 4000);
|
||||
const plan = planSkirting([room], settings, 5);
|
||||
expect(plan).toEqual(planSkirting([room], settings, 5));
|
||||
expect(plan.stockCount).toBe(7); // Fixed joints used eight lengths for this simple square.
|
||||
expect(plan.cuts).toBe(13);
|
||||
expect(plan.waste).toBeCloseTo(7 * 2400 - 16000);
|
||||
expect(plan.stockCount).toBe(8); // Seven boards require thirteen preparation/coping passes.
|
||||
expect(plan.cuts).toBe(12);
|
||||
expect(plan.waste).toBeCloseTo(8 * 2400 - 16000);
|
||||
for (let wallIndex = 0; wallIndex < 4; wallIndex++) {
|
||||
const pieces = plan.pieces.filter((piece) => piece.wallIndex === wallIndex);
|
||||
expect(pieces.reduce((sum, piece) => sum + piece.backLength, 0)).toBeCloseTo(4000);
|
||||
|
|
|
|||
Loading…
Reference in a new issue