Find a 3D printer
find_printerLooks up a 3D printer by user-provided name in the shipped catalog and work-folder printer list, returning its profile and print parameters to configure a run without asking for bed size or process.
Instructions
Find a 3D printer by name in the catalog that ships with topopt and in the user printers of the work folder (topopt-printers.yaml). It reads; it changes nothing.
The user only names the printer; the tool knows the print parameters. Use it when the user says which printer they have ("Bambu P1S", "my Prusa MK4S"), before you ask for a bed size or a process. name: the model as the user says it. Case, punctuation, the maker name and the words "my" and "printer" do not matter ("p1s", "Bambu Lab P1S" and "bambu p1 s" are one printer). Returns: ok, status, query, catalog_version, matched_by, origin, profile, derives, candidates, differs, suggestions, vendors, user_file, note.
"match":
profileis the printer: id, name, origin (catalogoruser), bed_mm, build_height_mm, nozzle, temperatures, enclosure, nozzle material, extruder, and the source of the values (source_url, opened, tag, field_sources, note). A value that the source does not give is null (unknown): say so.derivessays whatprint.printer_model: <id>sets in a run (the bed and the printer type, when the YAML does not give them) and what the profile cannot give."ambiguous":
candidatesanddiffers(the facts on which they differ). Ask the user which one; do not pick for them.matched_byis "partial" when the text is only a part of a name (one candidate too: a similar model can have other numbers)."none":
suggestions("did you mean": never taken by itself) and anoteon how to go on: look up the maker page andsave_printerthe values, or ask the user.user_file: path, exists, entries, problems. A problem in the file is a fact; the shipped catalog still works. Next: show the user the derived values, thensave_preferences(print={"printer_model": id})keeps the printer, or writeprint: {printer_model: <id>}in the YAML. A bed_mm or printer_type in the YAML wins. With a printer, the print report also compares the part height with its build height.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |