This script optimizes the loading of parts into an oven by considering:
- Oven dimensions
- Part dimensions
- Part priorities
- Optional part rotation
- Reads configuration from a TOML file
- Attempts to place parts based on priority
- Supports optional part rotation
- Generates a visualization of the loading strategy
- Calculates oven area utilization
- Create a TOML configuration file (see
example_input.toml
) - Run the script:
python oven_loader.py
- Check the generated visualization at
oven_loading_visualization.png
[oven]
length = 40 # Oven length in inches
width = 32 # Oven width in inches
[settings]
allow_rotation = true # Allow 90-degree part rotation
boundary_offset_x = 1 # Inches from left and right boundaries
boundary_offset_y = 1 # Inches from top and bottom boundaries
part_spacing = 0.5 # Inches between parts
[[parts]]
name = "Part Name"
length = 12 # Part length in inches
width = 8 # Part width in inches
image_path = "/path/to/part/image.png" # Optional part image
[[part_priorities]]
name = "Part Name"
priority = 1 # Lower number = higher priority
- Separate configuration files for settings and loading schedule
- Oven dimensions and loading parameters in settings
- Part definitions with optional images
- Flexible priority and placement settings
## Dependencies
- toml
- numpy
- matplotlib
- shapely
## Output
- Console output showing oven area utilization
- Visualization image showing part placement