Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save ednisley/e51c9b0faee0c961ec82cfa91a9ac695 to your computer and use it in GitHub Desktop.

Select an option

Save ednisley/e51c9b0faee0c961ec82cfa91a9ac695 to your computer and use it in GitHub Desktop.
OpenSCAD source code: BOB Yak Trailer Fender front mount
// BOB Yak Trailer - fender front mount
// Ed Nisley - KE4ZNU
// 2026-06-15
include <BOSL2/std.scad>
Layout = "Show"; // [Build,Show,Frame,Fender,OuterMount,InnerMount,Mounts]
/* [Hidden] */
ID = 0;
OD = 1;
LENGTH = 2;
HoleWindage = 0.2;
Protrusion = 0.01;
NumSides = 4*3*2*4;
Gap = 5.0/2;
$fn=NumSides;
WallThick = 5.0;
Washer = [6.0,16.0,1.5]; // M5 fender washer
Rivnut = [5.0,10.3,1.5]; // M5 rivnut in frame
FrameOD = 16.1; // trailer frame tubing
FrameAngle = 10;
FenderOA = [52,440,1.5]; // minor major thickness
BlockOA = [0,40.0,1.25*Washer[OD]];
//-----
// Define things
// Relevant part of the trailer frame
// origin at center of rivnut
module Frame() {
yrot(FrameAngle)
union() {
left(Rivnut[LENGTH])
ycyl(2*BlockOA.y,d=FrameOD,anchor=RIGHT);
xcyl(FrameOD/2,d=Rivnut[OD],anchor=RIGHT);
left(Protrusion)
xcyl(10,d=Rivnut[OD],anchor=LEFT);
}
}
module OuterFender() {
torus(od=FenderOA[OD],d_min=FenderOA[ID],orient=FRONT,anchor=LEFT);
}
module FullFender() {
difference() {
OuterFender();
right(FenderOA[LENGTH]) // make it a cup
torus(od=FenderOA[OD] - 2*FenderOA[LENGTH],d_min=FenderOA[ID] - 2*FenderOA[LENGTH],
orient=FRONT,anchor=LEFT);
right(FenderOA[ID]/2) // remove inner half
ycyl(2*BlockOA.y,d=FenderOA[OD] - FenderOA[ID],anchor=LEFT);
down(2*Washer[OD]) // remove bottom part
cuboid(2*[FenderOA[OD],FenderOA[OD],FenderOA[OD]],anchor=TOP+LEFT);
}
}
module OuterMount() {
difference() {
right(FenderOA[ID]/2)
cuboid([FrameOD/3 + Washer[LENGTH] + FenderOA[ID]/2,BlockOA.y,BlockOA.z],
rounding=1.0,anchor=RIGHT);
Frame();
OuterFender();
}
}
module InnerMount() {
difference() {
render()
intersection() {
yrot(FrameAngle)
cuboid([WallThick + FenderOA[LENGTH],BlockOA.y,BlockOA.z],anchor=LEFT);
right(FenderOA[LENGTH])
OuterFender();
}
yrot(FrameAngle)
xcyl(FenderOA[ID],d=Washer[ID],anchor=LEFT);
}
}
//-----
// Build it
if (Layout == "Frame") {
Frame();
}
if (Layout == "Fender") {
FullFender();
}
if (Layout == "OuterMount") {
OuterMount();
}
if (Layout == "InnerMount") {
InnerMount();
}
if (Layout == "Mounts") {
OuterMount();
InnerMount();
}
if (Layout == "Show") {
OuterMount();
InnerMount();
color("Gray",0.6) {
Frame();
FullFender();
}
}
if (Layout == "Build") {
up(BlockOA.z/2) left(FenderOA[ID]/4)
OuterMount();
up(BlockOA.z/2)
xrot(180)
yrot(-FrameAngle)
InnerMount();
}
@ednisley

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment