plates.ts 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. export interface PlateFilament {
  2. slot_id: number;
  3. type: string;
  4. color: string;
  5. used_grams: number;
  6. used_meters: number;
  7. // True when this AMS slot is consumed by the picked plate. False
  8. // means the slot is configured project-wide but the picked plate
  9. // doesn't paint with it. Sliced 3MFs (.gcode.3mf) report only used
  10. // filaments — the field is true for every entry. Unsliced project
  11. // files report ALL project slots; SliceModal disables the unused
  12. // rows so the user only interacts with the dropdowns that matter,
  13. // while the backend still passes the complete list to the slicer
  14. // CLI to prevent silent fallback to embedded defaults.
  15. used_in_plate?: boolean;
  16. }
  17. export interface PlateMetadata {
  18. index: number;
  19. name: string | null;
  20. objects: string[];
  21. object_count?: number;
  22. has_thumbnail: boolean;
  23. thumbnail_url: string | null;
  24. print_time_seconds: number | null;
  25. filament_used_grams: number | null;
  26. filaments: PlateFilament[];
  27. }
  28. export interface ArchivePlatesResponse {
  29. archive_id: number;
  30. filename: string;
  31. plates: PlateMetadata[];
  32. is_multi_plate: boolean;
  33. has_gcode?: boolean;
  34. }
  35. export interface LibraryFilePlatesResponse {
  36. file_id: number;
  37. filename: string;
  38. plates: PlateMetadata[];
  39. is_multi_plate: boolean;
  40. }
  41. export interface ViewerPlateSelectionState {
  42. selected_plate_id: number | null;
  43. }
  44. export interface PlateAssignment {
  45. object_id: string;
  46. plate_id: number | null;
  47. }