Sign in with STEVE

steve/hollow-section

Square and rectangular hollow sections (structural tube), EN 10219-2, any size, wall and length.

v1.1.0 Latest STEVE MIT 0
Isometric
part.py 57 lines · Python · STEVE runtime · checked
Download
1"""Square and rectangular hollow section (cold-formed structural tube), EN 10219-2, any size, wall and length.
2
3Section: outside `width` (X) by `height` (Y) with wall thickness `wall`, centred on the origin, extruded along +Z by
4`length`. Corner radii as EN 10219-2 uses them for the sectional properties of its tables: outside ro and inside ri
5= 2.0T / 1.0T for T <= 6 mm, 2.5T / 1.5T for 6 < T <= 10 mm, 3.0T / 2.0T for T > 10 mm; or sharp corners (`corners =
6"sharp"`), the generic light tubes as step.parts' published models draw them (see the README).
7"""
8from steve import Model
9
10width = 40 # mm Outside width B
11height = 40 # mm Outside height H
12wall = 3 # mm Wall thickness T
13length = 1000 # mm Length
14material = "steel-s355" # Material
15corners = "en-10219" # Corners: en-10219 (EN 10219-2 radii) or sharp
16
17# material choice: (STEVE material library id, appearance colour)
18MATERIALS = {
19 "steel-s355": ("steel-s355j2g3", "#7d8085"), # EN 10219-1 S355J2H (closest library grade S355J2G3)
20 "steel-s235": ("steel-s235jr", "#7d8085"), # EN 10219-1 S235JRH
21 "stainless-304": ("stainless-304", "#c9ccd0"), # EN 10088 1.4301
22 "unspecified": (None, "#9a9da2"), # the generic tubes' models name no material
23}
24# EN 10219-2:2006 Annex B clause B.3 (https://icdn.tradew.com/file/201801/1572618/pdf/6800507.pdf) corner radii for the sectional properties: (up to wall thickness T, ro / T, ri / T)
25CORNERS = [(6.0, 2.0, 1.0), (10.0, 2.5, 1.5), (1000.0, 3.0, 2.0)]
26
27ro_factor, ri_factor = next((o, i) for limit, o, i in CORNERS if wall <= limit)
28ro = ro_factor * wall if corners == "en-10219" else 0.0
29ri = ri_factor * wall if corners == "en-10219" else 0.0
30material_id, colour = MATERIALS[material]
31
32
33def rounded_rectangle(sk, id, w, h, r):
34 """A w x h rectangle centred on the origin with corner radius r: four lines and four quarter arcs (r = 0: sharp)."""
35 x, y = w / 2, h / 2
36 if r == 0:
37 sk.rect(id, (-x, -y), (x, y))
38 return
39 sk.line(f"{id}_bottom", (-x + r, -y), (x - r, -y))
40 sk.arc(f"{id}_corner1", (x - r, -y + r), r, 270, 360)
41 sk.line(f"{id}_right", (x, -y + r), (x, y - r))
42 sk.arc(f"{id}_corner2", (x - r, y - r), r, 0, 90)
43 sk.line(f"{id}_top", (x - r, y), (-x + r, y))
44 sk.arc(f"{id}_corner3", (-x + r, y - r), r, 90, 180)
45 sk.line(f"{id}_left", (-x, y - r), (-x, -y + r))
46 sk.arc(f"{id}_corner4", (-x + r, -y + r), r, 180, 270)
47
48
49model = Model()
50with model.sketch("section", on="XY", name="Section") as sk:
51 rounded_rectangle(sk, "outside", width, height, ro)
52 rounded_rectangle(sk, "inside", width - 2 * wall, height - 2 * wall, ri)
53model.extrude("tube", "section", distance=length, name="Tube")
54if material_id: # "unspecified": no material assigned
55 model.material(material_id, color=colour)
56result = model.result()
57

Cold-formed square or rectangular hollow section to EN 10219-2: outside width B along X, height H along Y, wall thickness T, centred on the origin and extruded along +Z by the length. Corner radii are those EN 10219-2 uses for the sectional properties of its tables (outside / inside: 2T / T up to 6 mm wall, 2.5T / 1.5T up to 10 mm, 3T / 2T above), so mass and section area match the tables. Presets: catalogue sizes, 1000 mm long. Also sharp-cornered light tubes (corners = "sharp"): the catalogue's generic square and rectangular tubes, measured from step.parts' published models (MIT).

Hollow section (EN 10219-2 SHS / RHS)

Cold-formed welded structural square (SHS) and rectangular (RHS) hollow sections at any size, wall and length; and sharp-cornered light tubes (corners = "sharp"), the catalogue's generic square and rectangular tubes.

Geometry

Outside width B (width) along X, outside height H (height) along Y, wall thickness T (wall), centred on the origin and extruded along +Z by length. The corners are rounded with the outside radius ro and the inside radius ri that EN 10219-2 uses to calculate the sectional properties of its tables:

Wall T ro ri
T ≤ 6 mm 2.0 T 1.0 T
6 mm < T ≤ 10 mm 2.5 T 1.5 T
T > 10 mm 3.0 T 2.0 T

so the section area and mass agree with the tables. (Real corner profiles vary within the standard's tolerance: 1.6 T to 2.4 T outside for T ≤ 6 mm, 2.0 T to 3.0 T for 6 < T ≤ 10 mm, 2.4 T to 3.6 T above.) With corners = "sharp" the corners are square inside and out.

Parameters

Parameter Meaning
width Outside width B, mm
height Outside height H, mm (equal to B for a square section)
wall Wall thickness T, mm
length Length, mm
material steel-s355 (S355J2H), steel-s235 (S235JRH), EN 10219-1; stainless-304 (1.4301); or unspecified (no material assigned)
corners en-10219 (the radii above) or sharp

Source

EN 10219-2:2006, Cold formed welded structural hollow sections of non-alloy and fine grain steels — Part 2: Tolerances, dimensions and sectional properties, read from a full copy of BS EN 10219-2:2006 (https://icdn.tradew.com/file/201801/1572618/pdf/6800507.pdf):

  • corner radii for the sectional properties: Annex B, clause B.3 (printed p. 21): outside ro = 2.0T / 2.5T / 3.0T and inside ri = 1.0T / 1.5T / 2.0T for T ≤ 6, 6 < T ≤ 10 and T > 10 mm;
  • tolerance on the external corner profile: Table 3 (1.6T to 2.4T, 2.0T to 3.0T, 2.4T to 3.6T); the same in the 2019 edition's Table 3 (SIST EN 10219-2:2019 preview, https://cdn.standards.iteh.ai/samples/38063/99682514fcf94faabd079f41b1a7854e/SIST-EN-10219-2-2019.pdf);
  • sizes B × H × T: Table C.2 (square) and Table C.3 (rectangular); every preset is a row of these tables.

The radii rule is cross-checked by Roymech's cold-formed SHS / RHS tables (https://roymech.org/Useful_Tables/Sections/SHS_cf.html, https://roymech.org/Useful_Tables/Sections/RHS_cf.html). EN 10219-2 was revised in 2019 (formulae then in Annex A, tables in Annex B); its radii text was not available, so the edition matched is 2006.

Generic square tubes of the catalogue (side and piece length only) become presets only where EN 10219-2 lists the section their own reference model has: 25 × 25 × 2 (EN 10219-2:2006 Table C.2; copy consulted: https://icdn.tradew.com/file/201801/1572618/pdf/6800507.pdf, page 29), at the entry's length. Their other sizes (10 × 1, 15 × 1.2, 20 × 1.6, 30 × 2.4, 40 × 3.2) are not EN 10219-2 sections: they are sharp-cornered presets measured from their own models (below).

Sources: generic light tubes

No standard covers the catalogue's generic light tubes (their walls are in neither EN 10219-2 nor EN 10305-5). Their geometry was measured from the published reference models below: each model's mid-length section (outside extents, inside extents; wall = the difference / 2; all corners square) and is checked preset by preset against its own model (bounding box within 0.05 mm, 0.5 % over 100 mm, and volume within 2 %). Their models name no material, so these presets have material = "unspecified".

Tube Wall Tube Wall
10 × 10 1.0 20 × 10 1.0
15 × 15 1.2 30 × 15 1.2
20 × 20 1.6 40 × 20 1.6
30 × 30 2.4 60 × 30 2.4
40 × 40 3.2
  • step.parts, square_tube_side<s>_l<length> and rectangular_tube_size<w>x<h>_l<length> (https://www.step.parts, repository https://github.com/earthtojake/step.parts, commit c6113328, catalog/step/): step.parts' own "analytic simplified" models, original project material under the repository's MIT licence (© 2026 earthtojake).

Simplifications (the models'): square corners, no weld seam.

Preset list: sizes of the step.parts catalogue (MIT), see library/NOTICE.md; EN 10219 presets are 1000 mm long, generic ones have the catalogue's length.

  1. 1.1.0 Latest

    Sharp corners (corners = sharp) and an unspecified material added for the generic light tubes 10x10x1 to 60x30x2.4, measured from step.parts' models (MIT); EN 10219 presets unchanged.

More #stock
STEVEMIT

steve/i-beam

Hot-rolled I and H beams: IPE (DIN 1025-5), HEA (DIN 1025-3) and HEB (DIN 1025-2), any length.

0 65 sizes 0 1 day ago v1.0.0
STEVEMIT

steve/angle

Hot-rolled steel angle, equal and unequal legs, EN 10056-1, any length.

0 77 sizes 0 1 day ago v1.0.0
STEVEMIT

steve/round-tube

Round tube, any outside diameter, wall and length; presets from EN 10305-1 and EN 10220 sizes.

0 70 sizes 0 1 day ago v1.0.0
STEVEMIT

steve/plate

Rectangular plate blank, any width, length and thickness, in common plate and sheet materials.

4 45 sizes 0 1 day ago v1.0.0