Files
BoxGenerator/src/types.ts
Халимов Рустам e7d153ce6b Try add perforation
2026-01-12 00:03:24 +03:00

50 lines
1.0 KiB
TypeScript

export interface DrawerDimensions {
width: number;
depth: number;
height: number;
}
export type PerforationPattern = 'circle' | 'hexagon' | 'triangle';
export interface PerforationConfig {
enabled: boolean;
pattern: PerforationPattern;
diameter: number; // Размер отверстия
spacing: number; // Расстояние между центрами (шаг)
}
export interface AppConfig {
drawer: DrawerDimensions;
wallThickness: number;
printerTolerance: number;
cornerRadius: number;
perforation: PerforationConfig; // Новая секция
}
export interface Partition {
id: string;
axis: 'x' | 'y';
offset: number;
min: number;
max: number;
height: number;
rounded: boolean;
}
export interface LayoutSplits {
x: number[];
y: number[];
partitions: Record<string, Partition[]>;
}
export interface GeneratedPart {
id: string;
name: string;
width: number;
depth: number;
height: number;
x: number;
y: number;
color: string;
internalPartitions: Partition[];
}