-
-
Notifications
You must be signed in to change notification settings - Fork 445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
file_manager: Added additional metadata to aid tool selection on single extruder multi-material prints #962
Conversation
… printing. This is critical to new Mainsail functionality to map tools to MMU spools when using Happy Hare (Klipper MMU driver)
…ruder multi-material prints The added metadata is ssential for single extruder multi-material printing. It is used in new Mainsail functionality to map tools to MMU spools when using Happy Hare (Klipper MMU driver) Signed-off-by: Paul Morgan ([email protected])
Thanks. I'm fine with adding the new fields, however the metadata specification in the docs needs to be updated with the new fields. moonraker/docs/external_api/file_manager.md Lines 258 to 291 in a0164e1
I use VSCode's markdown table extension to keep tables formatted. In addition, Moonraker's docs makes use of my compact tables extension. This allows you to merge rows with long descriptions. When you see a carrot ( If you want to see a live result as you are modifying, you can create a virtualenv, install moonraker's doc requirements, and run |
Of course. Still learning my way around Moonraker. I'll update the docs.. EDIT: Documentation updated with new metadata variables. Note that I also clarified that two existing variables can represent multiple values for multi-color single-extruder prints. |
docs/external_api/file_manager.md
Outdated
@@ -273,10 +272,15 @@ GET /server/files/metadata?filename=tools/drill.gcode | |||
| `first_layer_extr_temp` | float | The configured first layer extruder temperature, in Celsius. | | |||
| `first_layer_bed_temp` | float | The configured first layer bed temperature, in Celsius. | | |||
| `chamber_temp` | float | The configured chamber temperature, in Celsius. | | |||
| `filament_name` | str | The name of the filament used. | | |||
| `filament_type` | str | The type of filament used, ie: `PLA`. | | |||
| `filament_name` | str | The name(s) of the filament used. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with the documentation it would be preferred for these types to be string
rather than str
. The docs are oriented toward JSON (JavaScript) type descriptions.
docs/external_api/file_manager.md
Outdated
| `filament_name` | str | The name(s) of the filament used. | | ||
| `filament_color` | str | The colors(s) of the filament used in #RRGGBB format. | | ||
| `extruder_color` | str | The slicer defined extruder color(s) for the print. | | ||
| `filament_temp` | str | The base temperature(s) of filament used, in Celsius. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that this is parsed as a string. Other temperatures parsed by metadata.py are expressed as a float, is there a particuar reason for this not to be? Is it because there may be multiple? Since this is a new addition it could be returned as a list of floats. I'm open to discussion on which is best.
docs/external_api/file_manager.md
Outdated
| `filament_total` | float | The total length filament used in mm. | | ||
| `filament_weight_total` | float | The total weight of filament used in grams. | | ||
| `single_extruder_multi_material` | int | Identifies a multimaterial print with single extruder. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we can shorten the name of this field and make it more descriptive. It seems this indicates that the print was sliced with MMU enabled, so I wonder if it would make sense to have this field be named has_mmu
or has_se_mmu
. The field names reported by Moonraker don't have to match the one's added by the slicer.
Thanks. With the documentation I was able to get a better feel for what is being added, so I had a few comments. I'm open to leaving the |
Thanks. Happy to change the return types and shorten the As for types, yes, temp can be parsed an array of floats, in fact that is what I do in Mainsail anyway. Again I was really trying to pick up on conventions and missed the individual temps. I'm back from my trip so let me update.. EDIT: One possible concern is that many of the metadata variables used in the slicer can be scalar or an array. E.g. take the existing |
You are correct, we don't want to break API compatibility so I'd be fine with returning |
No problem. Let me update this. |
@Arksine I have updated according to your guidance: The new metadata: Let me know if there is anything else you would like changed. |
Looks good, thanks! |
Thank you! |
I've just started adding support for this in Fluidd, here is a first draft of it: fluidd-core/fluidd#1617 I really dislike how the Filament Name and Type are now showing up (check the screenshot), so will try to do something "cleaver" around that... Side note on this topic: I know I did this PR, but I wish I hadn't done it... |
file_manager: Added additional metadata to aid tool selection on single extruder multi-material prints
The added metadata is essential for single extruder multi-material printing. It is used in new Mainsail functionality to map tools to MMU spools when using Happy Hare (Klipper MMU driver)
Signed-off-by: Paul Morgan ([email protected])