Repository navigation
Expand file tree
/
Copy pathtypes.ts
More file actions
57 lines (48 loc) · 1.35 KB
/
Copy pathtypes.ts
File metadata and controls
57 lines (48 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
export interface Point {
x: number;
y: number;
}
export type RoomType = 'Living Room' | 'Kitchen' | 'Bedroom' | 'Bathroom' | 'Hallway' | 'Closet' | 'Dining Room' | 'Office' | 'Garage' | 'Balcony' | 'Entry' | 'Stairs';
export interface Door {
// A door is on a wall segment defined by two points from a room's polygon.
wallStart: Point;
wallEnd: Point;
}
export interface Window {
// A window is also on a wall segment.
wallStart: Point;
wallEnd: Point;
}
export type FurnitureType = 'sofa' | 'armchair' | 'bed' | 'dining_table' | 'chair' | 'kitchen_counter' | 'sink' | 'stove' | 'toilet' | 'bathtub' | 'shower' | 'wardrobe' | 'plant' | 'desk' | 'tv_stand' | 'fridge' | 'washing_machine' | 'rug';
export interface Furniture {
id: string;
type: FurnitureType;
position: Point; // Top-left corner before rotation
width: number;
height: number;
rotation: number; // Degrees, clockwise
}
export interface Room {
id:string;
name: string;
type: RoomType;
polygon: Point[];
labelPosition: Point;
doors: Door[];
windows: Window[];
furniture: Furniture[];
}
export interface FloorPlan {
totalWidth: number;
totalHeight: number;
wallThickness: number;
rooms: Room[];
}
export interface QuestionnaireAnswers {
style: string;
sqft: string;
bedrooms: string;
bathrooms: string;
stories: string;
features: string[];
}