Install the Feature Studio
Custom features live in a Feature Studio — a code tab inside an Onshape document. You install once, version it, and every Part Studio in the document (or any document that links it) gets two new toolbar features.
- Open (or create) your Wafer Halo Onshape document.
- Click the + at the bottom-left tab bar → Create Feature Studio. Name it
halo-beveloid. - Delete the stub content and paste the entire contents of
scripts/onshape/wafer_halo_beveloid.fs. - Press ⌘S / Ctrl S — the studio commits (compiles). Green check in the tab = good.
- Open any Part Studio → toolbar → the puzzle-piece Custom features flyout → you'll see Halo Beveloid Band and Halo Beveloid Pinion.
What these features actually build
The halo's drive is a parallel-axis beveloid pair — conical involute gears whose axes are parallel, not intersecting. The ring's teeth sit on a 45° cone with the big end at the wall; each mm of axial travel trades 1 mm of ring radius for 1 mm of pinion radius, so the centre-radius sum is constant across the face and the pinion's axis points straight out of the wall.
This is why Gear Lab can't produce this pair, as brilliant as it is: its bevel gears are spherical involutes for intersecting shafts. A 45° Gear Lab bevel wants its mate's axis to cross the ring's axis at the cone apex — and on the halo, a radial-axis pinion's swept disc spans its full Ø along the wall normal, straight through the drywall behind or the wafer field in front. Gear Lab also has no ring-sector output, no flush-root module retune, and no joint-phase convention. Use Gear Lab for spurs and intersecting-axis bevels; use these two features for the halo drive.
| Property | Band (ring sector) | Pinion |
|---|---|---|
| Cone direction | big end at the wall (z = 0) | big end at the front (z = face) |
| Teeth @ B.3 | 108 (12 per segment) | 12 — ratio 9:1, counter-rotating |
| Module | 5.6 nominal → 5.384 effective (flush retune, shared) | |
| Front radii | root 284.0 · pitch 290.7 · tip 296.1 | pitch 32.83 mid-face (s_prof 1.0163) |
| Phase | every segment joint lands mid-space | tooth points at the ring at build |
Halo Beveloid Band — the segment's teeth
Model your segment first (the 46 variable expressions + DXF sketches drive everything except the gear). Then run the feature. It builds at the origin in the same frame the printed parts use: wall face on the XY plane, the 40° sector centred on +X, front face at z = face height.
| Segments (N) | 9 |
| Band inner radius (Ri) | 255 mm |
| Band width (bw) | 30 mm |
| Nominal module | 5.6 mm |
| Face height (gear_F) | 9.5 mm — ceiling ≈ 9.83, see step 06 |
| Pressure angle | 20° |
| Spiral angle | 0° (straight) |
| Full ring (all N sectors) | ☐ |
- Accept the defaults (they are the shipped Rev B.3 build) → OK. A notice reports the derived numbers — tooth count, flush module, tip radii, and the pinion centre distance C.
- Position your segment so its flat bottom is on XY with the sector centred on +X (that's the repo's native frame — the DXF sketches import this way), or Transform the band solid to the segment.
- Boolean → Union the band into the segment body. The root circle lands 1 mm inside the band OD, so the union is watertight by construction — teeth rise straight off the band's outer wall, no gap, exactly like the printed part.
Halo Beveloid Pinion — the mate
Same dialog family, plus drive-side hardware: a big-end hub and a D-shaft bore sized for the 22PG-2430BL gearmotor's 4 mm D-shaft (catalog-typical — measure the purchased unit). Rev B.5: the pinion is the CROSSED-drive 20T cone (Ø9.9→Ø25.3 tips, apex toward the halo centre) — small on purpose; only the tooth count is forced by the 5.4:1 ratio, and rho 8 at 20T sits right on the 0.8 mm section-module print floor.
| Ring parameters (N, Ri, bw, module, face) | match the band exactly |
| Backlash | 0.3 mm — keep ≥ 0.3 for printed parts; 0.6 would halve the 0.8-module tooth |
| Hub length | 5 mm (Ø16, wall side) |
| Bore diameter | 4.2 mm |
| D-flat depth | 0.5 mm |
Mating it. The feature reports the small-end ring radius (~298.8) and axis height (~13.6 off the ring's wall plane) at B.5. In an Assembly:
- Insert ring and pinion. Add a Revolute mate on each — the ring about the halo axis, the pinion about a radial axis (vertical at 12 o'clock, shaft pointing down toward the halo centre).
- Position the pinion with its small end at ring radius ~298.8 and its axis ~13.6 mm in front of the ring's wall plane, apex toward the halo centre; the 22PG-2430BL sits directly above on the hub.
- Add a Gear relation between the two revolutes, ratio 5.4:1. Drag the ring: one ring rev per 5.4 pinion revs — ~2 rpm at the sculpture, PWM-dialed via the motor's integrated driver.
segment_stl.py gates remain the authority.Spiral teeth, one slider
Set Spiral angle on both features (same value, and it must match on both). The wall section rotates by tan(spiral) · face / pitch_r — the same twist the Python twist-extrude applies — so the flanks become ruled helicoids and the pair stays complementary.
The repo ships 0° (straight) deliberately: at 0.3 rpm a spiral buys no smoothness, and its ~tan(sp) axial thrust component would fight the idler-groove mount — the ring's only axial restraint. If you want the spiral look, 35° matches the old aesthetic; just know the groove takes the thrust.
The two numbers Onshape can't see
Two halo-level constraints live outside the gear geometry. The features can't enforce them — the Python gates do, on every CI run:
| Constraint | Value @ B.3 | What breaks if violated |
|---|---|---|
| gear_F ceiling — the band face must clear the neighbour wafer's clearance plane over the leading ~15–20° of the sector | ≤ ≈ 9.83 mm (tmin=15) (computed live by gear_F_ceiling()) | The mandatory clearance cut planes the leading teeth to partial height and sheds slivers at the disc rim — the exact regression the repo gates against. |
| Tooth count ≡ 0 (mod N) — enforced by construction here (teeth = tps × N) | 108 = 12 × 9 | The pattern breaks at every segment joint; the ring stops tiling. |
If you explore a different face height or tilt in Onshape, run python3 scripts/segment_stl.py --gear_F <x> before printing — exit 0 with the gate line means the clearance cut removed zero tooth material.
Collaboration: versions, links, and the repo loop
Onshape's collaboration model is what makes the custom-feature route worth it:
- Share the document (Share → email or link). Edits are simultaneous and live — two people can have the same Part Studio open; feature regenerations propagate in real time. No files, no checkouts.
- Version the Feature Studio before you lean on it. Right panel → Versions → create
V1. Custom features referenced from other documents bind to a version, so downstream models never shift under you when the studio changes. - Publish across documents: in any other document, Custom features flyout → Add custom feature → pick your
halo-beveloiddocument at versionV1. Team members can use the features without ever seeing the code. - Branch to experiment: Versions panel → branch a workspace (e.g.
spiral-35), crank the spiral slider, compare, and merge back if it wins — Onshape's branching is real, like git for CAD. - The repo loop: the git repo stays the source of truth for printed parts. Check your Onshape rebuild against the shipped solids by importing
stl/step/segment.stp(view-only reference), or export your Part Studio STL intostl/my_frame_segment.stl—viewer_export.pycarries it through to the web viewer as a compare overlay (mis-orientation warns, never gates). - Update path: when the repo's gear parameters change, this page's crib numbers and the FS defaults are regenerated together — diff
scripts/onshape/wafer_halo_beveloid.fs, paste the new version into the Feature Studio, commit, createV2, and re-point consumers when ready.