The Smell of Molten Projects in the Morning

Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.

Category: Recumbent Bicycling

Cruisin’ the streets

  • Sunglass Earpiece Trimming

    Mary doesn’t like wearing the wrap-around-her-head earpieces found on sunglasses these days under her bicycle helmet, so I must trim them to fit:

    Sunglass earpiece trim
    Sunglass earpiece trim

    Perhaps I won’t need an old pair to prepare the next set: a scant four inches from the hinge.

  • Burnett Blvd at Rt 55: Passing on the Right, Redux

    As usual, we’re at the Rt 55 end of Burnett Blvd, returning home from a grocery trip; I’m hauling two full bags of chow in the trailer. The white car pulling up immediately to our left will make a left turn from the left lane:

    Burnett at Rt 55 - Right Pass - 2017-09-19 - 01
    Burnett at Rt 55 – Right Pass – 2017-09-19 – 01

    The more distant white car, turning left out of Overocker, is eases past us in the right lane to make a right turn:

    Burnett at Rt 55 - Right Pass - 2017-09-19 - 02
    Burnett at Rt 55 – Right Pass – 2017-09-19 – 02

    We’re on the left side of the right lane, rather than the right, to avoid right hook collisions with drivers who flat-out do not stop before turning. Been there, had that happen, we know better.

    The car approaching in the right lane will attempt to pass us on the right:

    Burnett at Rt 55 - Right Pass - 2017-09-19 - 03
    Burnett at Rt 55 – Right Pass – 2017-09-19 – 03

    That’s happened before, too, so I’m watching this happen in  my mirror. My line will pass to the right of the inconveniently placed manhole cover in the intersection:

    Burnett at Rt 55 - Right Pass - 2017-09-19 - 04
    Burnett at Rt 55 – Right Pass – 2017-09-19 – 04

    Mary’s nearing the right side of the lane, I’m in the middle, and the driver jams to a stop rather than run up over the sidewalk:

    Burnett at Rt 55 - Right Pass - 2017-09-19 - 05
    Burnett at Rt 55 – Right Pass – 2017-09-19 – 05

    The passenger window is rolling down, which is always a Bad Sign:

    Burnett at Rt 55 - Right Pass - 2017-09-19 - 06
    Burnett at Rt 55 – Right Pass – 2017-09-19 – 06

    It’s all the way down and I know what’s about to happen:

    Burnett at Rt 55 - Right Pass - 2017-09-19 - 07
    Burnett at Rt 55 – Right Pass – 2017-09-19 – 07

    So I preempt the discussion by pointing out she was passing in an intersection and the license plate on the silver Chevy say FEX-4194:

    Burnett at Rt 55 - Right Pass - 2017-09-19 - 08
    Burnett at Rt 55 – Right Pass – 2017-09-19 – 08

    She passes Mary and stops directly ahead of us in the middle of the right-hand lane. We jam to a stop behind her. The black car approaching us swerves into the middle lane:

    Burnett at Rt 55 - Right Pass - 2017-09-19 - 09
    Burnett at Rt 55 – Right Pass – 2017-09-19 – 09

    She pulls around the corner onto Manchester and stops in the intersection. I stop well behind her to remain visible from Rt 55, which turns out to be a Good Idea:

    Burnett at Rt 55 - Right Pass - 2017-09-19 - 10
    Burnett at Rt 55 – Right Pass – 2017-09-19 – 10

    Mary eases beside the drivers window, which rolls down. The driver says she’s going to call the police, “because we pulled directly in front of her”. Mary points out we have video of the entire encounter. The window rolls up and the driver pulls away.

    Overocker, Burnett, and a short sprint on Rt 55 to Manchester is the only route from the grocery store to Rt 376 and home, so it’s not like we’re looking for trouble.

    No helmet camera video, alas, because I tried those piece-of-crap Wasabi batteries in the Sony HDR-AS30V and the second one was flat-out dead. The first one, in the camera when I left home, showed empty after the half-hour ride to the grocery store, so they really are junk; “Premium Japanese cells” my foot.

  • Tour Easy Headset Wrench

    The headset on my Tour Easy ‘bent worked its way loose, which led to a disturbing discovery: the headset wrench I made from a discarded flat wrench vanished with the shop tools donated to MakerSmiths.

    Fortunately, we live in the future:

    Tour Easy Headset Wrench - Slic3r preview
    Tour Easy Headset Wrench – Slic3r preview

    A thin plastic wrench is absolutely no good for torquing down the locknut, but that’s not what it’s for. Adjust the bearing race to the proper preload with this wrench, hold it in place, then torque the locknut with the BFW.

    The OpenSCAD source code as a GitHub Gist:

    // Tour Easy Headset Wrench
    // Ed Nisley KE4ZNU – September 2017
    /* [Extrusion] */
    ThreadThick = 0.25; // [0.20, 0.25]
    ThreadWidth = 0.40; // [0.40]
    function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit);
    Protrusion = 0.01; // [0.01, 0.1]
    HoleWindage = 0.2;
    //- Sizes
    /* [Dimensions] */
    WrenchSize = 32.0; // headset race across-the-flats size
    NumFlats = 8;
    JawWidth = 10.0;
    JawOD = 2*JawWidth + WrenchSize;
    echo(str("Jaw OD: ",JawOD));
    StemOD = 23.0;
    WrenchThick = 5.0;
    HandleLength = 2*JawOD;
    HandleWidth = 25.0;
    //- Build things
    difference() {
    linear_extrude(height=WrenchThick,convexity=4) {
    hull() { // taper wrench body to handle
    circle(d=JawOD);
    translate([0.75*JawOD,0,0])
    circle(d=HandleWidth);
    }
    hull() { // handle
    translate([0.75*JawOD,0,0])
    circle(d=HandleWidth);
    translate([HandleLength,0,0])
    circle(d=HandleWidth);
    }
    }
    translate([0,0,-Protrusion])
    rotate(1*180/NumFlats) { // cosine converts across-flats to circle dia
    cylinder(d=WrenchSize/cos(180/NumFlats),h=(WrenchThick + 2*Protrusion),$fn=NumFlats);
    }
    translate([-StemOD,0,WrenchThick/2])
    cube([2*StemOD,StemOD,(WrenchThick + 2*Protrusion)],center=true);
    translate([WrenchSize,0,WrenchThick – 3*ThreadThick])
    linear_extrude(3*ThreadThick + Protrusion,convexity=10)
    text(text=str("TE Headset"),size=8,spacing=1.20,font="Arial",halign="left",valign="center");
    }

    Now, I’d like to say that was easy, but in actual point of fact …

    First, I forgot to divide by cos(180/6) to convert the across-the-flats size to the diameter of OpenSCAD’s circumscribed hexagon-as-circle, which made the wrench uselessly small:

    Tour Easy Headset Wrench - v1
    Tour Easy Headset Wrench – v1

    If you have a 28 mm nut with low torque requirements, though, I’ve got your back.

    While I had the hood up, I slenderized the handle into a much shapelier figure:

    Tour Easy Headset Wrench
    Tour Easy Headset Wrench

    Trotting off to the garage with a warm plastic wrench in hand, I discovered the blindingly obvious fact that the headset nuts have eight sides. On the upside, the number of sides became a parameter, so, should you happen to need a five-sided wrench (perhaps on Mars), you can have one.

    So, yeah, it’s rapid prototyping in full effect:

    Tour Easy Headset Wrench Iterations
    Tour Easy Headset Wrench Iterations

    Remember, kids, never design while distracted …

  • Sharing the Road on Raymond Avenue: Passing into the Roundabout

    We’re approaching the Vassar Main gate roundabout on Raymond Avenue. I’m signaling for the middle of the lane, which involves extending my left arm straight out and pointing downward:

    Raymond Avenue - Passing at Main Gate 1 rear - 2017-08-31
    Raymond Avenue – Passing at Main Gate 1 rear – 2017-08-31

    Evidently, the driver figures he can get past us into the roundabout, missing my hand by maybe a foot:

    Raymond Avenue - Passing at Main Gate 2 - 2017-08-31
    Raymond Avenue – Passing at Main Gate 2 – 2017-08-31

    Six seconds later, we’re all stopped, because the planter in the middle of the roundabout is designed to hide the oncoming traffic and make you slow down:

    Raymond Avenue - Passing at Main Gate 1 - 2017-08-31
    Raymond Avenue – Passing at Main Gate 1 – 2017-08-31

    I’m getting more assertive about moving leftward before we enter the approach, but obviously I’m not quite far enough over.

    So it goes.

  • Wasabi NP-BX1 Batteries: Consistent FAIL

    The replacement NP-BX1 batteries arrived and, as I expected, perform just as badly as the previous pair:

    Sony NP-BX1 - Wasabi GHIJK - 2017-09-01 - annotated
    Sony NP-BX1 – Wasabi GHIJK – 2017-09-01 – annotated

    The note I sent to Wasabi’s tech support summarizes the details:

    The second pair of NP-BX1 batteries are just as bad as the first two. In fact, all four perform worse than the nearly two-year-old Wasabi batteries I’ve been using.

    The graph shows the test results from my CBA III analyzer. All batteries were all charged in a Wasabi wall charger.

    The top solid red curve shows the as-delivered performance in late 2015 for the battery I labeled “G”, tested at 500 mA. It delivered only 1 Ah, not the claimed 1.6 Ah, even at that relatively low current, but has delivered over one hour of service in the camera.

    The top dotted-blue curve shows the as-delivered performance for the NEW battery I labeled “J”, also tested at 500 mA. It delivers only 0.88 Ah, 55% of the claimed 1.6 Ah, at a much lower voltage while discharging.

    After two years, OLD battery “G” has more capacity and a higher voltage than the NEW battery “J”!

    The lower curves shows the results for the four most recent batteries I labeled H I J K, all tested at 1 A to better match the camera’s actual current; the dotted traces mark the second test of each battery.

    The orange traces show battery K has about 0.77 Ah of capacity, less than half of the claimed 1.6 Ah and much worse than the others.

    I also re-tested battery old battery G at 1 A, as shown by the dotted red curve labeled “G:2017-09”. It outperforms ALL of the new batteries!

    Batteries H and I have date codes BQF22, which I interpret as 2017-06-22: fairly recent stock.

    Batteries J and K have date codes BPL28: 2016-12-28. They’ve been sitting around for a while, which may account for the poor performance of battery K.

    These Wasabi batteries cost roughly twice (*) as much as they did in late 2015, have /much/ lower capacity, and, to judge from the date codes, they’ve been consistently poor since late last year.

    What is going on?

    It’s worth noting that Wasabi NP-BX1 batteries are currently $16 for the pair on Amazon and were $9 in late 2015. Allegedly genuine Sony NP-BX1 batteries run $50 MSRP and a suspiciously consistent $37.99 from all the usual big-box sources, including Amazon, where they’re out-of-stock for the next few months. Combining the number of counterfeits in the supply chain with Amazon’s commingled SKU stock bins, I have my doubts about what I’d get by increasing my battery spend by a factor of five.

    I think it’s about time to conjure an external 18650 holder / helmet mount for that camera and be done with it.

    [(*) Edit: I screwed up the unit of measure: the old invoice had two single batteries. The new order was one pair, so I now pay slightly less for much worse performance. A refund is wending its way through the system.]

  • Sharing the Road on Raymond: Friend or Foe?

    A silver Honda Accord Civic (NY HLS-3678) passed me on Raymond, just before the Vassar Main Gate roundabout, with about as much clearance as one might expect:

    Raymond - Passing 2017-08-30 - 1
    Raymond – Passing 2017-08-30 – 1

    I noodled along Raymond at 18 mph and the car pulled ahead at the usual 30 to 40 mph. Just after the College Avenue roundabout, the car pulled off to the right, as if to park, but continued rolling slowly and I gave it plenty of clearance:

    Raymond - Passing 2017-08-30 - 2
    Raymond – Passing 2017-08-30 – 2

    The car immediately pulled out into the lane, directly in front of the Escalade that’s been following me at a courteous distance since the Main Gate roundabout, and pulled up close behind me, which immediately put me at DEFCON 3. Basically, drivers get exactly one bite at my apple; anyone who deliberately passes me a second time is likely up to no good.

    As always, I signal and take the lane going into the Collegeview Avenue roundabout, still at 18-ish mph, whereupon the driver lays on the horn rather heavily. Apparently, he intended to accelerate past me into the roundabout, but I got in the way:

    Raymond - Passing 2017-08-30 - 2r
    Raymond – Passing 2017-08-30 – 2r

    I’m now cranking 20 mph. A block later, the car passes me, rather closely this time:

    Raymond - Passing 2017-08-30 - 3
    Raymond – Passing 2017-08-30 – 3

    Maybe this is a friendly wave, but the horn thing suggests otherwise and, in any event, it’s hard to tell in real time running:

    Raymond - Passing 2017-08-30 - 4
    Raymond – Passing 2017-08-30 – 4

    At this point, I presume he’s gesturing me to GTFO the road:

    Raymond - Passing 2017-08-30 - 5
    Raymond – Passing 2017-08-30 – 5

    And we part company:

    Raymond - Passing 2017-08-30 - 6
    Raymond – Passing 2017-08-30 – 6

    Raymond Avenue would be a lot more bicycle-friendly without some of the drivers …

  • Tour Easy Daytime Running Light: Now with Chirality!

    In the unlikely event our bikes need two running lights or, perhaps, a running light and a headlight, the solid model now builds mounts for the right side of the fairing, as before:

    Fairing Flashlight Mount - Right side - solid model
    Fairing Flashlight Mount – Right side – solid model

    And for the left side:

    Fairing Flashlight Mount - Left side - solid model
    Fairing Flashlight Mount – Left side – solid model

    Ahhh, chirality: love that word.

    Those pix come from a cleaned-up version of the OpenSCAD code that finally gets the 3-axis rotations right, after a rip-and-replace rewrite to deliver the ball model with its origin in the center of the ball where it belonged and rotate the ring about its geometric center. Then the rotations become trivially easy and a slight hack job spits out a completely assembled model:

    if (Component == "Complete") {
      translate([-BracketHoleOC,0,0])
        PlateBlank();
      mirror(TiltMirror) {
        translate([0,0,ClampOD/2]) {
          rotate([-Roll,ToeIn,Tilt])
            SlotBall();
          rotate([-Roll,ToeIn,Tilt])
            BallClamp();
        }
      }
    }
    

    However, putting the center of rotation directly over the center of the base plate means the ToeIn rotation shifts the bottom of the clamp ring along the X axis, where it can obstruct the mounting holes. Shifting the ring by a little bit:

    ClampOD*sin(ToeIn/2)

    … keeps the ring more-or-less centered on the top of the plate. That’s not quite the correct geometry, but it’s close enough for the small angles needed here.

    Aiming the beam slightly higher makes a 400 lumen flashlight about as bright as any single LED in new car running lights:

    Fairing Flashlight Mount - Mary approaching
    Fairing Flashlight Mount – Mary approaching

    You can just barely make out the snazzy new blue plate on the left side of the fairing.

    A bike’s natural back-and-forth handlebar motion sweeps the beam across the lane, so I think there’s no real benefit from blinking.

    The OpenSCAD source code as a GitHub Gist:

    // Tour Easy Fairing Flashlight Mount
    // Ed Nisley KE4ZNU – July 2017
    // August 2017 –
    /* [Build Options] */
    FlashName = "AnkerLC40"; // [AnkerLC40,AnkerLC90,J5TactV2,InnovaX5]
    Component = "Complete"; // [Ball, BallClamp, Mount, Plates, Bracket, Complete]
    Layout = "Show"; // [Build, Show]
    Support = false;
    MountSupport = false;
    /* [Extrusion] */
    ThreadThick = 0.25; // [0.20, 0.25]
    ThreadWidth = 0.40; // [0.40]
    function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit);
    Protrusion = 0.01; // [0.01, 0.1]
    HoleWindage = 0.2;
    /* [Fairing Mount] */
    Side = "Right"; // [Right,Left]
    ToeIn = 0; // inward from ahead
    Tilt = 15; // upward from forward (M=20 E=15)
    Roll = 0; // outward from top
    //- Screws *c
    /* [Hidden] */
    ID = 0;
    OD = 1;
    LENGTH = 2;
    /* [Screws and Inserts] */
    ClampInsert = [3.0,4.2,8.0];
    ClampScrew = [3.0,5.9,35.0]; // thread dia, head OD, screw length
    ClampScrewWasher = [3.0,6.75,0.5];
    ClampScrewNut = [3.0,6.1,4.0]; // nyloc nut
    /* [Hidden] */
    F_NAME = 0;
    F_GRIPOD = 1;
    F_GRIPLEN = 2;
    LightBodies = [
    ["AnkerLC90",26.6,48.0],
    ["AnkerLC40",26.6,55.0],
    ["J5TactV2",25.0,30.0],
    ["InnovaX5",22.0,55.0]
    ];
    //- Fairing Bracket
    // Magic numbers taken from the actual fairing mount
    /* [Hidden] */
    inch = 25.4;
    BracketHoleOD = 0.25 * inch; // 1/4-20 bolt holes
    BracketHoleOC = 1.0 * inch; // fairing hole spacing
    // usually 1 inch, but 15/16 on one fairing
    Bracket = [48.0,16.3,3.6 – 0.6]; // fairing bracket end plate overall size
    BracketHoleOffset = (3/8) * inch; // end to hole center
    BracketM = 3.0; // endcap arc height
    BracketR = (pow(BracketM,2) + pow(Bracket[1],2)/4) / (2*BracketM); // … radius
    //- Base plate dimensions
    Plate = [100.0,30.0,6*ThreadThick + Bracket[2]];
    PlateRad = Plate[1]/4;
    RoundEnds = true;
    echo(str("Base plate thick: ",Plate[2]));
    //- Select flashlight data from table
    echo(str("Flashlight: ",FlashName));
    FlashIndex = search([FlashName],LightBodies,1,0)[F_NAME];
    //- Set ball dimensions
    BallWall = 5.0; // max ball wall thickness
    echo(str("Ball wall: ",BallWall));
    BallOD = IntegerMultiple(LightBodies[FlashIndex][F_GRIPOD] + 2*BallWall,1.0);
    echo(str(" OD: ",BallOD));
    BallLength = IntegerMultiple(min(sqrt(pow(BallOD,2) – pow(LightBodies[FlashIndex][F_GRIPOD],2)) – 2*4*ThreadThick,
    LightBodies[FlashIndex][F_GRIPLEN]),1.0);
    echo(str(" length: ",BallLength));
    BallSides = 8*4;
    //- Set clamp ring dimensions
    ClampOD = 50;
    echo(str("Clamp OD: ",ClampOD));
    ClampLength = min(20.0,0.75*BallLength);
    echo(str(" length: ",ClampLength));
    ClampScrewOC = IntegerMultiple((ClampOD + BallOD)/2,1);
    echo(str(" screw OC: ",ClampScrewOC));
    TiltMirror = (Side == "Right") ? [0,0,0] : [0,1,0];
    //- Adjust hole diameter to make the size come out right
    module PolyCyl(Dia,Height,ForceSides=0) { // based on nophead's polyholes
    Sides = (ForceSides != 0) ? ForceSides : (ceil(Dia) + 2);
    FixDia = Dia / cos(180/Sides);
    cylinder(r=(FixDia + HoleWindage)/2,h=Height,$fn=Sides);
    }
    //- Fairing Bracket
    // This part of the fairing mount supports the whole flashlight mount
    // Centered on screw hole
    module Bracket() {
    linear_extrude(height=Bracket[2],convexity=2)
    difference() {
    translate([(Bracket[0]/2 – BracketHoleOffset),0,0])
    offset(delta=ThreadWidth)
    intersection() {
    square([Bracket[0],Bracket[1]],center=true);
    union() {
    for (i=[-1,0,1]) // middle circle fills gap
    translate([i*(Bracket[0]/2 – BracketR),0])
    circle(r=BracketR);
    }
    }
    circle(d=BracketHoleOD/cos(180/8),$fn=8); // dead center at the origin
    }
    }
    //- General plate shape
    // Centered on the hole for the fairing bracket
    module PlateBlank() {
    difference() {
    translate([BracketHoleOC,0,0])
    intersection() {
    translate([0,0,Plate[2]/2]) // select upper half of spheres
    cube(Plate,center=true);
    hull()
    if (RoundEnds)
    for (i=[-1,1])
    translate([i*(Plate[0]/2 – PlateRad),0,0])
    resize([Plate[1]/2,Plate[1],2*Plate[2]])
    sphere(r=PlateRad); // nice round ends!
    else
    for (i=[-1,1], j=[-1,1])
    translate([i*(Plate[0]/2 – PlateRad),j*(Plate[1]/2 – PlateRad),0])
    resize([2*PlateRad,2*PlateRad,2*Plate[2]])
    sphere(r=PlateRad); // nice round corners!
    }
    translate([2*BracketHoleOC,0,-Protrusion]) // punch screw holes
    PolyCyl(BracketHoleOD,2*Plate[2],8);
    translate([0,0,-Protrusion])
    PolyCyl(BracketHoleOD,2*Plate[2],8);
    }
    }
    //- Inner plate
    module InnerPlate() {
    difference() {
    PlateBlank();
    translate([0,0,Plate[2] – Bracket[2] + Protrusion]) // punch fairing bracket
    Bracket();
    }
    }
    //- Slotted ball around flashlight
    // Print with brim to ensure adhesion!
    module SlotBall() {
    NumSlots = 8*2; // must be even, half cut from each end
    SlotWidth = 2*ThreadWidth;
    SlotBaseThick = 10*ThreadThick; // enough to hold finger ends together
    RibLength = (BallOD – LightBodies[FlashIndex][F_GRIPOD])/2;
    translate([0,0,(Layout == "Build") ? BallLength/2 : 0])
    rotate([0,(Layout == "Show") ? 90 : 0,0])
    difference() {
    intersection() {
    sphere(d=BallOD,$fn=2*BallSides); // basic ball
    cube([2*BallOD,2*BallOD,BallLength],center=true); // trim to length
    }
    translate([0,0,-LightBodies[FlashIndex][F_GRIPOD]])
    rotate(180/BallSides)
    PolyCyl(LightBodies[FlashIndex][F_GRIPOD],2*BallOD,BallSides); // remove flashlight body
    for (i=[0:NumSlots/2 – 1]) { // cut slots
    a=i*(2*360/NumSlots);
    SlotCutterLength = LightBodies[FlashIndex][F_GRIPOD];
    rotate(a)
    translate([SlotCutterLength/2,0,SlotBaseThick])
    cube([SlotCutterLength,SlotWidth,BallLength],center=true);
    rotate(a + 360/NumSlots)
    translate([SlotCutterLength/2,0,-SlotBaseThick])
    cube([SlotCutterLength,SlotWidth,BallLength],center=true);
    }
    }
    color("Yellow")
    if (Support && (Layout == "Build")) {
    for (i=[0:NumSlots-1]) {
    a = i*360/NumSlots;
    rotate(a + 180/NumSlots)
    translate([(LightBodies[FlashIndex][F_GRIPOD] + RibLength)/2 + ThreadWidth,0,BallLength/(2*4)])
    cube([RibLength,2*ThreadWidth,BallLength/4],center=true);
    }
    }
    }
    //- Clamp around flashlight ball
    module BallClamp(Section="All") {
    BossLength = ClampScrew[LENGTH] – 1*ClampScrewWasher[LENGTH];
    BossOD = ClampInsert[OD] + 2*(6*ThreadWidth);
    difference() {
    union() {
    intersection() {
    sphere(d=ClampOD,$fn=BallSides); // exterior ball clamp
    cube([ClampLength,2*ClampOD,2*ClampOD],center=true); // aiming allowance
    }
    hull()
    for (j=[-1,1])
    translate([0,j*ClampScrewOC/2,-BossLength/2])
    cylinder(d=BossOD,h=BossLength,$fn=6);
    }
    sphere(d=(BallOD + 1*ThreadThick),$fn=BallSides); // interior ball with minimal clearance
    for (j=[-1,1]) {
    translate([0,j*ClampScrewOC/2,-ClampOD]) // screw clearance
    PolyCyl(ClampScrew[ID],2*ClampOD,6);
    translate([0,j*ClampScrewOC/2, // insert clearance
    -(BossLength/2 – ClampInsert[LENGTH] – 3*ThreadThick)])
    rotate([0,180,0])
    PolyCyl(ClampInsert[OD],2*ClampOD,6);
    translate([0,j*ClampScrewOC/2, // insert transition
    -(BossLength/2 – ClampInsert[LENGTH] – 3*ThreadThick)])
    cylinder(d1=ClampInsert[OD]/cos(180/6),d2=ClampScrew[ID],h=6*ThreadThick,$fn=6);
    }
    if (Section == "Top")
    translate([0,0,-ClampOD/2])
    cube([2*ClampOD,2*ClampOD,ClampOD],center=true);
    else if (Section == "Bottom")
    translate([0,0,ClampOD/2])
    cube([2*ClampOD,2*ClampOD,ClampOD],center=true);
    }
    color("Yellow")
    if (Support) { // ad-hoc supports
    NumRibs = 6;
    RibLength = 0.5 * BallOD;
    RibWidth = 1.9*ThreadWidth;
    SupportOC = ClampLength / NumRibs;
    if (Section == "Top") // base plate for adhesion
    translate([0,0,ThreadThick])
    cube([ClampLength + 6*ThreadWidth,RibLength,2*ThreadThick],center=true);
    else if (Section == "Bottom")
    translate([0,0,-ThreadThick])
    cube([ClampLength + 6*ThreadWidth,RibLength,2*ThreadThick],center=true);
    render(convexity=2*NumRibs)
    intersection() {
    sphere(d=BallOD – 0*ThreadWidth); // cut at inner sphere OD
    cube([ClampLength + 2*ThreadWidth,RibLength,BallOD],center=true);
    if (Section == "Top") // select only desired section
    translate([0,0,ClampOD/2])
    cube([2*ClampOD,2*ClampOD,ClampOD],center=true);
    else if (Section == "Bottom")
    translate([0,0,-ClampOD/2])
    cube([2*ClampOD,2*ClampOD,ClampOD],center=true);
    union() { // ribs for E-Z build
    for (j=[-1,0,1])
    translate([0,j*SupportOC,0])
    cube([ClampLength,RibWidth,1.0*BallOD],center=true);
    for (i=[0:NumRibs]) // allow NumRibs + 1 to fill the far end
    translate([i*SupportOC – ClampLength/2,0,0])
    rotate([0,90,0])
    cylinder(d=BallOD – 2*ThreadThick,
    h=RibWidth,$fn=BallSides,center=true);
    }
    }
    }
    }
    //- Mount between fairing plate and flashlight ball
    // Build with support for bottom of clamp screws!
    module Mount() {
    TextRotate = (Side == "Right") ? 0 : 180;
    MountShift = [ClampOD*sin(ToeIn/2),
    0,
    ClampOD/2];
    difference() {
    translate([-BracketHoleOC,0,0]) // put bracket center at origin
    PlateBlank();
    mirror([0,1,0])
    translate([0,0,-Protrusion])
    linear_extrude(height=3*ThreadThick + Protrusion) {
    translate([BracketHoleOC + 15,0,0])
    text(text=">>>",size=5,spacing=1.20,font="Arial",halign="center",valign="center");
    translate([-BracketHoleOC,8,0]) rotate(TextRotate)
    text(text=str("Toe ",ToeIn),size=5,spacing=1.20,font="Arial",halign="center",valign="center");
    translate([-BracketHoleOC,-8,0]) rotate(TextRotate)
    text(text=str("Tilt ",Tilt),size=5,spacing=1.20,font="Arial",halign="center",valign="center");
    translate([BracketHoleOC,-8,0]) rotate(TextRotate)
    text(text=Side,size=5,spacing=1.20,font="Arial",halign="center",valign="center");
    translate([BracketHoleOC,8,0]) rotate(TextRotate)
    text(text=str("Roll ",Roll),size=5,spacing=1.20,font="Arial",halign="center",valign="center");
    translate([-(BracketHoleOC + 15),0,0])
    rotate(90)
    text(text="KE4ZNU",size=4,spacing=1.20,font="Arial",halign="center",valign="center");
    }
    }
    mirror(TiltMirror) {
    translate(MountShift)
    rotate([-Roll,ToeIn,Tilt])
    BallClamp("Bottom");
    color("Yellow")
    if (MountSupport) { // anchor outer corners at worst overhang
    RibWidth = 1.9*ThreadWidth;
    SupportOC = 0.1 * ClampLength;
    difference() {
    rotate([0,0,Tilt])
    translate([(ClampOD – BallOD)*sin(ToeIn/2),0,0])
    for (i=[-4.5,-2.5,0,2.0,4.5])
    translate([i*SupportOC – 0.0,0,(5 + Plate[2])/2])
    cube([RibWidth,0.7*ClampOD,(5 + Plate[2])],center=true);
    translate(MountShift)
    rotate([-Roll,ToeIn,Tilt])
    sphere(d=ClampOD – 2*ThreadWidth,$fn=BallSides);
    }
    }
    }
    }
    //- Build things
    if (Component == "Bracket")
    Bracket();
    if (Component == "Ball")
    SlotBall();
    if (Component == "BallClamp")
    if (Layout == "Show")
    BallClamp("All");
    else if (Layout == "Build")
    BallClamp("Top");
    if (Component == "Mount")
    Mount();
    if (Component == "Plates") {
    translate([0,0.7*Plate[1],0])
    InnerPlate();
    translate([0,-0.7*Plate[1],0])
    PlateBlank();
    }
    if (Component == "Complete") {
    translate([-BracketHoleOC,0,0])
    PlateBlank();
    mirror(TiltMirror) {
    translate([0,0,ClampOD/2]) {
    rotate([-Roll,ToeIn,Tilt])
    SlotBall();
    rotate([-Roll,ToeIn,Tilt])
    BallClamp();
    }
    }
    }