From 0b19a3fd0bbce5a321cc7f12325e35178fd99100 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 9 Sep 2012 16:03:39 +0100 Subject: [PATCH] trailerhubcap for print --- trailerhubcap.scad | 78 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 68 insertions(+), 10 deletions(-) diff --git a/trailerhubcap.scad b/trailerhubcap.scad index e3bcd4d..e3eb46b 100644 --- a/trailerhubcap.scad +++ b/trailerhubcap.scad @@ -1,15 +1,73 @@ -mainrad = 28.4; +maindia = 28.4; poleholeh = 5.0; polecovth = 0.4; poleholerad = 6; - + +mainoverlap = 1.5; + +hookbasew = 4; +hookfullw = 6; +hookheight = 4; +hookwidth = 5; + +fingernaildepth = 5; +fingernailheight = 2.5; +fingernailwidth = 6; + +bigrad = maindia/2 + mainoverlap; mainth = poleholeh + polecovth; +hooklessdepth = hookfullw - hookbasew; + +module base() { + rotate_extrude(convexity=10) + mirror([1,0,0]) + polygon(points=[[-bigrad, 0], + [-bigrad + mainth, -mainth], + [0, -mainth], + [0, -poleholeh], + [-poleholerad, -poleholeh], + [-poleholerad, 0]]); +} + +module fingernails() { + for (ang=[60,180,300]) + rotate([0,0,ang]) + translate([bigrad - fingernaildepth, + -fingernailwidth/2, + -fingernailheight]) + cube([fingernaildepth + 1, fingernailwidth, fingernailheight + 1]); +} + +module hookrim() { + rotate_extrude(convexity=10) + mirror([1,0,0]) + translate([-maindia/2, 0, 0]) + polygon(points=[[hooklessdepth, 0], + [hookfullw, 0], + [hookfullw, hookheight], + [0, hookheight], + [0, hooklessdepth]]); +} + +module hooktriangles() { + for (ang=[0,120,240]) { + rotate([0,0,ang]) { + translate([0,0,-1]) { + linear_extrude(height=hookheight+2) { + polygon(points=[[0, 0], + [maindia/2 + 1, -hookwidth], + [maindia/2 + 1, +hookwidth]]); + } + } + } + } +} -rotate_extrude(convexity=10) - mirror([1,0,0]) - polygon(points=[[-mainrad/2, 0], - [-mainrad/2 + mainth, -mainth], - [0, -mainth], - [0, -poleholeh], - [-poleholerad, -poleholeh], - [-poleholerad, 0]]); +difference(){ + base(); + fingernails(); +} +intersection(){ + hookrim(); + hooktriangles(); +} -- 2.30.2