import streamlit as st
# --- Profile Types ---
profiles = {
"π΅ Round Tube": "Round Tube",
"π₯ Square Tube": "Square Tube",
"π¨ Rectangular Tube": "Rectangular Tube",
"π« Flat Bar": "Flat Bar",
"π Angle Bar (L-profile)": "Angle Bar",
"π§± Channel Bar (U-profile)": "Channel Bar",
"π I-Beam / H-Beam": "Beam",
"π Sheet / Plate": "Sheet",
"π§΅ Wire / Rod": "Wire"
}
# --- Diameter and Wall Thickness Data (from EN ISO 1127) ---
diameter_data = {
"Series 1": {
10.2: [1.0, 1.2, 1.6, 2.0],
13.5: [1.0, 1.2, 1.6, 2.0],
17.2: [1.0, 1.2, 1.6, 2.0],
21.3: [1.0, 1.2, 1.6, 2.0, 2.6],
26.9: [1.0, 1.2, 1.6, 2.0, 2.6],
33.7: [1.0, 1.2, 1.6, 2.0, 2.6, 3.2],
42.4: [1.0, 1.2, 1.6, 2.0, 2.6, 3.2],
48.3: [1.0, 1.2, 1.6, 2.0, 2.6, 3.2],
60.3: [1.6, 2.0, 2.6, 3.2, 4.0],
76.1: [2.0, 2.6, 3.2, 4.0],
88.9: [2.0, 2.6, 3.2, 4.0],
114.3: [2.0, 2.6, 3.2, 4.0],
139.7: [2.0, 2.6, 3.2, 4.0],
168.3: [2.0, 2.6, 3.2, 4.0],
219.1: [2.6, 3.2, 4.0, 5.0],
273.0: [3.2, 4.0, 5.0, 6.3],
323.9: [4.0, 5.0, 6.3, 8.0],
355.6: [4.0, 5.0, 6.3, 8.0],
406.4: [4.0, 5.0, 6.3, 8.0],
457.0: [5.0, 6.3, 8.0],
508.0: [5.0, 6.3, 8.0],
610.0: [6.3, 8.0],
711.0: [6.3, 8.0],
813.0: [6.3, 8.0],
914.0: [6.3, 8.0],
1016.0: [6.3, 8.0]
},
"Series 2": {
6.0: [1.0],
8.0: [1.0],
10.0: [1.0, 1.2],
12.0: [1.0, 1.2],
12.7: [1.0, 1.2],
16.0: [1.0, 1.2],
19.0: [1.0, 1.2],
20.0: [1.0, 1.2],
25.0: [1.0, 1.2, 1.6],
31.8: [1.0, 1.2, 1.6],
32.0: [1.0, 1.2, 1.6],
38.0: [1.0, 1.2, 1.6],
40.0: [1.0, 1.2, 1.6],
51.0: [1.0, 1.2, 1.6],
57.0: [1.0, 1.2, 1.6],
63.5: [1.0, 1.2, 1.6],
70.0: [1.0, 1.2, 1.6],
101.6: [1.6, 2.0]
},
"Series 3": {
14.0: [1.0],
18.0: [1.0],
22.0: [1.0],
25.4: [1.0, 1.2],
30.0: [1.0, 1.2],
35.0: [1.0, 1.2],
44.5: [1.0, 1.2, 1.6],
54.0: [1.0, 1.2, 1.6],
82.5: [1.6, 2.0]
}
}
# --- UI ---
st.title("π© Stainless Steel Profile Selector")
# Level 1: Profile Selection
profile = st.selectbox("Select Profile Type:", [""] + list(profiles.values()))
# Level 2: Standard Selection
if profile == "Round Tube":
standard = st.selectbox("Select Tube Standard:", ["", "EN 10296-2", "EN 10216-5", "EN 10217-7"])
# Level 3: Diameter Logic
if standard:
od_logic = st.selectbox("Select Outer Diameter Logic:", ["", "EN ISO 1127", "Free diameter"])
# Level 4: Series Selection
if od_logic == "EN ISO 1127":
series = st.selectbox("Select Diameter Series:", ["", "Series 1", "Series 2", "Series 3"])
# Level 5: Diameter Selection
if series:
diameters = list(diameter_data[series].keys())
diameter = st.selectbox("Select Outer Diameter (mm):", [""] + diameters)
# Level 6: Wall Thickness Selection
if diameter:
thicknesses = diameter_data[series][diameter]
thickness = st.selectbox("Select Wall Thickness (mm):", [""] + thicknesses)
# Summary
st.markdown("### β
Selection Summary")
st.write(f"**Profile Type:** {profile}")
st.write(f"**Standard:** {standard}")
st.write(f"**Diameter Logic:** {od_logic}")
st.write(f"**Series:** {series}")
st.write(f"**Outer Diameter:** {diameter} mm")
st.write(f"**Wall Thickness:** {thickness} mm")