Files
grotti/grotti/catalog.py
T
Dominic Gundel 4ddffbbeb1 Grotti 3.2.0: Jetzt-Liste, Filament-Pause, Strom-Torte, UI-Polish.
Jetzt/Topbar und Material-Routing, Pause bei Filament-Ende, Druckbericht mit Stromanteilen, Design- und Kamera-Stream-Polish; Bedarf-Alert-Spam und Platte-belegt-Bugs behoben.
2026-10-18 14:58:32 +02:00

266 lines
7.3 KiB
Python

"""Sorten aus den Filamentprofilen und die Farbvorauswahl."""
MATERIALS = [
{
"name": "Sunlu PLA",
"brand": "Sunlu",
"material_type": "PLA",
"density": 1.24,
"volumetric": 12,
"volumetric_s1": 14,
"machines": "beide",
"price_per_kg": 0,
"note": "Holz und Marmor laufen über dieses Profil. Glow nur mit gehärteter Düse.",
},
{
"name": "Sunlu PLA Meta",
"brand": "Sunlu",
"material_type": "PLA",
"density": 1.21,
"volumetric": 14,
"volumetric_s1": 16,
"machines": "beide",
"price_per_kg": 0,
"note": "",
},
{
"name": "Sunlu PLA Matte",
"brand": "Sunlu",
"material_type": "PLA",
"density": 1.31,
"volumetric": 10,
"volumetric_s1": 10,
"machines": "beide",
"price_per_kg": 0,
"note": "",
},
{
"name": "Sunlu PLA Silk",
"brand": "Sunlu",
"material_type": "PLA",
"density": 1.24,
"volumetric": 8,
"volumetric_s1": 8,
"machines": "beide",
"price_per_kg": 0,
"note": "Langsamer, damit die Oberfläche glänzt.",
},
{
"name": "Sunlu PLA+",
"brand": "Sunlu",
"material_type": "PLA",
"density": 1.21,
"volumetric": 12,
"volumetric_s1": 13,
"machines": "beide",
"price_per_kg": 0,
"note": "",
},
{
"name": "Sunlu PETG",
"brand": "Sunlu",
"material_type": "PETG",
"density": 1.27,
"volumetric": 10,
"volumetric_s1": 12,
"machines": "beide",
"price_per_kg": 0,
"note": "",
},
{
"name": "Sunlu PETG Matte",
"brand": "Sunlu",
"material_type": "PETG",
"density": 1.27,
"volumetric": 9,
"volumetric_s1": 10,
"machines": "beide",
"price_per_kg": 0,
"note": "",
},
{
"name": "Sunlu TPU 95A",
"brand": "Sunlu",
"material_type": "TPU",
"density": 1.21,
"volumetric": 5,
"volumetric_s1": 5,
"machines": "beide",
"price_per_kg": 0,
"note": "",
},
{
"name": "NinjaFlex",
"brand": "NinjaTek",
"material_type": "TPU",
"density": 1.19,
"volumetric": 2,
"volumetric_s1": None,
"machines": "kobra_3",
"price_per_kg": 0,
"note": "Nur Kobra 3.",
},
{
"name": "Sunlu ASA",
"brand": "Sunlu",
"material_type": "ASA",
"density": 1.04,
"volumetric": 12,
"volumetric_s1": 12,
"machines": "kobra_s1",
"price_per_kg": 0,
"note": "Nur Kobra S1, Tür zu.",
},
{
"name": "Formfutura ApolloX",
"brand": "Formfutura",
"material_type": "ASA",
"density": 1.07,
"volumetric": 12,
"volumetric_s1": 12,
"machines": "kobra_s1",
"price_per_kg": 0,
"note": "Nur Kobra S1, Tür zu.",
},
{
"name": "Sunlu ABS",
"brand": "Sunlu",
"material_type": "ABS",
"density": 1.02,
"volumetric": 11,
"volumetric_s1": 11,
"machines": "kobra_s1",
"price_per_kg": 0,
"note": "Nur Kobra S1, Tür zu.",
},
{
"name": "Sunlu PA12-CF",
"brand": "Sunlu",
"material_type": "PA12-CF",
"density": 1.08,
"volumetric": 8,
"volumetric_s1": 8,
"machines": "kobra_s1",
"price_per_kg": 50,
"note": "Nur Kobra S1, gehärtete Düse. Der ACE trocknet das nicht, dafür den externen Trockner.",
},
{
"name": "eSUN PETG-CF",
"brand": "eSUN",
"material_type": "PETG",
"density": 1.26,
"volumetric": 8,
"volumetric_s1": 8,
"machines": "kobra_s1",
"price_per_kg": 0,
"note": "Nur Kobra S1, gehärtete Düse.",
},
]
def ace_material_type(material_type):
"""Typ für den ACE. PA12-CF gibt es dort nicht, der Platz heißt PA6-CF."""
text = (material_type or "").strip()
if text.lower() == "pa12-cf":
return "PA6-CF"
return text
SOLIDS = [
{"id": "schwarz", "name": "Schwarz", "hex": "#1c1c1c"},
{"id": "weiss", "name": "Weiß", "hex": "#f4f4f4"},
{"id": "grau", "name": "Grau", "hex": "#8a8f8c"},
{"id": "rot", "name": "Rot", "hex": "#c23b3b"},
{"id": "orange", "name": "Orange", "hex": "#e07a2f"},
{"id": "gelb", "name": "Gelb", "hex": "#e2c04a"},
{"id": "gruen", "name": "Grün", "hex": "#3d8f5a"},
{"id": "blau", "name": "Blau", "hex": "#3a6ea5"},
{"id": "hellblau", "name": "Hellblau", "hex": "#7eb6d9"},
{"id": "lila", "name": "Lila", "hex": "#7a5ea7"},
{"id": "pink", "name": "Pink", "hex": "#e7a0b4"},
{"id": "braun", "name": "Braun", "hex": "#8a5a3c"},
{"id": "beige", "name": "Beige", "hex": "#d7c4a3"},
{"id": "natur", "name": "Natur", "hex": "#e4d7c3"},
{"id": "gold", "name": "Gold", "hex": "#d4af37"},
{"id": "silber", "name": "Silber", "hex": "#c0c6cc"},
{"id": "transparent", "name": "Transparent", "hex": "#d5e4ea"},
{"id": "kohle", "name": "Kohlefaser", "hex": "#2a2a2a"},
{"id": "glow", "name": "Glow", "hex": "#b6f25c"},
]
MULTI = [
{
"id": "regenbogen",
"name": "Regenbogen",
"colors": [
{"name": "Rot", "hex": "#e23b3b"},
{"name": "Orange", "hex": "#e07a2f"},
{"name": "Gelb", "hex": "#e2c04a"},
{"name": "Grün", "hex": "#3d8f5a"},
{"name": "Blau", "hex": "#3a6ea5"},
{"name": "Lila", "hex": "#7a5ea7"},
],
},
{
"id": "holz",
"name": "Holz",
"colors": [
{"name": "Braun", "hex": "#8a5a3c"},
{"name": "Beige", "hex": "#d7c4a3"},
{"name": "Dunkelbraun", "hex": "#5c3a24"},
],
},
{
"id": "marmor",
"name": "Marmor",
"colors": [
{"name": "Weiß", "hex": "#f4f4f4"},
{"name": "Grau", "hex": "#8a8f8c"},
{"name": "Schwarz", "hex": "#1c1c1c"},
],
},
{
"id": "schwarz-weiss",
"name": "Schwarz / Weiß",
"colors": [
{"name": "Schwarz", "hex": "#1c1c1c"},
{"name": "Weiß", "hex": "#f4f4f4"},
],
},
{
"id": "rot-schwarz",
"name": "Rot / Schwarz",
"colors": [
{"name": "Rot", "hex": "#c23b3b"},
{"name": "Schwarz", "hex": "#1c1c1c"},
],
},
{
"id": "blau-weiss",
"name": "Blau / Weiß",
"colors": [
{"name": "Blau", "hex": "#3a6ea5"},
{"name": "Weiß", "hex": "#f4f4f4"},
],
},
{
"id": "gold-silber",
"name": "Gold / Silber",
"colors": [
{"name": "Gold", "hex": "#d4af37"},
{"name": "Silber", "hex": "#c0c6cc"},
],
},
]
MACHINE_LABELS = {
"beide": "Kobra 3 und S1",
"kobra_3": "nur Kobra 3",
"kobra_s1": "nur Kobra S1",
}
def color_catalog():
solids = [{"id": row["id"], "name": row["name"], "colors": [{"name": row["name"], "hex": row["hex"]}]} for row in SOLIDS]
multi = [{"id": row["id"], "name": row["name"], "colors": row["colors"]} for row in MULTI]
return {"solids": solids, "multi": multi}