# Katownik spawalniczy 90/45/135, S355 8 mm, otwory D16 w siatce 50 mm (stol spawalniczy D16)
t = param("grubosc", 8)
sheet_rule(thickness: t, radius: 8, k: 0.33)
k = contour_flange([[0, 0, 0], [200, 0, 0]], 120, normal: [0, 1, 0], symmetric: false)
name(k, "Katownik_90_45_135")
s1 = sketch(plane.xz, name: "Skos_45_135") { line([75.000,125.000],[205.000,-5.000]); line([205.000,-5.000],[205.000,125.000]); line([205.000,125.000],[75.000,125.000]) }
k = extrude(s1, 400, op: "cut", target: k, direction: "symmetric")
s2 = sketch(plane.xz, name: "Odciazenia_narozy_R4") { arc([-4.000,0.000],[4.000,0.000],[0.000,-4.000]); arc([4.000,0.000],[-4.000,0.000],[0.000,4.000]); arc([196.000,0.000],[204.000,0.000],[200.000,-4.000]); arc([204.000,0.000],[196.000,0.000],[200.000,4.000]); arc([76.000,120.000],[84.000,120.000],[80.000,116.000]); arc([84.000,120.000],[76.000,120.000],[80.000,124.000]); arc([-4.000,120.000],[4.000,120.000],[0.000,116.000]); arc([4.000,120.000],[-4.000,120.000],[0.000,124.000]) }
k = extrude(s2, 400, op: "cut", target: k, direction: "symmetric")
s3 = sketch(plane.xz, name: "Otwory_D16_siatka_50") { arc([16.950,25.000],[33.050,25.000],[25.000,16.950]); arc([33.050,25.000],[16.950,25.000],[25.000,33.050]); arc([66.950,25.000],[83.050,25.000],[75.000,16.950]); arc([83.050,25.000],[66.950,25.000],[75.000,33.050]); arc([116.950,25.000],[133.050,25.000],[125.000,16.950]); arc([133.050,25.000],[116.950,25.000],[125.000,33.050]); arc([16.950,75.000],[33.050,75.000],[25.000,66.950]); arc([33.050,75.000],[16.950,75.000],[25.000,83.050]); arc([66.950,75.000],[83.050,75.000],[75.000,66.950]); arc([83.050,75.000],[66.950,75.000],[75.000,83.050]) }
k = extrude(s3, 400, op: "cut", target: k, direction: "symmetric")
s4 = sketch(plane.xz, name: "Okno_pod_scisk") { line([21.000,94.000],[59.000,94.000]); arc([59.000,94.000],[59.000,108.000],[66.000,101.000]); line([59.000,108.000],[21.000,108.000]); arc([21.000,108.000],[21.000,94.000],[14.000,101.000]) }
k = extrude(s4, 400, op: "cut", target: k, direction: "symmetric")
name(k, "Katownik_90_45_135")
print(measure(k))
fp = flat_pattern(face(k, normal: [0, 0, 1], near: [40, 40, 0], within: 3))
name(fp, "Rozwiniecie")
print(measure(fp))
export_file(k, "Katownik_spawalniczy_90_45_135.step")