Add Veer clip

This commit is contained in:
Stefan Thoss
2026-11-20 19:23:48 -08:00
parent 442f846690
commit 1b5d57a3c6
5 changed files with 7669 additions and 0 deletions
+267
View File
@@ -0,0 +1,267 @@
// Vee-wagon beam clip — a C-shaped collar that wraps the octagonal beam
// section and carries a small integral loop for hanging things.
//
// See design-drawing.jpg. The pencil octagon is the beam cross-section:
// 24 mm across the narrow flats, 33 mm across the tall ones, with corner
// chamfers of about 4 x 9 mm (that is what the drawn 16 mm and 15 mm flats
// work out to). The marker line is the clip: it hugs three and a quarter
// sides of that section, opens across the narrow 24 mm direction, and
// finishes in a curled loop on the lower-left chamfer.
//
// Model space: Z = the beam axis, so the part comes off the bed in its
// print orientation — profile in XY, band standing up along Z.
// -Y = open (gap) side, +Y = closed back. The loop is not a separate boss:
// it is the band's own end curled over, tangent to the band's centreline.
//
// Why the section is octagonal and not round: a load on the loop pulls
// radially, which tries to rotate the clip about the beam axis. The flats
// react that torque, so the clip cannot spin — no screw, no glue.
// A load also stays inside the printed layers (it pulls along XY, never
// perpendicular to a bond line), which is the strong direction for FDM.
//
// Mounting — the beam has no free end, so the clip goes on sideways across the
// 24 mm flats and `gap` sets the bite: 23.8 presses on, 24.4 slips on.
// `grip` would hook the plain tail behind the flat for a captive fit, but then
// the opening ends up narrower than the section and the clip could only be
// slid on from a free end. Keep it at 0 here.
//
// Prints flat with no supports: every wall is vertical and the tallest
// feature is the band height.
include <BOSL2/std.scad>
/* [Beam] */
// Beam across-flats, narrow direction (X)
beam_w = 23;
// Beam across-flats, tall direction (Y)
beam_h = 33;
// Corner chamfer along X (24 - 2*4 = 16 mm chamfer-free flats)
beam_chamf_x = 4; // [0:0.5:10]
// Corner chamfer along Y (33 - 2*9 = 15 mm chamfer-free flats)
beam_chamf_y = 9; // [0:0.5:14]
// Radial clearance between the beam and the clip bore
fit = 0.3; // [0:0.05:1]
/* [Clip] */
// Band wall thickness, normal to the beam faces
wall = 2; // [1.5:0.25:8]
// Band height along the beam axis
band_h = 10; // [4:1:30]
// How much further the plain tail (the side without the loop) reaches round
// the corner towards the edge of the flat, so it hooks over the section. Any
// more than about 1 mm makes the opening narrower than the section, which means
// the clip can only be slid on from a free end of the beam — this beam has
// none, so leave this at 0 and take the grip from `gap` instead.
grip = 0; // [0:0.5:8]
// Flex clearance between the two ends of the opening on the -Y side.
// 23.8 the band presses on with 0.2 mm of bite
// 24.4 loose: rock free, and free to slide along the beam
// 0 no opening at all, a plain collar (strongest)
// Open this up in 0.2 mm steps if the clip will not seat.
gap = 23.8; // [0:0.2:34]
/* [Loop] */
// Loop overall width across the curl (10 mm on the drawing)
loop_d = 10; // [8:0.5:20]
// Throat between the hook's tip and the band — how big a thing you can slip
// on. 0 closes the crook into a ring instead.
mouth = 5; // [0:0.5:9]
// Which face of the section the loop grows off, as the outward normal angle of
// that face: 205 = the lower chamfer it continues, 180 = the narrow flat. The
// nearest face is used and the hook squares up to it.
loop_ang = 205; // [0:5:355]
// Slide the loop along that face: 0 centres it on the face, + is towards the
// opening, - is away from it.
loop_off = 2; // [-12:0.5:12]
// Which way the curl winds: 1 lays the throat back along the band towards the
// section, as drawn; -1 mirrors it to the other side.
hook_dir = 1; // [1,-1]
// How far before the tip the ribbon tapers to its point
hook_taper = 40; // [0:5:90]
/* [Hidden] */
// Preview aid: draw the beam in the render so the fit can be eyeballed.
// Leave off when exporting for the slicer.
show_beam = false;
$fn = 256;
epsilon = 0.01;
layer_height = 0.2; // general utility print; not a Customizer parameter
// The only dimension that prints along the build axis — snap it to layers.
band_h_l = ceil(band_h / layer_height) * layer_height;
// Round for display in the echoes below (BOSL2 shadows round()'s 2-arg form).
function r1(v) = round(v*10)/10;
function r2(v) = round(v*100)/100;
// Octagon: across-flats w x h, corners cut back chx x chy.
function octagon(w, h, chx, chy) = [
[-w/2 + chx, h/2],
[ w/2 - chx, h/2],
[ w/2, h/2 - chy],
[ w/2, -h/2 + chy],
[ w/2 - chx, -h/2],
[-w/2 + chx, -h/2],
[-w/2, -h/2 + chy],
[-w/2, h/2 - chy],
];
// Bore = beam section grown by the clearance on every face.
hw = beam_w / 2 + fit;
hh = beam_h / 2 + fit;
chx = beam_chamf_x + fit;
chy = beam_chamf_y + fit;
BORE = octagon(2*hw, 2*hh, chx, chy);
// Outer contour = bore pushed out by the wall, joins rounded off by the same
// amount so the band has no sharp outer corners.
OUTER = offset(BORE, delta=wall, closed=true);
// Each bore face as [outward normal angle, distance from the beam centre].
FACES = [
for (i = idx(BORE))
let(p1 = BORE[i], p2 = BORE[(i + 1) % len(BORE)], e = p2 - p1,
n = unit([-e.y, e.x]))
[atan2(n.y, n.x), p1 * n]
];
// How far out the bore is along a ray at `ang`.
function ray_out(faces, ang) =
min([for (f = faces) let(c = cos(ang - f[0])) c > 1e-6 ? f[1] / c : 1e9]);
// The hook is the band's own end curled into a crook: the ribbon is the band's
// thickness and its centreline is tangent to the band's centreline, so the two
// read as one stroke and the root cross-section lines up exactly with the
// band's. The crook starts where it meets the band and sweeps round until the
// tip is `mouth` away from it, which is what sets the sweep:
// throat = 2 * hook_ri * sin(sweep_shortfall / 2)
hook_ro = loop_d / 2; // curl outside
hook_ri = hook_ro - wall; // curl inside; ribbon = the band
hook_rc = hook_ro - wall / 2; // curl centreline
hook_tp = mouth > 0 ? hook_taper : 0;
hook_dw = mouth > 0 ? 2 * asin(min(0.98, mouth / (2 * hook_ri))) : 0;
hook_span = 360 - hook_dw; // the ribbon's sweep
// The face the hook grows off. `loop_ang` only *picks* the face; the hook then
// squares up to that face's own normal. The root has to be anchored on the
// face itself rather than on the foot of the perpendicular from the beam
// centre: that foot falls off the end of a chamfer, which put the root on the
// bore's corner and made the band's end cut slice diagonally through it.
face_off = [for (f = FACES) abs(((f[0] - loop_ang + 540) % 360) - 180)];
face_i = [for (i = idx(face_off)) if (face_off[i] == min(face_off)) i][0];
hook_ang = FACES[face_i][0]; // the face's own normal angle
hook_n = [cos(hook_ang), sin(hook_ang)];
hook_t = [cos(hook_ang + 90), sin(hook_ang + 90)];
// The root is a point on the face, slid along it by `loop_off`, so the ribbon's
// root cross-section lands exactly in the band's wall.
hook_root = (BORE[face_i] + BORE[(face_i + 1) % len(BORE)]) / 2
+ hook_t * loop_off;
loop_c = hook_root + hook_n * (wall / 2 + hook_rc);
loop_nd = hook_root * hook_n;
hook_a0 = hook_ang + 180; // where the ribbon meets the band
function hook_out_r(a) =
hook_ro - (hook_tp > 0
? (hook_ro - hook_ri - 0.8)
* min(1, max(0, (a - (hook_span - hook_tp)) / hook_tp))
: 0);
// The crook's outline: out along the curl tapering into the tip, back along
// the barrel, closed off flat where it runs into the band.
hook_seg = ceil(hook_span / 2);
HOOK = [
for (i = [0 : hook_seg])
let(a = hook_span * i / hook_seg)
loop_c + polar_to_xy(hook_out_r(a), hook_a0 - hook_dir * a),
for (i = [hook_seg : -1 : 0])
let(a = hook_span * i / hook_seg)
loop_c + polar_to_xy(hook_ri, hook_a0 - hook_dir * a)
];
// The opening keeps its `gap` flex clearance but is shifted over by `grip`
// towards the loop, which leaves the plain tail hooked under the flat.
open_l = -(gap / 2 + grip); // x of the opening's loop-side face
open_r = gap / 2 - grip; // x of the plain tail's inner face
cut_h = beam_h + 2 * wall;
echo(str("Beam section: ", beam_w, " x ", beam_h, " mm, chamfer ",
beam_chamf_x, " x ", beam_chamf_y, " -> flats ",
beam_w - 2*beam_chamf_x, " / ", beam_h - 2*beam_chamf_y, " mm"));
echo(str("Bore: ", 2*hw, " x ", 2*hh, " mm. Band ", wall, " mm thick x ",
band_h_l, " mm high = ", band_h_l/layer_height, " layers"));
echo(str("Opening ", gap, " mm -> ", gap == 0 ? "no opening, plain collar" :
gap > beam_w ? str(r2(gap-beam_w), " mm clearance") :
gap < beam_w ? str(r2(beam_w-gap), " mm bite") :
"zero clearance",
grip > 0 ? str("; tail reaches ", grip, " mm further round the corner",
" (needs a free end to mount)") :
" presses on sideways across the flats"));
echo(str("Hook: ", loop_d, " mm across a ", wall, " mm ribbon, ",
r2(2*hook_ri), " mm barrel, ", r1(hook_span), " deg of curl, ",
mouth > 0 ? str(mouth, " mm throat") : "closed ring",
" centred ", r1(loop_c.x), ", ", r1(loop_c.y),
" (", r1(loop_nd + wall/2 + hook_rc), " mm out, tangent to the band)"));
// Flat profile of the clip, then one extrusion along the beam axis.
module clip_profile() {
difference() {
union() {
// Band: an octagonal sleeve, opened up on the -Y side. Shifting
// the opening towards the loop lets the plain tail reach further
// round the corner by `grip`.
difference() {
polygon(OUTER);
polygon(BORE);
if (gap > epsilon) {
// square() is anchored on its low corner, so the cutter
// reaches from the bore's -Y face out past the part.
translate([open_l - epsilon, -hh - cut_h])
square([gap + 2*epsilon, cut_h]);
}
// Stop the band dead at the hook's root so nothing carries on
// past the curl. Two things to get right here: a flat cut
// leaves the band's end wall standing outboard of the curl as a
// loose-looking tab (the curl only reaches the band's outer face
// 4 mm further along), and cutting to the curl's *circle* leaves
// a crescent of band by the bore that ends in a barb, because
// that circle is tangent to the bore side. So keep exactly the
// ribbon's own footprint, grown by half an epsilon to keep the
// union off coincident faces.
difference() {
translate(hook_root) rotate(hook_ang + 90)
translate([0, -(wall + 8)])
square([beam_h, wall + 9]);
polygon(offset(HOOK, delta=epsilon/2, closed=true));
}
}
// The hook: the band's end curled into a crook, tangent to the
// band's centreline so the two read as one stroke.
polygon(HOOK);
}
// Nothing may stand inside the beam's envelope.
polygon(BORE);
}
}
// The clip: the profile swept along the beam axis by the band height.
module clip() {
linear_extrude(band_h_l)
clip_profile();
}
// The beam itself, for in-context checking only — never print this.
module beam() {
color("tan")
linear_extrude(band_h_l + 20, center=true)
polygon(octagon(beam_w, beam_h, beam_chamf_x, beam_chamf_y));
}
// One object for the slicer
union() {
clip();
}
// Beam in context, for previewing the fit only.
if (show_beam) {
beam();
}