Sign in with STEVE

steve/pcb-support

PCB support post (snap-in, adhesive-backed, swage, press-fit), M2 to M4, any height: simplified, measured from step.parts' models.

v1.0.0 Latest STEVE MIT 0
Isometric
part.py 50 lines · Python · STEVE runtime · checked
Download
1"""PCB support (board spacer post), four kinds, M2 to M4 sizes, any height: as step.parts' published models draw them.
2
3A solid round post on a round flange, standing on the XY plane at the origin along +Z, the board seat at `height`:
4- snap-in: flange on z = 0, post to `height`, a round snap head above it (the board sits on the post's top);
5- adhesive: a square adhesive pad on z = 0, then the flange and the post to `height`;
6- swage, press-fit: flange on z = 0 and the post to `height` (the models of the two kinds are identical).
7The posts are solid: the models show no bore, thread, barbs or knurl. See the README.
8"""
9from steve import Model
10
11kind = "snap-in" # Kind: snap-in, adhesive, swage, press-fit
12size = "M3" # Size (board hole / screw)
13height = 10 # mm Height (board seat above the base)
14material = "unspecified" # Material
15
16# mm, measured on step.parts' models <kind>_pcb_support|standoff_<size>_h<height> (every face read: cylinder radii and
17# their faces' z-ranges, the pad's planar faces); the same for every height of a size:
18# size: (flange diameter, flange top z, post diameter, snap head diameter, snap head height, pad side, pad thickness)
19SIZES = {
20 "M2": (5.0, 1.5, 2.5, 4.0, 1.5, 10.0, 1.0),
21 "M2.5": (6.25, 1.5, 3.0, 5.0, 1.5, 10.0, 1.0),
22 "M3": (7.5, 1.5, 3.6, 6.0, 1.8, 12.0, 1.0),
23 "M4": (10.0, 2.0, 4.8, 8.0, 2.4, 16.0, 1.0),
24}
25# material choice: (STEVE material library id, appearance colour); the models name no material
26MATERIALS = {
27 "unspecified": (None, None),
28 "nylon": ("pa6", "#ece9e1"),
29 "brass": ("brass", "#c6a75a"),
30 "steel": ("steel-generic", "#9da2a8"),
31}
32
33flange_d, flange_top, post_d, head_d, head_h, pad, pad_t = SIZES[size]
34if height <= flange_top:
35 raise ValueError(f"The height must be more than the flange's top ({flange_top} mm).")
36material_id, colour = MATERIALS[material]
37
38model = Model()
39base = pad_t if kind == "adhesive" else 0.0
40if kind == "adhesive":
41 model.box("pad", pad, pad, pad_t, at=(0, 0, pad_t / 2), name="Adhesive pad")
42model.cylinder("flange", flange_d / 2, flange_top - base, at=(0, 0, base), op="join" if kind == "adhesive" else None,
43 name="Flange")
44model.cylinder("post", post_d / 2, height - flange_top, at=(0, 0, flange_top), op="join", name="Post")
45if kind == "snap-in":
46 model.cylinder("head", head_d / 2, head_h, at=(0, 0, height), op="join", name="Snap head")
47if material_id:
48 model.material(material_id, color=colour)
49result = model.result()
50

A simplified PCB support post for assemblies: a solid round post on a round flange, in four kinds: snap-in (with a snap head above the board seat), adhesive-backed (on a square pad), swage and press-fit (flange and post); sizes M2, M2.5, M3 and M4, any height. Measured from step.parts' published models (MIT); no standard or maker drawing covers these generic supports. The posts are solid (no bore, thread, barbs or knurl): see the README. Stands on the XY plane at the origin along +Z; the board seat is at the height.

PCB support (simplified)

A simplified PCB support post for assemblies, in four kinds (snap-in, adhesive-backed, swage, press-fit), sizes M2, M2.5, M3 and M4, any height.

Geometry

Stands on the XY plane at the origin along +Z; height is the board seat. A solid round post on a round flange:

  • snap-in: flange from z = 0, post up to the height, a round snap head (Ø, height below) above it;
  • adhesive: a square adhesive pad (1 mm) from z = 0, the flange on it, the post up to the height;
  • swage, press-fit: flange from z = 0, post up to the height. step.parts' models of these two kinds are identical, so they build the same shape.
Size Flange Ø Flange top Post Ø Snap head Ø × h Pad (side × t)
M2 5.0 1.5 2.5 4.0 × 1.5 10 × 1
M2.5 6.25 1.5 3.0 5.0 × 1.5 10 × 1
M3 7.5 1.5 3.6 6.0 × 1.8 12 × 1
M4 10.0 2.0 4.8 8.0 × 2.4 16 × 1

Parameters

Parameter Meaning
kind snap-in, adhesive, swage, press-fit
size M2, M2.5, M3, M4 (board hole / screw size)
height board seat above the base, mm
material unspecified (no material assigned), nylon (PA6), brass, steel

Sources

No standard covers these generic supports and they name no maker. The geometry was measured from the published reference models below (every face read: the cylinders' radii and the z-ranges of their faces, the pad's planar faces; the same dimensions for every height of a size), and every preset is checked against its own model: bounding box within 0.05 mm and volume within 2 %.

  • step.parts, snap_in_pcb_support_<size>_h<height>, adhesive_backed_pcb_support_…, swage_pcb_standoff_…, press_fit_pcb_standoff_… (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). They name no material, so the presets have material = "unspecified".

Simplifications (the models'): solid posts (no screw bore or thread), no snap barbs or slots, no swage collar or press-fit knurl. Use it as an envelope in assemblies.

Preset list: from the step.parts catalogue (MIT), see library/NOTICE.md.

  1. 1.0.0 Latest
More #pcb
STEVEMIT

steve/hex-standoff

Hex standoffs M2 to M4, female/female and male/female: Würth WA-SBRII/SBRIE (M2), Harwin R25/R30/R40 (M2.5 to M4).

0 69 sizes 0 1 day ago v1.0.0
STEVEMIT

steve/smt-spacer

Würth Elektronik SMT steel spacers: WA-SMSI, WA-SMST, WA-SMSE and WA-SMSR, any length.

0 179 sizes 0 1 day ago v1.0.0
STEVEMIT

steve/round-spacer

Round unthreaded clearance spacer for M3 screws (Harwin R30-601): Ø4.76 × Ø3.30, any length.

0 9 sizes 0 1 day ago v1.0.0
STEVEMIT

steve/pcb-card-guide

PCB card guide and board retaining clip, boards 1 to 2.4 mm, any length: simplified, measured from step.parts' models.

0 50 sizes 0 1 day ago v1.0.0