Paracord Lanyard Bead
A bead for 4 mm paracord lanyards, zipper pulls and knife fobs with a choice of three computed surface patterns: a cut-gem body made of three polygonal bands of flat facets, a barrel with half-round ring grooves, or a cylinder with crossed helical grooves that form a diamond knurl. The hole is round for one strand or an oval for two strands side by side, with a small lead-in at both mouths, and the model checks with cord probes that the strands pass and that at least 1.2 mm of wall is left beside the hole. The default bead is 15 x 15 x 16 mm with a 4.7 mm hole. Print it upright with one flat end on the bed, no supports. Cord diameter, strand count, bead diameter and length, end face size, number of facet sides, ring count, knurl starts and angle, and groove depth can all be changed; the knurl style takes about a minute to build.
# Paracord Bead - lanyard bead for 4 mm cord with a computed surface pattern
#
# How it is used: thread one strand through the round hole, or set `strands` to 2
# for an oval hole that takes both ends of a lanyard loop side by side. Tie a
# stopper knot under the bead. `style` picks the surface: "facets" is a cut-gem
# body made of three polygonal bands, "grooves" a barrel with ring grooves,
# "knurl" a cylinder with crossed helical grooves (a diamond knurl).
#
# Print orientation: as modelled, hole upright, one flat end on the bed. No
# supports: the steepest overhang is the 45 deg end chamfer.
@param choices:["facets", "grooves", "knurl"] desc:"Surface pattern"
$style = "facets"
@param 2..6 step:0.5 group:"Cord" desc:"Cord diameter (mm), 4 for 550 paracord"
$cord_d = 4
@param 1..2 step:1 group:"Cord" desc:"Strands through the hole, side by side"
$strands = 1
@param 0.3..1.5 step:0.1 group:"Cord" desc:"Hole diameter minus cord diameter (mm)"
$play = 0.7
@param 10..30 step:0.5 group:"Bead" desc:"Bead diameter at the middle (mm), across flats for facets"
$bead_d = 15
@param 8..40 step:0.5 group:"Bead" desc:"Bead length along the cord (mm)"
$length = 16
@param 0.6..0.9 step:0.01 group:"Bead" desc:"End face diameter as a fraction of the bead diameter"
$end_frac = 0.76
@param 5..12 step:1 group:"Pattern" desc:"facets: sides of each band"
$sides = 8
@param 1..8 step:1 group:"Pattern" desc:"grooves: number of ring grooves"
$rings = 4
@param 6..24 step:1 group:"Pattern" desc:"knurl: helical grooves in each direction"
$starts = 12
@param 15..60 step:1 group:"Pattern" desc:"knurl: groove angle from the cord axis (deg)"
$knurl_angle = 30
@param 0.4..1.2 step:0.1 group:"Pattern" desc:"grooves and knurl: groove depth (mm)"
$groove = 0.7
# --- Derived ---------------------------------------------------------------
$r = $bead_d / 2 # middle radius
$re = $r * $end_frac # end face radius
$hole_d = $cord_d + $play
$hr = $hole_d / 2
$off = ($strands - 1) * $cord_d / 2 # oval hole: centres of its two end circles
$half_slot = $off + $hr # the hole reaches this far from the axis
$lead_in = 0.5 # 45 deg lead-in at both hole mouths
$mid = $length / 2
# --- Hole: round, or an oval for two strands; widened at both mouths ----------
$slot2d = if $strands == 1 then circle $hr else ((circle $hr at:(-$off, 0)) + (circle $hr at:($off, 0)) + (rect (2 * $off) $hole_d))
$mouth = $slot2d | offset $lead_in | extrude ($lead_in + 0.01) draft:45 | translate 0 0 -0.01
$mouth_top = $mouth | mirror "Z" | translate 0 0 $length
$bore = ($slot2d | extrude ($length + 2) | translate 0 0 -1) + $mouth + $mouth_top
# --- facets: a prism band between two pyramid bands turned half a step ---------
# every face is a plane; the prism's flats are bead_d apart, the pyramids meet it
# at the edge of the middle band and end on a polygon of apothem re
$band = 0.3 * $length # height of the middle band where the pyramids reach the prism
$slope = atan(($r - $re) / ($mid - $band / 2))
$a0 = $re + $length * tan($slope) # pyramid apothem at its base
$cosn = cos(180 / $sides)
$prism = polygon $sides ($r / $cosn) angle:(180 / $sides) | extrude $length
$pyr_up = polygon $sides ($a0 / $cosn) | extrude $length draft:$slope
$pyr_dn = $pyr_up | mirror "Z" | translate 0 0 $length
def faceted($k) = ($prism * $pyr_up) * $pyr_dn
# --- grooves: barrel (one arc through end, middle, end) minus half-round rings --
$sag = $r - $re
$arc_r = ($mid * $mid + $sag * $sag) / (2 * $sag)
def barrel_r($z) = $r - $arc_r + sqrt($arc_r * $arc_r - ($z - $mid) * ($z - $mid))
$barrel = workplane XZ | sketch [(0, 0), ($re, 0), arc ($re, 0) ($r, $mid) ($re, $length), (0, $length)] | revolve Z
$ring_pitch = 0.74 * $length / $rings
def ring_z($j) = $mid + ($j - ($rings - 1) / 2) * $ring_pitch
def ring($j) = torus barrel_r(ring_z($j)) $groove | translate 0 0 ring_z($j)
def grooved($k) = $barrel | diff (union [ring($j) for $j in range($rings)])
# --- knurl: chamfered cylinder minus right- and left-hand helical grooves ------
$cham = $r - $re
$drum = workplane XZ | sketch [(0, 0), ($re, 0), ($r, $cham), ($r, $length - $cham), ($re, $length), (0, $length)] | revolve Z
$lead = 2 * pi * $r / tan($knurl_angle) # rise of one full turn
def one($k) = helix $lead ($length + 2) $r | sweep (circle $groove) | translate 0 0 -1
def right_set($k) = one(0) | polar $starts 0 orient:true
def left_set($k) = right_set(0) | mirror "X"
def knurled($k) = ($drum - right_set(0)) - left_set(0)
# --- Pick the style (the patterns are functions, so only the chosen one is built) ---
$blank = if $style == "facets" then $prism else (if $style == "grooves" then $barrel else $drum)
$body = if $style == "facets" then faceted(0) else (if $style == "grooves" then grooved(0) else knurled(0))
$bead = $body - $bore
# thinnest wall beside the hole: at the end face, or under the outermost groove
$end_wall = $re - $half_slot
$ring_wall = barrel_r(ring_z(0)) - $groove - $half_slot
$knurl_wall = $r - $groove - $half_slot
$wall = if $style == "facets" then $end_wall else (if $style == "grooves" then min($end_wall, $ring_wall) else min($end_wall, $knurl_wall))
assert $wall - $lead_in >= 0.8 # flat rim left on the end face outside the lead-in
assert $wall >= 1.2 # printable wall everywhere beside the hole
assert $length >= 2 * $half_slot * 0.6
assert ring_z(0) - $groove >= 1 # grooves stay clear of the end faces
assert $ring_pitch >= 2 * $groove + 0.8
assert 2 * pi * $r / $starts >= 2 * $groove + 0.6 # knurl: a land is left between grooves
assert $bead.solids == 1
assert $bead.valid
assert $bead.bbox.z ~ $length tol:0.01
assert $bead.bbox.min[2] ~ 0 tol:0.001
assert $bead.bbox.x <= $bead_d / $cosn + 0.01
assert $bead.bbox.x >= $bead_d - 2 * $groove - 0.01
assert $body.volume < $blank.volume * 0.99 # the pattern really cut something
assert $bead.volume < $body.volume - 0.9 * $length * pi * $hr * $hr # the hole is through
# --- Fit, checked with cord probes -------------------------------------------
def cord($dia, $x) = cylinder ($dia / 2) ($length + 10) | translate $x 0 $mid
$cords = if $strands == 1 then cord($cord_d, 0) else (cord($cord_d, -$off) + cord($cord_d, $off))
assert clear($cords, $bead) # the strands pass
assert clear(cord($hole_d + 0.3, $off), $bead) == false # and the hole is the computed size
assert clear(cord($hole_d - 0.05, $off), $bead)
print "bead" $bead.bbox "style" $style
print "hole (mm)" $hole_d "x" (2 * $half_slot) "thinnest wall beside it (mm)" $wall
$bead