Not updated in ages
This commit is contained in:
parent
0ed0f10a81
commit
ca76c7b53b
18 changed files with 11918 additions and 97 deletions
|
@ -1,6 +1,6 @@
|
|||
$useMcMaster = true;
|
||||
module bearing(id, od, wd, mcmaster, series, labels=false){
|
||||
echo(str("Creating a ", series, " bearing with id=", id, "mm od=", od, "mm width=", wd, "mm ..."));
|
||||
//echo(str("Creating a ", series, " bearing with id=", id, "mm od=", od, "mm width=", wd, "mm ..."));
|
||||
difference(){
|
||||
color("grey")cylinder(d=od,h=wd, center=true);
|
||||
color("white")cylinder(d=id,h=wd+1, center=true);
|
||||
|
@ -44,6 +44,7 @@ module bearing_text(id, od, wd, st, radiusConsumed=180){
|
|||
|
||||
|
||||
module bearing_608(labels=true){ bearing(8,22,7,"5972K91","608", labels=labels); }
|
||||
module bearing_626(labels=true){ bearing(6,19,6,"6661K11","626", labels=labels); }
|
||||
module bearing_629(labels=true){ bearing(9,26,8,"5972K93","629", labels=labels); }
|
||||
module bearing_635(labels=true){ bearing(5,19,6,"5972K197","635", labels=labels); }
|
||||
module bearing_6000(labels=true){ bearing(10,26,8,"5972K94","6000", labels=labels); }
|
||||
|
|
129
dollatek_motor.scad
Normal file
129
dollatek_motor.scad
Normal file
|
@ -0,0 +1,129 @@
|
|||
use <generic_3v_motor.scad>
|
||||
use <mirrorcopy.scad>;
|
||||
|
||||
dollatek_gearbox_boltHole_location = [0,(20.5-3)/2,24.5-5.3+1];
|
||||
dollatek_gearbox_body_box_dimensions = [19,23,0];
|
||||
dollatek_gearbox_body_box_radius = 5;
|
||||
|
||||
module dollatek_gearbox(cutouts=false){
|
||||
// Motor
|
||||
translate([1,0,39])
|
||||
generic3vMotor();
|
||||
|
||||
color("white"){
|
||||
// Output Shaft
|
||||
difference(){
|
||||
// Shaft body
|
||||
rotate([0,90,0])cylinder(h=cutouts?50:36.5,d=5, center=true);
|
||||
if(!cutouts){
|
||||
// Flats
|
||||
mirrorCopy([1,0,0])mirrorCopy([0,0,1])translate([(36.5-7.5)/2,0,3.6])cube([7.5+0.01,5,3.6], center=true);
|
||||
// Center hole
|
||||
rotate([0,90,0])cylinder(h=36.5+0.01,d=2, center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
color("gold"){
|
||||
// Zit
|
||||
translate([-10.2,0,0.5+10])
|
||||
rotate([0,90,0])
|
||||
cylinder(d=4,h=1.3, center=true);
|
||||
|
||||
// Body
|
||||
difference(){
|
||||
hull(){
|
||||
// Bottom radius corners
|
||||
mirrorCopy([0,1,0])
|
||||
translate([0,(dollatek_gearbox_body_box_dimensions.y/2)-dollatek_gearbox_body_box_radius,2.5-8.5])
|
||||
rotate([0,90,0])
|
||||
cylinder(h=dollatek_gearbox_body_box_dimensions.x, r=dollatek_gearbox_body_box_radius, center=true);
|
||||
// Top ledge before motor hole
|
||||
translate([0,0,-10.5+37-1])
|
||||
cube([dollatek_gearbox_body_box_dimensions.x,dollatek_gearbox_body_box_dimensions.y,1], center=true);
|
||||
}
|
||||
// Holes
|
||||
mirrorCopy([0,1,0])
|
||||
translate(dollatek_gearbox_boltHole_location)
|
||||
rotate([0,90,0])
|
||||
cylinder(d=3,h=25, center=true);
|
||||
}
|
||||
|
||||
// Keychain-like hole?
|
||||
translate([-8.3+8.6,0,-13.5]){
|
||||
difference(){
|
||||
cube([2.5,5,5], center=true);
|
||||
rotate([0,90,0])cylinder(d=3,h=10,center=true);
|
||||
}
|
||||
}
|
||||
|
||||
// Motor Retainer
|
||||
translate([1,0,31.5]){
|
||||
difference(){
|
||||
intersection(){
|
||||
cube([dollatek_gearbox_body_box_dimensions.x-2,dollatek_gearbox_body_box_dimensions.y,12+0.01], center=true);
|
||||
cylinder(d=dollatek_gearbox_body_box_dimensions.y,h=11, center=true);
|
||||
}
|
||||
generic3vMotor();
|
||||
}
|
||||
// Motor-Strap retention hooks
|
||||
mirrorCopy([1,0,0])
|
||||
translate([9.5,0,4-2.4])
|
||||
cube([2.1,5,3], center=true);
|
||||
}
|
||||
|
||||
if(cutouts){
|
||||
// Main Holes
|
||||
mirrorCopy([0,1,0])
|
||||
translate(dollatek_gearbox_boltHole_location)
|
||||
rotate([0,90,0])
|
||||
cylinder(d=3,h=50, center=true);
|
||||
|
||||
// Area around the motor
|
||||
hull()
|
||||
translate([1,0,31.5])
|
||||
mirrorCopy([1,0,0])
|
||||
translate([9.5,0,10])
|
||||
cube([2.1,22,35], center=true);
|
||||
|
||||
// Lower hole
|
||||
translate([-8.3+8.6,0,-13.5]){
|
||||
cube([3,5.5,5.5], center=true);
|
||||
rotate([0,90,0])cylinder(d=3,h=50,center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module dollatek_gearbox_cutout_shaft(screwHoleCutoutMM=50){
|
||||
color("red"){
|
||||
// Output Shaft
|
||||
// Shaft body
|
||||
rotate([0,90,0])
|
||||
cylinder(h=36.5,d=6, center=true);
|
||||
// Center hole
|
||||
rotate([0,90,0])
|
||||
cylinder(h=screwHoleCutoutMM,d=2, center=true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($preview){
|
||||
dollatek_gearbox();
|
||||
|
||||
translate([0,20,0])dollatek_gearbox_cutout_shaft();
|
||||
|
||||
translate([0,40,0])dollatek_gearbox(cutouts=true);
|
||||
}
|
||||
translate([0,100,0]){
|
||||
difference(){
|
||||
translate([10-2.5,0,5]){
|
||||
hull()
|
||||
mirrorCopy([0,1,0])mirrorCopy([0,0,1])
|
||||
translate([0,(30-5)/2,(50-5)/2])
|
||||
rotate([0,90,0])
|
||||
cylinder(h=15,d=5, center=true);
|
||||
}
|
||||
dollatek_gearbox(cutouts=true);
|
||||
dollatek_gearbox_cutout_shaft();
|
||||
}
|
||||
}
|
10054
dollatek_motor.stl
Normal file
10054
dollatek_motor.stl
Normal file
File diff suppressed because it is too large
Load diff
147
extrusion.scad
147
extrusion.scad
|
@ -1,95 +1,105 @@
|
|||
use <mirrorcopy.scad>
|
||||
$fn=60;
|
||||
module doubleExtrusion(width,length){
|
||||
module doubleExtrusion(width,length, center=false){
|
||||
extraWallWidth = width*0.09;
|
||||
mirrorCopy([0,1,0]){
|
||||
color("orange")
|
||||
translate([0,(width - extraWallWidth)/2,length/2])
|
||||
cube([width/2,extraWallWidth,length], center=true);
|
||||
cube([center?0:width/2,extraWallWidth,length], center=true);
|
||||
}
|
||||
|
||||
translate([(width/2),0,0])
|
||||
children();
|
||||
translate([(width/2)*-1,0,0])
|
||||
children();
|
||||
|
||||
}
|
||||
|
||||
|
||||
module extrusion(length=10, outer=40, tSlot=8, gusset=4.5, bore=7){
|
||||
translate([0,0,length/2])
|
||||
difference(){
|
||||
color("orange")
|
||||
union(){
|
||||
// Corners
|
||||
mirrorCopy([1,0,0]){
|
||||
mirrorCopy([0,1,0]){
|
||||
difference(){
|
||||
union(){
|
||||
translate([((outer-(outer-tSlot)/2)/2),(outer-(gusset))/2,0])
|
||||
cube([(outer-tSlot)/2, (gusset),length], center=true);
|
||||
mirror([-1,1,0])
|
||||
translate([((outer-(outer-tSlot)/2)/2),(outer-(gusset))/2,0])
|
||||
cube([(outer-tSlot)/2, (gusset),length], center=true);
|
||||
}
|
||||
difference(){
|
||||
translate([((outer-(gusset))/2)+1,((outer-(gusset))/2)+1,0])
|
||||
cube([gusset*2,gusset*2,length+2], center=true);
|
||||
translate([(outer-(gusset*2))/2,(outer-(gusset*2))/2,0])
|
||||
cylinder(d=gusset*2,h=length+4, center=true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Crossbar
|
||||
mirrorCopy(){
|
||||
rotate(45)
|
||||
cube([outer*1.3, gusset, length], center=true);
|
||||
}
|
||||
|
||||
// Core
|
||||
cube([bore*2,bore*2,length], center=true);
|
||||
};
|
||||
|
||||
union(){
|
||||
// Tappable Bore
|
||||
cylinder(d=bore, h=length+2, center=true);
|
||||
}
|
||||
|
||||
color("grey",0.1)hull(){
|
||||
translate([(width/2),0,0])
|
||||
children();
|
||||
translate([(width/2)*-1,0,0])
|
||||
children();
|
||||
}
|
||||
}
|
||||
|
||||
module extrusion80x40(length){
|
||||
doubleExtrusion(40,length)
|
||||
extrusion40x40(length);
|
||||
module extrusion_sub(length=10, outer=40, tSlot=8, gusset=4.5, bore=7, center=false){
|
||||
translate([0,0,center?0:length/2]){
|
||||
difference(){
|
||||
color("orange")
|
||||
union(){
|
||||
// Corners
|
||||
mirrorCopy([1,0,0]){
|
||||
mirrorCopy([0,1,0]){
|
||||
difference(){
|
||||
union(){
|
||||
translate([((outer-(outer-tSlot)/2)/2),(outer-(gusset))/2,0])
|
||||
cube([(outer-tSlot)/2, (gusset),length], center=true);
|
||||
mirror([-1,1,0])
|
||||
translate([((outer-(outer-tSlot)/2)/2),(outer-(gusset))/2,0])
|
||||
cube([(outer-tSlot)/2, (gusset),length], center=true);
|
||||
}
|
||||
difference(){
|
||||
translate([((outer-(gusset))/2)+1,((outer-(gusset))/2)+1,0])
|
||||
cube([gusset*2,gusset*2,length+2], center=true);
|
||||
translate([(outer-(gusset*2))/2,(outer-(gusset*2))/2,0])
|
||||
cylinder(d=gusset*2,h=length+4, center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Crossbar
|
||||
mirrorCopy(){
|
||||
rotate(45)
|
||||
cube([outer*1.3, gusset, length], center=true);
|
||||
}
|
||||
|
||||
// Core
|
||||
cube([bore*2,bore*2,length], center=true);
|
||||
};
|
||||
|
||||
union(){
|
||||
// Tappable Bore
|
||||
cylinder(d=bore, h=length+2, center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
module extrusion60x30(length){
|
||||
doubleExtrusion(30,length)
|
||||
extrusion30x30(length);
|
||||
}
|
||||
module extrusion40x20(length){
|
||||
doubleExtrusion(20,length)
|
||||
extrusion20x20(length);
|
||||
module extrusion(length=10, outer=40, tSlot=8, gusset=4.5, bore=7, center=false){
|
||||
color("grey",0.1)hull()extrusion_sub(length=length, outer=outer, tSlot=tSlot, gusset=gusset, bore=bore, center=center);
|
||||
extrusion_sub(length=length, outer=outer, tSlot=tSlot, gusset=gusset, bore=bore, center=center);
|
||||
echo(str("BOM: Extrusion(",outer,"mm) length=",length,"mm"));
|
||||
}
|
||||
|
||||
module extrusion20x20(length)
|
||||
{
|
||||
extrusion(length=length, outer=20,tSlot=5, gusset=1.8, bore=4);
|
||||
module extrusion80x40(length, center=false){
|
||||
doubleExtrusion(40,length, center=center)
|
||||
extrusion40x40(length, center=center);
|
||||
}
|
||||
module extrusion60x30(length, center=false){
|
||||
doubleExtrusion(30,length, center=center)
|
||||
extrusion30x30(length, center=center);
|
||||
}
|
||||
module extrusion40x20(length, center=false){
|
||||
doubleExtrusion(20,length, center=center)
|
||||
extrusion20x20(length, center=center);
|
||||
}
|
||||
|
||||
module extrusion30x30(length)
|
||||
module extrusion20x20(length, center=false)
|
||||
{
|
||||
extrusion(length=length, outer=30,tSlot=8, gusset=2.5, bore=7);
|
||||
extrusion(length=length, outer=20,tSlot=5, gusset=1.8, bore=4, center=center);
|
||||
}
|
||||
|
||||
module extrusion40x40(length)
|
||||
module extrusion30x30(length, center=false)
|
||||
{
|
||||
extrusion(length=length, outer=40,tSlot=8, gusset=4.5, bore=7);
|
||||
extrusion(length=length, outer=30,tSlot=8, gusset=2.5, bore=7, center=center);
|
||||
}
|
||||
|
||||
module extrusion40x40(length, center=false)
|
||||
{
|
||||
extrusion(length=length, outer=40,tSlot=8, gusset=4.5, bore=7, center=center);
|
||||
}
|
||||
/**/
|
||||
translate([-40,0,0])extrusion20x20(10, center=true);
|
||||
translate([-60,30,0])extrusion30x30(10, center=true);
|
||||
translate([-80,30+40,0])extrusion40x40(10, center=true);
|
||||
|
||||
translate([0,0,0])extrusion20x20(10);
|
||||
translate([0,30,0])extrusion30x30(10);
|
||||
translate([0,30+40,0])extrusion40x40(10);
|
||||
|
@ -97,5 +107,4 @@ translate([0,30+40,0])extrusion40x40(10);
|
|||
translate([40,0,0])extrusion40x20(10);
|
||||
translate([60,30,0])extrusion60x30(10);
|
||||
translate([80,30+40,0])extrusion80x40(10);
|
||||
|
||||
/**/
|
35
fillet_cylinder.scad
Normal file
35
fillet_cylinder.scad
Normal file
|
@ -0,0 +1,35 @@
|
|||
module filleted_cylinder(
|
||||
cylinder_height=2,
|
||||
cylinder_radius=1,
|
||||
fillet_radius_bottom=1,
|
||||
fillet_radius_top=0,
|
||||
nfaces=50
|
||||
) {
|
||||
/* created by Kevin Lam on Dec 3, 2016 */
|
||||
union() {
|
||||
cylinder(cylinder_height, r=cylinder_radius, $fn=nfaces, false);
|
||||
|
||||
if (fillet_radius_bottom > 0) {
|
||||
difference() {
|
||||
cylinder(fillet_radius_bottom, r=cylinder_radius+fillet_radius_bottom, $fn=nfaces, false);
|
||||
translate([0, 0, fillet_radius_bottom])
|
||||
rotate_extrude($fn=nfaces)
|
||||
translate([cylinder_radius+fillet_radius_bottom, 0, 0])
|
||||
circle(fillet_radius_bottom, $fn=nfaces);
|
||||
}
|
||||
}
|
||||
|
||||
if (fillet_radius_top>0) {
|
||||
difference() {
|
||||
translate([0,0,cylinder_height-fillet_radius_top])
|
||||
cylinder(fillet_radius_top, r=cylinder_radius+fillet_radius_top, $fn=nfaces, false);
|
||||
|
||||
translate([0, 0, cylinder_height-fillet_radius_top])
|
||||
rotate_extrude($fn=nfaces)
|
||||
translate([cylinder_radius+fillet_radius_top, 0, 0])
|
||||
circle(fillet_radius_top, $fn=nfaces);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
1098
gears.scad
Normal file
1098
gears.scad
Normal file
File diff suppressed because it is too large
Load diff
37
generic_3v_motor.scad
Normal file
37
generic_3v_motor.scad
Normal file
|
@ -0,0 +1,37 @@
|
|||
module generic3vMotor(){
|
||||
// Main body
|
||||
color("silver"){
|
||||
translate([0,0,-2.5]){
|
||||
intersection(){
|
||||
cube([15,20,20], center=true);
|
||||
cylinder(d=20,h=20, center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
color("#333333"){
|
||||
translate([0,0,10]){
|
||||
intersection(){
|
||||
cube([15,20,5], center=true);
|
||||
cylinder(d=20,h=5, center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Rear motor hump
|
||||
color("#333333"){
|
||||
translate([0,0,(25+2)/2]){
|
||||
difference(){
|
||||
cylinder(d=10,h=2, center=true);
|
||||
translate([10-(10-8.8),0,0])cube([10,10,2+0.1], center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Power solder tabs + plastic lump
|
||||
color("#333333")translate([-8.3,0,10])cube([1.6,13.2,5], center=true);
|
||||
// Motor housing snoot
|
||||
color("silver")translate([0,0,(25+1.6)/-2])cylinder(d=6,h=1.6, center=true);
|
||||
// Motor shaft and rear pip
|
||||
color("silver")translate([0,0,-3.9])cylinder(d=1.8,h=37.8, center=true);
|
||||
}
|
||||
|
||||
|
||||
generic3vMotor();
|
16
hollower.scad
Normal file
16
hollower.scad
Normal file
|
@ -0,0 +1,16 @@
|
|||
module hollower(wallThickness=1, box=300, bottomLift=0){
|
||||
difference() {
|
||||
children();
|
||||
translate([0,0,-box/2]) cube(box,center=true);
|
||||
difference() {
|
||||
translate([0,0,(box/2)-0.001+bottomLift]) cube(box,center=true);
|
||||
minkowski() {
|
||||
translate([0,0,0])cube(2*wallThickness,center=true);
|
||||
difference() {
|
||||
translate([0,0,(box/2)+bottomLift]) cube(box,center=true);
|
||||
children();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,8 +1,15 @@
|
|||
$fn=$preview ? 60 : 360;
|
||||
include <../Lib/bearings.scad>;
|
||||
include <../Lib/mirrorcopy.scad>;
|
||||
include <../Lib/part_splitter.scad>;
|
||||
include <../Lib/extrusion.scad>;
|
||||
include <../Lib/hollower.scad>;
|
||||
include <../Lib/pcd.scad>;
|
||||
include <../Lib/metric_bolts.scad>;
|
||||
include <../Lib/steppers.scad>;
|
||||
include <../Lib/corner_radiuser.scad>;
|
||||
include <../Lib/gears.scad>;
|
||||
include <../Lib/prism.scad>;
|
||||
include <../Lib/fillet_cylinder.scad>;
|
||||
include <../Lib/o-ring.scad>;
|
||||
include <../Lib/hexgrid.scad>;
|
|
@ -1,10 +1,12 @@
|
|||
use <mirrorcopy.scad>
|
||||
capSizeMSizeMultiplier = 1.66*1.01;
|
||||
printingKerfMM = 0.6;
|
||||
circleFacets = 60;
|
||||
boltColour = "LightSkyBlue";
|
||||
boltClearanceColour = "LightSteelBlue";
|
||||
boltClearanceTransparency = 0.3;
|
||||
|
||||
module metricBoltHex(mSize, structural=false, recessNut=0, chamfer=false){
|
||||
module metricBoltHex(mSize, structural=false, recessNut=0, recessNutIsCircleMM=false, chamfer=false){
|
||||
// Hex diameter = mSize * 1.8, (or 2.0 if structural
|
||||
// We add 1% to make the hex slip in better
|
||||
hexDiameter = (mSize * (structural?2.0:1.8) * 1.01) + printingKerfMM;
|
||||
|
@ -14,34 +16,40 @@ module metricBoltHex(mSize, structural=false, recessNut=0, chamfer=false){
|
|||
cylinder(d=hexDiameter,h=mSize * 0.7, $fn=6, center=true);
|
||||
|
||||
if(recessNut > 0){
|
||||
color(boltClearanceColour)
|
||||
translate([0,0,(recessNut/2)*-1])
|
||||
cylinder(d=hexDiameter,h=recessNut, $fn=6, center=true);
|
||||
if(recessNutIsCircleMM==false){
|
||||
color(boltClearanceColour, boltClearanceTransparency)
|
||||
translate([0,0,(recessNut/2)*-1+0.1])
|
||||
cylinder(d=hexDiameter,h=recessNut+0.1, $fn=6, center=true);
|
||||
}else{
|
||||
color(boltClearanceColour, boltClearanceTransparency)
|
||||
translate([0,0,(recessNut/2)*-1+0.1])
|
||||
cylinder(d=recessNutIsCircleMM>hexDiameter?recessNutIsCircleMM:hexDiameter,h=recessNut+0.1, $fn=circleFacets, center=true);
|
||||
}
|
||||
}
|
||||
if(chamfer){
|
||||
chamferHeight = mSize*1.5*0.595;
|
||||
color(boltClearanceColour)
|
||||
translate([0,0,(mSize * 0.7)+(chamferHeight/2)])
|
||||
cylinder(d1=hexDiameter,d2=0,h=chamferHeight, center=true, $fn=6);
|
||||
color(boltClearanceColour, boltClearanceTransparency)
|
||||
translate([0,0,(mSize * 0.7)+(chamferHeight/2)])
|
||||
cylinder(d1=hexDiameter,d2=0,h=chamferHeight, center=true, $fn=6);
|
||||
}
|
||||
}
|
||||
|
||||
module metricSocketCap(mSize, length, structural=false,recessCap=0, chamfer=false){
|
||||
module metricSocketCap(mSize, length, structural=false,recessCap=0, chamfer=false, overrideCapSize=0){
|
||||
//cap size = M number * 1.5.
|
||||
// We add 1% to make the cap head spin nicely in the hole.
|
||||
capSize = (mSize * capSizeMSizeMultiplier) + printingKerfMM;
|
||||
capSize = overrideCapSize > 0 ? overrideCapSize : (mSize * capSizeMSizeMultiplier) + printingKerfMM;
|
||||
|
||||
color(boltColour)
|
||||
translate([0,0,(length + ((mSize*1.25)/2))])
|
||||
cylinder(d=capSize,h=mSize*1.25, center=true, $fn=circleFacets);
|
||||
echo (str("cap size is ", capSize));
|
||||
//echo (str("cap size is ", capSize));
|
||||
if(recessCap > 0){
|
||||
color(boltClearanceColour)
|
||||
color(boltClearanceColour, boltClearanceTransparency)
|
||||
translate([0,0,(length + ((recessCap/2)+(mSize*1.25)))])
|
||||
cylinder(d=capSize,h=recessCap, center=true, $fn=circleFacets);
|
||||
cylinder(d=capSize,h=recessCap+0.01, center=true, $fn=circleFacets);
|
||||
}
|
||||
if(chamfer){
|
||||
color(boltClearanceColour)
|
||||
color(boltClearanceColour, boltClearanceTransparency)
|
||||
translate([0,0,(length-((mSize*1.5*0.595)/2))])
|
||||
cylinder(d2=capSize,d1=0,h=mSize*1.5*0.595, center=true, $fn=circleFacets);
|
||||
}
|
||||
|
@ -53,35 +61,73 @@ module metricShaft(mSize, length, structural=false){
|
|||
cylinder(d=mSize+printingKerfMM, h=length+0.01, center=true, $fn=circleFacets);
|
||||
}
|
||||
|
||||
module metricSocketScrew(mSize, length, structural=false, recessCap=0, chamfer=false){
|
||||
metricSocketCap(mSize, length, structural=structural, recessCap=recessCap, chamfer=chamfer);
|
||||
module metricSocketScrew(mSize, length, structural=false, recessCap=0, chamfer=false, overrideCapSize=0){
|
||||
metricSocketCap(mSize, length, structural=structural, recessCap=recessCap, chamfer=chamfer, overrideCapSize=overrideCapSize);
|
||||
metricShaft(mSize, length, structural=structural);
|
||||
}
|
||||
module metricSocketScrewSlot(mSize, length, width, structural=false, recessCap=0, chamfer=false, overrideCapSize=0){
|
||||
|
||||
hull()mirrorCopy()
|
||||
translate([width/2,0,0])
|
||||
metricSocketCap(mSize, length, structural=structural, recessCap=recessCap, chamfer=chamfer, overrideCapSize=overrideCapSize);
|
||||
hull()mirrorCopy()
|
||||
translate([width/2,0,0])
|
||||
metricShaft(mSize, length, structural=structural);
|
||||
}
|
||||
|
||||
module metricCapheadAndBolt(mSize, length=40, structural=false, recessCap=0, recessNut=0, chamfer=false){
|
||||
capSize = (mSize * capSizeMSizeMultiplier) + printingKerfMM;
|
||||
module metricCapheadAndBolt(mSize, length=40, structural=false, recessCap=0, recessNut=0, recessNutIsCircleMM=false, chamfer=false, overrideCapSize=0){
|
||||
capSize = overrideCapSize > 0 ? overrideCapSize : (mSize * capSizeMSizeMultiplier) + printingKerfMM;
|
||||
|
||||
echo (str("Creating a M",mSize, " size, ", length, "mm long bolt with a ", capSize, "mm wide caphead and bolt ", chamfer?"with":"without", " chamfering."));
|
||||
/*echo (str("Creating a M",mSize, " size, ", length, "mm long bolt with a ", capSize, "mm wide caphead and bolt ", chamfer?"with":"without", " chamfering."));
|
||||
if(recessCap){
|
||||
echo (str("It has a ", recessCap, "mm recessed cap"));
|
||||
}
|
||||
if(recessNut){
|
||||
echo (str("It has a ", recessCap, "mm recessed nut"));
|
||||
}
|
||||
}/**/
|
||||
translate([0,0,((length/2)+((mSize*1.25)/2))*-1])
|
||||
union(){
|
||||
translate([0, 0, 0])
|
||||
metricSocketScrew(mSize, length, structural=structural, recessCap=recessCap, chamfer=chamfer);
|
||||
metricBoltHex(mSize,structural, recessNut=recessNut, chamfer=chamfer);
|
||||
metricSocketScrew(mSize, length, structural=structural, recessCap=recessCap, chamfer=chamfer, overrideCapSize=overrideCapSize);
|
||||
metricBoltHex(mSize,structural, recessNut=recessNut, recessNutIsCircleMM=recessNutIsCircleMM, chamfer=chamfer);
|
||||
}
|
||||
}
|
||||
module metricCapheadAndNutsert(mSize, length=40, nutsertLength=13, mSizeRatio=1.35 ,structural=false, recessCap=0, chamfer=false,overrideCapSize=0){
|
||||
capSize = overrideCapSize > 0 ? overrideCapSize : (mSize * capSizeMSizeMultiplier) + printingKerfMM;
|
||||
|
||||
translate([0,0,((length/2)+((mSize*1.25)/2))*-1])
|
||||
union(){
|
||||
translate([0, 0, 0])
|
||||
metricSocketScrew(mSize, length, structural=structural, recessCap=recessCap, chamfer=chamfer, overrideCapSize=overrideCapSize);
|
||||
metricThreadedNutsert(mSize, length=nutsertLength,mSizeRatio=mSizeRatio);
|
||||
}
|
||||
}
|
||||
|
||||
module metricThreadedNutsert(mSize, length=13, mSizeRatio=1.35){
|
||||
width = mSize * mSizeRatio;
|
||||
translate([0,0,-1]){
|
||||
translate([0,0,length/2])
|
||||
cylinder(h=length, d=width, center=true);
|
||||
translate([0,0,length/8/2])
|
||||
cylinder(h=length/8, d2=width, d1=width*1.1, center=true);
|
||||
}
|
||||
}
|
||||
/**/
|
||||
translate([0,10,0])
|
||||
metricCapheadAndBolt(6, 40);
|
||||
|
||||
translate([0,10,0])
|
||||
metricCapheadAndBolt(6, 40, recessNut=20, recessNutIsCircleMM=20);
|
||||
|
||||
translate([20,10,0])
|
||||
metricCapheadAndBolt(6, 40, recessNut=1, recessCap=1, chamfer=true);
|
||||
|
||||
translate([40,10,0]){
|
||||
metricCapheadAndNutsert(6, 40, 13, recessCap=1, chamfer=true);
|
||||
}
|
||||
translate([60,10,0]){
|
||||
metricSocketScrewSlot(6,40,10);
|
||||
}
|
||||
/**/
|
||||
/*
|
||||
translate([0,10,0])
|
||||
|
|
25
metric_screws.scad
Normal file
25
metric_screws.scad
Normal file
|
@ -0,0 +1,25 @@
|
|||
|
||||
module selfTappingScrew(mSize=3, length=30, recessCap=0.1){
|
||||
dk = mSize*2;
|
||||
d = mSize;
|
||||
k = (1.86/3)*mSize;
|
||||
color("lightblue"){
|
||||
// Shaft
|
||||
cylinder(d=d, h=length, center=true);
|
||||
// Cap
|
||||
translate([0,0,(length-k)/2])
|
||||
cylinder(d2=dk,d1=d, h=k, center=true);
|
||||
}
|
||||
|
||||
// Recess
|
||||
color("lightblue",0.2){
|
||||
if(recessCap){
|
||||
translate([0,0,(length+recessCap)/2])
|
||||
cylinder(d=dk,h=recessCap+0.01, center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
translate([0,0,0])selfTappingScrew(mSize=3, length=30);
|
||||
translate([0,20,0])selfTappingScrew(mSize=5, length=20);
|
||||
translate([0,40,0])selfTappingScrew(mSize=3, length=20, recessCap=10);
|
|
@ -1,5 +1,29 @@
|
|||
|
||||
module mirrorCopy(vec=[1,0,0]){
|
||||
module mirrorCopy(vec=[1,0,0], vec2=[0,0,0], vec3=[0,0,0]){
|
||||
|
||||
//echo(str("Vec1=",vec," Vec2=", vec2, " Vec3=", vec3));
|
||||
children();
|
||||
mirror(vec) children();
|
||||
}
|
||||
|
||||
if(vec2){
|
||||
mirror(vec2){
|
||||
children();
|
||||
mirror(vec) children();
|
||||
}
|
||||
}
|
||||
|
||||
if(vec3){
|
||||
mirror(vec3){
|
||||
children();
|
||||
mirror(vec) children();
|
||||
mirror(vec2){
|
||||
children();
|
||||
mirror(vec) children();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
mirrorCopy([1,0,0])color("green")translate([5,10,0])cylinder(h=1,d=5,center=true);
|
||||
mirrorCopy([1,0,0],[0,1,0])color("blue")translate([10,5,0])cylinder(h=1,d=5,center=true);
|
||||
mirrorCopy([1,0,0],[0,1,0],[0,0,1])color("red")translate([15,10,5])cylinder(h=1,d=5,center=true);
|
28
o-ring.scad
Normal file
28
o-ring.scad
Normal file
|
@ -0,0 +1,28 @@
|
|||
|
||||
module o_ring(id=20,girth=2.5,$fn=180){
|
||||
rotate_extrude(angle=360,$fn=$fn)translate([(id+girth)/2,0])circle(d=girth);
|
||||
//cylinder(d=id,h=0.1, center=true);
|
||||
}
|
||||
|
||||
//o_ring(id=40, girth=5);
|
||||
|
||||
|
||||
module o_ring_groove(girth=3,length = 50, height = 100, radius = 15){
|
||||
translate([radius+(girth/2),radius+(girth/2),0]){
|
||||
difference(){
|
||||
o_ring(id=radius*2,girth=girth, $fn=$fn);
|
||||
translate([15,0,0])cube([30,40,6], center=true);
|
||||
translate([0,15,0])cube([40,30,6], center=true);
|
||||
}
|
||||
|
||||
translate([-radius-(girth/2),length/2,0])
|
||||
rotate([90,0,0])
|
||||
cylinder(h=length+0.01,d=girth, center=true);
|
||||
|
||||
translate([height/2,-radius-(girth/2),0])
|
||||
rotate([0,90,0])
|
||||
cylinder(h=height+0.01,d=girth, center=true);
|
||||
}
|
||||
}
|
||||
|
||||
o_ring_groove();
|
155
omniwheel.scad
Normal file
155
omniwheel.scad
Normal file
|
@ -0,0 +1,155 @@
|
|||
use <../Lib/metric_bolts.scad>;
|
||||
use <../Lib/bearings.scad>;
|
||||
use <../Lib/mirrorcopy.scad>;
|
||||
rollerLength = 32;
|
||||
rollerProfile=[17,25,25,25,25,24,23,19];
|
||||
hubWidth=35;
|
||||
handedness="left"; // [left, right]
|
||||
rollerClearanceMM = 4;
|
||||
part = "all"; //[roller, hub, all]
|
||||
|
||||
function select(vector, indices) = [ for (index = indices) vector[index] ];
|
||||
subAssemblyPivotAngle = 45;
|
||||
subAssemblyCount = 8;
|
||||
|
||||
|
||||
internalSubAssemblyPivotAngle = subAssemblyPivotAngle * (handedness=="left"?1:-1);
|
||||
|
||||
|
||||
|
||||
|
||||
module roller(profile, length, padding=0){
|
||||
union(){
|
||||
for(index = [0:len(profile)-1]){
|
||||
spacing = length / len(profile);
|
||||
diameter = profile[index];
|
||||
hull(){
|
||||
translate([0,0,spacing*index])
|
||||
cylinder(h=0.1, d=diameter+padding);
|
||||
if(profile[index+1]){
|
||||
translate([0,0,spacing*(index+1)])
|
||||
cylinder(h=0.1, d=profile[index+1]+padding);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
module singleRotationalAssembly(profile, length, padding=0,withOrWithoutBearing="without"){
|
||||
echo(str("Profile=", profile, " Length=", length, " Padding=", padding, withOrWithoutBearing=="with"? " including":" excluding", " the bearing + shaft"));
|
||||
if(withOrWithoutBearing == "with"){
|
||||
mirrorCopy()
|
||||
rotate([0,-90,0])
|
||||
translate([0,0,6/2])
|
||||
roller(profile=profile, length=length, padding=padding);
|
||||
rotate([0,90,0]){
|
||||
metricCapheadAndBolt(6, 40, recessNut=0, recessCap=0, chamfer=false);
|
||||
bearing_626(labels=false);
|
||||
}
|
||||
}else{
|
||||
difference(){
|
||||
mirrorCopy()
|
||||
rotate([0,-90,0])
|
||||
translate([0,0,6/2])
|
||||
roller(profile=profile, length=length, padding=padding);
|
||||
rotate([0,90,0]){
|
||||
metricCapheadAndBolt(6, 40, recessNut=100, recessCap=100, chamfer=false);
|
||||
bearing_626(labels=false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module rotationalAssembly(outerDiameterMM, padding=0,withOrWithoutBearing="without"){
|
||||
centerOfRotationalAssemblyHubsFromCenterOfWheel = (outerDiameterMM/2)-(max(rollerProfile)/2);
|
||||
|
||||
for(i = [1:subAssemblyCount]){
|
||||
rotate([360/subAssemblyCount*i,0,0]){
|
||||
rotate([0,0,internalSubAssemblyPivotAngle]){
|
||||
translate([0,0,centerOfRotationalAssemblyHubsFromCenterOfWheel]){
|
||||
singleRotationalAssembly(rollerProfile, rollerLength, padding, withOrWithoutBearing=withOrWithoutBearing);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
module hubAssemblyRawShape(outerDiameterMM){
|
||||
centerOfRotationalAssemblyHubsFromCenterOfWheel = (outerDiameterMM/2)-(max(rollerProfile)/2);
|
||||
|
||||
difference(){
|
||||
hull(){
|
||||
translate([0,0,centerOfRotationalAssemblyHubsFromCenterOfWheel])
|
||||
rotate([0,90,internalSubAssemblyPivotAngle])
|
||||
cylinder(h=6,d=max(rollerProfile)-1.5, center=true);
|
||||
rotate([0,90,0])
|
||||
cylinder(h=hubWidth,d=outerDiameterMM/2, center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module hubAssembly(outerDiameterMM){
|
||||
difference(){
|
||||
union(){
|
||||
for(i = [1:subAssemblyCount]){
|
||||
rotate([360/subAssemblyCount*i,0,0])
|
||||
hubAssemblyRawShape(outerDiameterMM);
|
||||
}
|
||||
}
|
||||
rotationalAssembly(outerDiameterMM,padding=rollerClearanceMM, withOrWithoutBearing="with");
|
||||
}
|
||||
}
|
||||
|
||||
module omniwheel(outerDiameterMM=120,includeHub=true,includeRollers=true){
|
||||
render(){
|
||||
if(includeHub){
|
||||
color("lightblue")hubAssembly(outerDiameterMM);
|
||||
}
|
||||
if(includeRollers){
|
||||
color("lightgreen")rotationalAssembly(outerDiameterMM);
|
||||
}
|
||||
// Outline limit
|
||||
if($preview){
|
||||
color("lightblue",0.1){
|
||||
rotate([0,90,0]){
|
||||
difference(){
|
||||
cylinder(h=0.1,d=outerDiameterMM, center=true);
|
||||
cylinder(h=0.1+0.1,d=outerDiameterMM-1, center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(part=="all"){
|
||||
omniwheel(outerDiameterMM=120);
|
||||
}else if(part == "hub"){
|
||||
part_omniwheel_hub(outerDiameterMM=120);
|
||||
|
||||
}else if(part == "roller"){
|
||||
part_rollers(outerDiameterMM=120);
|
||||
}
|
||||
|
||||
module part_omniwheel_hub(outerDiameterMM){
|
||||
color("lightblue")hubAssembly(outerDiameterMM);
|
||||
}
|
||||
module part_rollers(outerDiameterMM, distanceBetween=max(rollerProfile)*2){
|
||||
translate([0,0,-3])
|
||||
//rotationalAssembly(outerDiameterMM=outerDiameterMM);
|
||||
difference(){
|
||||
union(){
|
||||
rotate([0,90,0])
|
||||
translate([0,distanceBetween/2,0])
|
||||
singleRotationalAssembly(profile=rollerProfile, length=rollerLength);
|
||||
rotate([0,-90,0])
|
||||
translate([0,distanceBetween/-2,0])
|
||||
singleRotationalAssembly(profile=rollerProfile, length=rollerLength);
|
||||
}
|
||||
translate([0,0,(rollerLength+1)/-2])
|
||||
cube([distanceBetween/2,distanceBetween/2*3,rollerLength+1], center=true);
|
||||
}
|
||||
}
|
28
part_splitter.scad
Normal file
28
part_splitter.scad
Normal file
|
@ -0,0 +1,28 @@
|
|||
module partSplitter(height=0,maxSize=200, spread=10, top=true, bottom=true){
|
||||
if($preview){
|
||||
children();
|
||||
translate([0,0,height])
|
||||
#cube([maxSize,maxSize,0.01], center=true);
|
||||
}else{
|
||||
if(top){
|
||||
color("red")
|
||||
translate([0,0,(spread/2)])
|
||||
difference(){
|
||||
children();
|
||||
translate([0,0,((maxSize/2)*-1)+height])
|
||||
cube([maxSize,maxSize,maxSize], center=true);
|
||||
}
|
||||
}
|
||||
if(bottom){
|
||||
color("green")
|
||||
translate([0,0,(spread/2)*-1])
|
||||
difference(){
|
||||
children();
|
||||
translate([0,0,(maxSize/2)+height])
|
||||
cube([maxSize,maxSize,maxSize], center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
10
pcd.scad
10
pcd.scad
|
@ -1,5 +1,5 @@
|
|||
module pcd(degrees){
|
||||
count=360/degrees;
|
||||
module pcd(degrees, totalDegrees=360){
|
||||
count=totalDegrees/degrees;
|
||||
for(i=[1 : count]){
|
||||
rotate(degrees*i)
|
||||
children();
|
||||
|
@ -11,4 +11,8 @@ module pcdAtFixedDegrees(degrees){
|
|||
rotate(degree)
|
||||
children();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pcd(30)
|
||||
translate([30,0,0])
|
||||
cylinder(h=10,d=5, center=true, $fn=30);
|
8
prism.scad
Normal file
8
prism.scad
Normal file
|
@ -0,0 +1,8 @@
|
|||
module prism(l, w, h){
|
||||
polyhedron(
|
||||
points=[[0,0,0], [l,0,0], [l,w,0], [0,w,0], [0,w,h], [l,w,h]],
|
||||
faces=[[0,1,2,3],[5,4,3,2],[0,4,5,1],[0,3,4],[5,2,1]]
|
||||
);
|
||||
|
||||
}
|
||||
|
117
steppers.scad
Normal file
117
steppers.scad
Normal file
|
@ -0,0 +1,117 @@
|
|||
/**
|
||||
* Implementation of a model of a 28BYJ-48 type cheapo stepper motor
|
||||
*/
|
||||
use <mirrorcopy.scad>;
|
||||
module stepper28BYJ48(){
|
||||
color("lightgrey"){
|
||||
translate([0,-8,0]){
|
||||
// Motor body
|
||||
translate([0,0,(19/2)*-1]){
|
||||
cylinder(d=28,h=19, center=true);
|
||||
}
|
||||
|
||||
// Motor snooter
|
||||
translate([0,8,0]){
|
||||
translate([0,0,(1.5/2)])cylinder(d=9,h=1.5, center=true);
|
||||
difference(){
|
||||
translate([0,0,(5/2)+2])cylinder(d=5,h=6, center=true);
|
||||
mirrorCopy([0,1,0]){
|
||||
translate([0,4,(5/2)+2.1])cube([5,5,6.2], center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// cable gland
|
||||
translate([0,(17/2)*-1,(19/2)*-1]){
|
||||
cube([14.8,17,19], center=true);
|
||||
}
|
||||
|
||||
// Attachment crossbar
|
||||
difference(){
|
||||
hull(){
|
||||
mirrorCopy([1,-0,0]){
|
||||
translate([(35/2),0,(1/2)*-1]){
|
||||
cylinder(h=1,d=7, center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
mirrorCopy([1,-0,0]){
|
||||
translate([(35/2),0,(1/2)*-1]){
|
||||
cylinder(h=1+0.01,d=4.2, center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
module stepper28BYJ48_cutouts(){
|
||||
color("orange"){
|
||||
translate([0,-8,0]){
|
||||
mirrorCopy([1,-0,0]){
|
||||
translate([(35/2),0,(1/2)*-1]){
|
||||
cylinder(h=1+0.01,d=4.2, center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module nemaCutout(shaftClearance, shaftGirth, shaftLength, frameSize, holeSpacing,holeDiameter=3, nemaSlotSlackMM=0, shaft=false){
|
||||
translate([0,0,frameSize/-2]){
|
||||
hull(){
|
||||
mirrorCopy([0,1,0]){
|
||||
translate([0,nemaSlotSlackMM/2]){
|
||||
cube([frameSize*1.01,frameSize*1.01,frameSize], center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!shaft){
|
||||
translate([0,0,10/2]){
|
||||
mirrorCopy([1,0,0]){
|
||||
mirrorCopy([0,1,0]){
|
||||
translate([holeSpacing/2,holeSpacing/2,0]){
|
||||
hull(){
|
||||
mirrorCopy([0,1,0]){
|
||||
translate([0,nemaSlotSlackMM/2,0]){
|
||||
cylinder(d=holeDiameter*1.1,h=30,center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!shaft){
|
||||
translate([0,0,-0.5]){
|
||||
cylinder(d=shaftClearance*1.03,h=shaftLength+1);
|
||||
}
|
||||
}else{
|
||||
difference(){
|
||||
cylinder(d=shaftGirth*1.03,h=shaftLength*2, $fn=360);
|
||||
translate([frameSize/-2,(shaftGirth/2)-(shaftGirth)*0.15,shaftLength*0.3+0.01]){
|
||||
cube([frameSize,frameSize/2,shaftLength*0.70]);
|
||||
translate([0,0,shaftLength*0.70-1])cube([frameSize,frameSize/2,shaftLength+1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module nema14_cutout(){
|
||||
nemaCutout(22,5,24,35,26,3,2, shaft);
|
||||
}
|
||||
|
||||
module nema17_cutout(shaft=false){
|
||||
|
||||
nemaCutout(22,5,24,42.3,31,3,2, shaft);
|
||||
}
|
||||
|
||||
module nema23_cutout(shaft=false){
|
||||
//nemaCutout(, shaft);
|
||||
}
|
||||
nema17_cutout(true);
|
||||
//nema23_cutout(true);
|
Loading…
Reference in a new issue