better
This commit is contained in:
parent
b9485e4097
commit
0c0f08b350
45 changed files with 1565 additions and 1579 deletions
|
|
@ -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,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue