Advanced Corrugated Materials¶
Advanced Corrugated Materials¶
1ot = impact.gui.output_toolbox
2ot.clear()
3db = impact.active_database
4sc = db.standard_creator
5cor_mat = sc.corrugated_material
6
7sc.standard = "ECO Pizza Box"
8mats = sc.valid_material_master_settings
9
10
11def describe_corrugated_material(cor_mat):
12 if cor_mat is None:
13 return
14
15 if not cor_mat.valid_base_material:
16 ot.add("Invalid base material")
17 return
18
19 comps = cor_mat.components
20
21 for comp in comps:
22 ot.add("Label text = " + str(comp.label_text))
23 ot.add("Available materials:")
24 mats = comp.available_material_names
25
26 for j in range(0, len(mats) - 1 + 1):
27 ot.add(" " + str(mats[j]))
28
29 if comp.selected_material_index > -1:
30 sel = mats[comp.selected_material_index]
31 else:
32 sel = "NULL"
33
34 ot.add("Selected material = " + str(sel))
35 ot.add("Hint = " + str(comp.hint))
36
37 if comp.use_wax:
38 ot.add("Do use wax")
39 else:
40 ot.add("Do not use wax")
41
42 ot.add("")
43
44 for info_row in cor_mat.info_rows:
45 ot.add(str(info_row.label_text) + " -> " + + info_row.value_text)
46
47 ot.add("")
48
49ot.clear()
50
51for mat in mats:
52 ot.add(mat.full_name)
53
54
55if sc.advanced_corrugated_materials_enabled:
56 sc.material_name = "Corrugated|A Flute"
57 ot.add("***************************************")
58 ot.add("Corrugated|A Flute")
59 ot.add("***************************************")
60 describe_corrugated_material(cor_mat)
61
62 sc.material_name = "Corrugated|B Flute"
63 ot.add("***************************************")
64 ot.add("Corrugated|B Flute")
65 ot.add("***************************************")
66 describe_corrugated_material(cor_mat)
67
68 sc.material_name = "Corrugated|C Flute"
69 ot.add("***************************************")
70 ot.add("Corrugated|C Flute")
71 ot.add("***************************************")
72 describe_corrugated_material(cor_mat)
73
74else:
75 ot.add("Advanced materials are not enabled")