mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-05-09 05:35:30 +02:00
[GH-ISSUE #342] [Feature]: Multi-Run Order / Batch Scheduling for Multi-Plate Files #217
Labels
No labels
A1
automated
automated
bug
bug
Closed due to inactivity
contrib
dependencies
dependencies
duplicate
enhancement
feedback
hold
invalid
Notes
P1S
pull-request
security
security
ThumbsUp
user-report
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/bambuddy#217
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cimdDev on GitHub (Feb 12, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/342
Originally assigned to: @maziggy on GitHub.
Problem or Use Case
Currently, when a sliced .gcode.3mf file contains multiple plates and different quantities are required per plate, each individual print run must be manually scheduled.
Example:
Plate 1 → 1x
Plate 2 → 2x
Plate 3 → 3x
The user must manually queue 6 separate print jobs and track completion and cost externally.
This becomes cumbersome and error-prone when:
In these scenarios, managing required quantities per plate quickly becomes untidy and difficult to track reliably.
Proposed Solution
Introduce an Order / Batch layer above individual print jobs.
An Order should:
Core Functionality
Alternatives Considered
Use Existing "Project" Feature
The existing Project concept already moves in a similar direction. It allows grouping multiple files, managing a duedate/timeline, and tracking associated bill of materials (e.g., screws, bearings, and other non-print components).
However, the Project feature currently operates at a higher organizational level and does not provide:
Projects are well suited for grouping files and maintaining a high-level overview of print counts. That works great for single plate jobs, but they do not solve the operational problem of:
Therefore, while Projects provide structural grouping and planning capabilities, they do not cover the production-level execution and accounting requirements for multi plates jobs described in this proposal.
This proposal complements the Project feature by introducing execution-level tracking rather than replacing it.
Feature Category
Print Queue & Scheduling
Priority
Would improve my workflow
Mockups or Examples
No response
Contribution
Checklist
@maziggy commented on GitHub (Feb 12, 2026):
Very good idea. Will definitely look into this, but I first have to finish some other tasks. I'll keep you updated.
@cimdDev commented on GitHub (Feb 12, 2026):
I don’t feel I currently have the skills or enough understanding of the codebase to implement this feature myself, but I’m happy to contribute on the conceptual side. Let me know how I can support.
@cimdDev commented on GitHub (Feb 12, 2026):
I am currently studying the codebase, especially the data model and database schema.
But first I’d like to validate my understanding of the current structure.
My current Understanding of Bambuddy’s Data Model is:
LibraryFile → stored file in the library (.3mf / .gcode / others)
PrintArchive → archived print record (created during/after a run)
PrintQueueItem → queued job pointing to either archive_id or library_file_id (+ optional plate_id)
Project → grouping layer to organize related prints (archives + queue items) plus planning features like due date, priority, notes, attachments, tags, BOM items, etc. (Project.archives, Project.queue_items, ProjectBOMItem, …)
For implementing proper multi-plate quantity tracking and production workflows, two structural pieces are missing:
An Order / Batch layer:
A canonical file identity:
Conceptually, I think the domain could be split into 4 layers:
Asset (the “what”)
Canonical .3mf/.gcode with extracted metadata (plates, materials, settings, etc.)
Plan (the “intent”)
An Order that defines required quantity per plate.
Dispatch (the “work items”)
Individual units that get queued and scheduled (reusing the existing queue logic).
Run (the “facts”)
What actually happened on the printer (essentially today’s PrintArchive).
This separation would make things clearer:
Does this direction make sense within Bambuddy’s architecture, or would you approach this differently?
This sounds like a fairly invasive change to the current structure and data model of Bambuddy. You have a clearer view of the overall design and propably might see a more direct or simpler way to achieve this.
Anyways, thanks for this awesome project.. And I’m happy to help wherever I can.
@maziggy commented on GitHub (Feb 19, 2026):
Took the time to think about it.
Your analysis of the current data model is spot on. I think the 4-layer conceptual breakdown (Asset/Plan/Dispatch/Run) is a useful way to think about it, but the good news is the existing model already covers 3 of those 4 layers — LibraryFile (Asset), PrintQueueItem (Dispatch), and PrintArchive (Run). So we really only need to add the missing "Plan/Order" layer without restructuring everything else.
The approach I'm thinking about is:
When you create a batch, the system generates the right number of PrintQueueItem rows per plate — then the existing scheduler, queue page, and printer workflow handle everything from there. Progress and cost are derived from the queue item/archive statuses, no duplication needed.
This keeps the change additive and let batches optionally sit inside Projects for higher-level organization.
@cimdDev commented on GitHub (Feb 20, 2026):
I’ve been thinking a bit more about how a batch/order workflow could look from a user perspective. These are just ideas and absolutely subject to change if better approaches emerge or you already have a clear vision for this.
One concept that might fit well is having a dedicated Batch / Order page where all orders are managed. An order would reference a single library file and show an overview of the plate configuration extracted from the 3MF. The order itself could contain header-level metadata such as name, due date, notes, optional project link, customer, etc.
Inside the order, each plate could then be composed into one or more configurations. Since the material slots and nozzle assignment are already defined in the library file metadata, the order would mainly define:
Example:
Each configuration could then have its own progress tracking (printed / failed / remaining), with running cost and estimated cost both per plate and aggregated for the whole order.
It could also be useful if orders remain editable while running, since production requirements often change mid-process.
For dispatching, I could imagine two possible modes:
Printer assignment could either target a specific printer or a compatible printer type (e.g., “any H2D Pro”), based on the file compatibility.
Again, these are just workflow thoughts from a user perspective. The direction you described already sounds very aligned with this kind of model.
please let me know where I could contribute or what would help you the most. I’m happy to support on the conceptual side, UX/workflow thinking, data model, testing, or documenting use cases and edge cases. I’d be glad to help. Just point me in the right direction
Really excited to see where this goes
@maziggy commented on GitHub (Feb 20, 2026):
Perhaps @cadtoolbox has also an opinion on this?
@maziggy commented on GitHub (Feb 20, 2026):
I would says let's first define the exact workflow. I just started with a larger task, but once it's finished, I can step in here.
@cadtoolbox commented on GitHub (Feb 20, 2026):
@maziggy The majority of the print jobs we use are single build plate. Lot's a prints, but almost never repeats. I would not have a vested interest in this to offer a decent opinion.
@cimdDev commented on GitHub (Feb 20, 2026):
I will spend some more time thinking about this... This idea needs a bit more maturing. It’s something that should be done right rather than fast...
I’m also considering related requirements raised by jnswlln on Discord. Their use case is a larger farm where orders are defined as product + color + quantity, and the system automatically maps jobs to any available printer that already has the required filament/color configured. That kind of self-mapping to existing printer material/color setups is an interesting direction and could also well align within this concept here.
I also think accounting per plate vs per object on a plate needs some thoughts, although it does add complexity.
Just sharing thoughts for now. I will refine ideas further
@cimdDev commented on GitHub (Feb 23, 2026):
I worked on it conceptually the last couple of days to explore the approach and validate the direction. I created a small prototype MVP with Codex for demonstration purposes.. nothing that’s worthy of a pull request, but I hope this helps to convey the idea or partailly reuse for the implementation.
Here’s the complete documentation and summary of this feature:
Batch Order From 3MF + Plate Configuration Matrix (Technical Documentation)
1. Feature Overview
What the Batch Order feature does
The Batch Order feature adds a planning layer above the existing queue so users can define what must be produced from a
.gcode.3mffile before dispatching individual prints.It allows users to:
Purpose of creating orders from 3MF files
A Library
.gcode.3mffile already contains:Creating an Order from the 3MF uses that metadata as the source of truth for plate planning.
Plate Configurations
A Plate Configuration represents:
Each configuration is tied to one source plate and contains:
quantity_targetColor Overrides
Overrides are primarily color changes (material type remains unchanged).
Example:
PLA #FF0000PLA #0000FFThe UI and backend preserve the source mapping and compute a queue-level override payload describing only the differences.
Integration with the existing Queue system
The queue architecture is reused as-is.
PrintQueueItemrows.override_material_mapto represent batch configuration overrides.2. Workflow Description
1. Create a Batch Order from a .gcode.3mf file
User flow:
POST /orders.Internal behavior:
.gcode.3mflibrary file.LibraryFile.file_metadata.plates[]is missing, backend extracts plate snapshots directly from the 3MF archive.PrintBatchrow is created and per-platePrintBatchPlaterows are snapshotted.2. Edit header information
User can edit:
Internal behavior:
PUT /orders/{id}updatesprint_batches3. Define plate configurations
User creates one or more configurations per plate.
Internal behavior:
POST /orders/{id}/configsprint_batch_plate_configsplate_metadata_snapshot.filament_mapprint_batch_plate_config_slots4. Override colors
User edits colors in the matrix per slot row / config column.
Internal behavior:
PUT /orders/configs/{config_id})PUT /orders/configs/{config_id}/slots)5. Generate QueueItems
When user dispatches a config / plate / order:
remaining_to_dispatchPrintQueueItemper physical printQueue item payload includes:
batch_id,batch_plate_id,batch_plate_config_idmatching_requirements_jsonexecution_mapping_jsonoverride_material_map(if effective overrides exist)6. Dispatch prints
Dispatch entry points:
limitInternal behavior:
archive.extra_data["batch_order"]3. Data Model and Architecture Changes
New planning tables
print_batches(order header)print_batch_plates(source plate snapshot)print_batch_plate_configs(plate variants + quantity)print_batch_plate_config_slots(per-slot material/color mapping for a config)Schema change (new for this feature refinement)
print_queuegained:override_material_map(TEXT, JSON-serialized, nullable)Purpose:
Relationships
PrintBatch1..NPrintBatchPlatePrintBatchPlate1..NPrintBatchPlateConfigPrintBatchPlateConfig1..NPrintBatchPlateConfigSlotPrintBatchPlateConfig1..NPrintQueueItem(viabatch_plate_config_id)Override data flow
4. Override Logic
Base material mapping from 3MF
Base mapping is read from:
plate.plate_metadata_snapshot.filament_mapEach row typically includes:
slot_idmaterial_typecolor_hexnozzle_assignmentConfiguration overrides
Each config stores slot mappings in
print_batch_plate_config_slots.The matrix UI edits those rows, usually changing:
color_hexMaterial type can still be stored, but UI/feature expectation is “color-first”.
Effective mapping determination
At dispatch/sync time, backend compares:
If values differ, an entry is added to
override_material_map.No difference => no override entry for that slot.
Example override payload
Queue matching / AMS mapping is not modified
This feature does not change:
It only passes override intent forward via queue item metadata.
5. UI Structure
Order creation screen
Two entry paths exist:
Order detail layout
Order detail page now contains:
Plate card layout
Left side:
Right side:
Configuration matrix behavior
Rows:
filament_map)Columns:
Original(read-only source mapping)Per config column:
Dispatch controls
Available dispatch levels:
Progress indicators
Displayed at:
Diagram (UI composition)
6. Queue Integration Verification
How QueueItems now receive overrides
During batch dispatch (and pending item sync after config edits):
override_material_map)PrintQueueItem.override_material_mapWhere override is stored
print_queue.override_material_mapTEXTConfirmation that existing queue logic was reused
Reused unchanged:
Extended only:
Compatibility considerations
override_material_mapis nullable; legacy queue items remain valid7. Limitations and Future Extensions
Current limitations
Future extensions
filament_id)exact,family, distance)print_batch_config_requirements) fully wired to UI8. Developer Notes
Key design decisions
Tradeoffs
override_material_mapin queue is flexible and additive, but not strongly typed at DB levelThings to watch out for
plate_metadata_snapshot.filament_map; malformed source metadata can degrade matrix fidelityPotential refactoring areas
override_material_mapin frontend API types@cimdDev commented on GitHub (Feb 23, 2026):
https://github.com/cimdDev/bambuddy/tree/custom/feature-orderbatch-mvp
@maziggy commented on GitHub (Mar 28, 2026):
Do you wanna push?
@cimdDev commented on GitHub (Mar 30, 2026):
This is not production-grade code and mostly AI generated. This was meant as a quick proof of concept demo to explore and convey the idea, rather than deliver a ready to push feature. The backend logic could maybe be serve as a starting point for further development, but frontend definitely needs a redesign. it looks quite clunky and ugly. I am not able to take this further. If you think this direction is valuable and want to turn it into a production-ready feature, I’m happy to push it as-is.
@maziggy commented on GitHub (Apr 1, 2026):
Let's start with a simplified approach. Add quantity option to print/schedule modal. If quantity > 1, it starts the first print and creates required queue items identified by a batchID for tracking.
@maziggy commented on GitHub (Apr 1, 2026):
Available/Fixed in branch dev and available with the next release or daily build.
Can you please test and let me know how it goes?
If you find Bambuddy useful, please consider giving it a ⭐ on GitHub — it helps others discover the project!