Find a filament
find_materialLook up a 3D printing filament by name to get its modulus, density and print temperatures before setting up a run. Read-only: returns the profile or asks you to pick among candidates.
Instructions
Find a 3D printing filament by name in the catalog that ships with topopt and in the user filaments of the work folder (topopt-filaments.yaml). It reads; it changes nothing.
The user only names the filament; the tool knows the numbers of the data sheet. Use it when the user says which spool they have ("Bambu PLA Basic", "Prusament PETG"), before you ask for a modulus or a density. name: the product as the user says it. Case, punctuation, the maker name and the word "my" do not matter ("polylite abs" and "Polymaker PolyLite ABS" are one filament). A family alone ("PLA", "PETG") names no product: the answer is "ambiguous" with every filament of the family. Returns: ok, status, query, catalog_version, matched_by, origin, profile, derives, candidates, differs, suggestions, makers, user_file, note.
"match":
profileis the filament: id, name, family, sheet_version, the tensile modulus and strength in the layer plane (xy) and across the layers (z), density, temperatures, enclosure, hardened nozzle, drying, and the source of the values (source_url, opened, tag, field_sources, note). A value that no source states is null (unknown): say so.nuis null for every filament, because no data sheet gives it.derivessays whatmaterial.filament: <id>sets in a run (E is the lower of the XY and Z modulus, taken from the bending modulus of the sheet when the sheet gives no tensile modulus; density is the one of the sheet, the middle of a range that the sheet gives, or else the median of the filaments of the family, labelled assumed; nu stays the assumed 0.35; a key in the YAML wins) and what the profile cannot give."ambiguous":
candidatesanddiffers(the facts on which they differ). Ask the user which one; do not pick for them."none":
suggestions("did you mean": never taken by itself) and anoteon how to go on: look up the maker data sheet andsave_materialthe values, or ask the user. The numbers of a data sheet describe printed test bars of one maker and one set of print settings, not the part of 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.printer_materialsshows what the printer of the user can print;check_problemgives the same fit for a YAML withmaterial.filament, in its keymaterial.save_preferences(material={"filament": id})keeps the filament, or writematerial: {filament: <id>}in the YAML.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |