This commit is contained in:
Andras Schmelczer 2026-09-11 22:14:24 +01:00
commit 0c0f08b350
45 changed files with 1565 additions and 1579 deletions

View file

@ -11,19 +11,31 @@ import { planSkirting } from '../src/lib/skirting';
import type { FlooringPiece, FlooringPlan } from '../src/lib/types';
function piece(id: string, stockId: string, changes: Partial<FlooringPiece> = {}): FlooringPiece {
const length = changes.length ?? 600;
const width = changes.width ?? 190;
return {
id,
roomId: 'room-1',
row: 1,
column: 1,
polygon: [],
length: 600,
width: 190,
length,
width,
blankLength: length,
blankWidth: width,
stockId,
reused: false,
cut: true,
shaped: false,
template: [],
template: [
{ x: 0, y: 0 },
{ x: length, y: 0 },
{ x: length, y: width },
{ x: 0, y: width },
],
factoryLeft: false,
factoryRight: false,
ripEdge: null,
...changes,
};
}