Merge branch 'master' of github.com:elmom/MCAD
This commit is contained in:
commit
d650715b6f
6
README
6
README
|
@ -14,9 +14,9 @@ files include useful constants which will be available with "include <MCAD/*.sca
|
||||||
which should be safe to use on all included files (ie. no top level code should
|
which should be safe to use on all included files (ie. no top level code should
|
||||||
create geometry).
|
create geometry).
|
||||||
|
|
||||||
If you host your project in git, you use "git submodule add URL" in your
|
If you host your project in git, you can do "git submodule add URL PATH" in your
|
||||||
repo to import this library as a git submodule for easy usage. See
|
repo to import this library as a git submodule for easy usage. Then you need to do a "git submodule update --init". See
|
||||||
"git help submodule"" for more info
|
"git help submodule"" for more info.
|
||||||
|
|
||||||
Currently Provided Tools:
|
Currently Provided Tools:
|
||||||
|
|
||||||
|
|
15
bearing.scad
15
bearing.scad
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Bearing model.
|
* Bearing model.
|
||||||
*
|
*
|
||||||
* Originally by Hans Häggström, 2010.
|
* Originally by Hans Häggström, 2010.
|
||||||
* Dual licenced under Creative Commons Attribution-Share Alike 3.0 and LGPL2 or later
|
* Dual licenced under Creative Commons Attribution-Share Alike 3.0 and LGPL2 or later
|
||||||
*/
|
*/
|
||||||
|
@ -29,7 +29,10 @@ BEARING_INNER_DIAMETER = 0;
|
||||||
BEARING_OUTER_DIAMETER = 1;
|
BEARING_OUTER_DIAMETER = 1;
|
||||||
BEARING_WIDTH = 2;
|
BEARING_WIDTH = 2;
|
||||||
|
|
||||||
|
//BearingXXX = [inner dia, outer dia, width];
|
||||||
Bearing608 = [8*mm, 22*mm, 7*mm];
|
Bearing608 = [8*mm, 22*mm, 7*mm];
|
||||||
|
Bearing623 = [3*mm, 10*mm, 4*mm];
|
||||||
|
//Bearing624 = [4*mm, , ];
|
||||||
Bearing627 = [7*mm, 22*mm, 7*mm];
|
Bearing627 = [7*mm, 22*mm, 7*mm];
|
||||||
Bearing688 = [8*mm, 16*mm, 5*mm];
|
Bearing688 = [8*mm, 16*mm, 5*mm];
|
||||||
SkateBearing = Bearing608;
|
SkateBearing = Bearing608;
|
||||||
|
@ -43,13 +46,13 @@ module bearing(pos=[0,0,0], angle=[0,0,0], model=SkateBearing, outline=false,
|
||||||
w = bearingWidth(model);
|
w = bearingWidth(model);
|
||||||
innerD = outline==false ? bearingInnerDiameter(model) : 0;
|
innerD = outline==false ? bearingInnerDiameter(model) : 0;
|
||||||
outerD = bearingOuterDiameter(model);
|
outerD = bearingOuterDiameter(model);
|
||||||
|
|
||||||
innerRim = innerD + (outerD - innerD) * 0.2;
|
innerRim = innerD + (outerD - innerD) * 0.2;
|
||||||
outerRim = outerD - (outerD - innerD) * 0.2;
|
outerRim = outerD - (outerD - innerD) * 0.2;
|
||||||
midSink = w * 0.1;
|
midSink = w * 0.1;
|
||||||
|
|
||||||
translate(pos) rotate(angle) union() {
|
translate(pos) rotate(angle) union() {
|
||||||
color(material)
|
color(material)
|
||||||
difference() {
|
difference() {
|
||||||
// Basic ring
|
// Basic ring
|
||||||
Ring([0,0,0], outerD, innerD, w, material, material);
|
Ring([0,0,0], outerD, innerD, w, material, material);
|
||||||
|
@ -67,13 +70,13 @@ module bearing(pos=[0,0,0], angle=[0,0,0], model=SkateBearing, outline=false,
|
||||||
translate(pos)
|
translate(pos)
|
||||||
difference() {
|
difference() {
|
||||||
cylinder(r=od/2, h=h, $fs = 0.01);
|
cylinder(r=od/2, h=h, $fs = 0.01);
|
||||||
color(holeMaterial)
|
color(holeMaterial)
|
||||||
translate([0,0,-10*epsilon])
|
translate([0,0,-10*epsilon])
|
||||||
cylinder(r=id/2, h=h+20*epsilon, $fs = 0.01);
|
cylinder(r=id/2, h=h+20*epsilon, $fs = 0.01);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue