mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-08-07 07:56:30 +02:00
Merge branch 'flanged_bearings' of https://github.com/martinbudden/NopSCADlib into martinbudden-flanged_bearings
This commit is contained in:
@@ -24,7 +24,7 @@ include <../vitamins/ball_bearings.scad>
|
|||||||
module ball_bearings()
|
module ball_bearings()
|
||||||
layout([for(b = ball_bearings) bb_diameter(b)])
|
layout([for(b = ball_bearings) bb_diameter(b)])
|
||||||
ball_bearing(ball_bearings[$i])
|
ball_bearing(ball_bearings[$i])
|
||||||
bearing_ball(3);
|
if (bb_width(ball_bearings[$i]) >= 5)
|
||||||
|
bearing_ball(3);
|
||||||
if($preview)
|
if($preview)
|
||||||
ball_bearings();
|
ball_bearings();
|
||||||
|
@@ -28,13 +28,16 @@
|
|||||||
include <../utils/core/core.scad>
|
include <../utils/core/core.scad>
|
||||||
include <../utils/tube.scad>
|
include <../utils/tube.scad>
|
||||||
|
|
||||||
function bb_name(type) = type[0]; //! Part code without shield type suffix
|
function bb_name(type) = type[0]; //! Part code without shield type suffix
|
||||||
function bb_bore(type) = type[1]; //! Internal diameter
|
function bb_bore(type) = type[1]; //! Internal diameter
|
||||||
function bb_diameter(type) = type[2]; //! External diameter
|
function bb_diameter(type) = type[2]; //! External diameter
|
||||||
function bb_width(type) = type[3]; //! Width
|
function bb_width(type) = type[3]; //! Width
|
||||||
function bb_colour(type) = type[4]; //! Shield colour, "silver" for metal
|
function bb_colour(type) = type[4]; //! Shield colour, "silver" for metal
|
||||||
function bb_rim(type) = type[5]; //! Outer rim thickness guesstimate
|
function bb_rim(type) = type[5]; //! Outer rim thickness guesstimate
|
||||||
function bb_hub(type) = type[6]; //! Inner rim thickness guesstimate
|
function bb_hub(type) = type[6]; //! Inner rim thickness guesstimate
|
||||||
|
function bb_flange_diameter(type) = type[7]; //! Flange diameter
|
||||||
|
function bb_flange_width(type) = type[8]; //! Flange width
|
||||||
|
|
||||||
|
|
||||||
module ball_bearing(type) { //! Draw a ball bearing
|
module ball_bearing(type) { //! Draw a ball bearing
|
||||||
shield = bb_colour(type);
|
shield = bb_colour(type);
|
||||||
@@ -45,32 +48,45 @@ module ball_bearing(type) { //! Draw a ball bearing
|
|||||||
h = bb_width(type);
|
h = bb_width(type);
|
||||||
or = bb_diameter(type) / 2;
|
or = bb_diameter(type) / 2;
|
||||||
ir = bb_bore(type) / 2;
|
ir = bb_bore(type) / 2;
|
||||||
|
fr = bb_flange_diameter(type) / 2;
|
||||||
|
fw = bb_flange_width(type);
|
||||||
|
|
||||||
color("silver") {
|
color("silver") {
|
||||||
$fn = 360;
|
$fn = 360;
|
||||||
|
|
||||||
rim_chamfer = rim / 6;
|
|
||||||
rotate_extrude()
|
rotate_extrude()
|
||||||
hull() {
|
hull() {
|
||||||
translate([or - rim, -h / 2 + rim_chamfer])
|
chamfer = rim / 6;
|
||||||
square([rim, h - 2 * rim_chamfer]);
|
translate([or - rim, -h / 2 + chamfer])
|
||||||
|
square([rim, h - 2 * chamfer]);
|
||||||
|
|
||||||
translate([or - rim, -h / 2])
|
translate([or - rim, -h / 2])
|
||||||
square([rim - rim_chamfer, h]);
|
square([rim - chamfer, h]);
|
||||||
}
|
}
|
||||||
|
|
||||||
hub_chamfer = hub / 6;
|
if (fr)
|
||||||
|
rotate_extrude()
|
||||||
|
hull() {
|
||||||
|
chamfer = fw / 6;
|
||||||
|
translate([or - rim, -h / 2 + chamfer])
|
||||||
|
square([fr - or + rim, fw - 2 * chamfer]);
|
||||||
|
|
||||||
|
translate([or - rim, -h / 2])
|
||||||
|
square([fr - or + rim - chamfer, fw]);
|
||||||
|
}
|
||||||
|
|
||||||
rotate_extrude()
|
rotate_extrude()
|
||||||
hull() {
|
hull() {
|
||||||
translate([ir, -h / 2 + hub_chamfer])
|
chamfer = hub / 6;
|
||||||
square([hub, h - 2 * hub_chamfer]);
|
translate([ir, -h / 2 + chamfer])
|
||||||
|
square([hub, h - 2 * chamfer]);
|
||||||
|
|
||||||
translate([ir + hub_chamfer, -h / 2])
|
translate([ir + chamfer, -h / 2])
|
||||||
square([hub - hub_chamfer, h]);
|
square([hub - chamfer, h]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
color(shield) tube(or - rim - eps, ir + hub + eps, h - 1);
|
color(shield) tube(or - rim - eps, ir + hub + eps, h - (h < 5 ? 0.5 : 1));
|
||||||
|
|
||||||
if($children)
|
if($children)
|
||||||
translate_z(bb_width(type) / 2)
|
translate_z(bb_width(type) / 2)
|
||||||
|
@@ -16,12 +16,24 @@
|
|||||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||||
// If not, see <https://www.gnu.org/licenses/>.
|
// If not, see <https://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
BBSMR95 = ["SMR95", 5, 9, 2.5, "silver", 0.5, 0.7]; // SMR95 ball bearing for FlexDrive extruder
|
|
||||||
BB624 = ["624", 4, 13, 5, "blue", 1.2, 1.2]; // 624 ball bearing for idlers
|
|
||||||
BB608 = ["608", 8, 22, 7, "OrangeRed", 1.4, 2.0]; // 608 bearings for wades
|
// name id od w colour or ir fd fw
|
||||||
BB6200 = ["6200", 10, 30, 9, "black", 2.3, 3.6]; // 6200 bearings for KP pillow blocks
|
BBSMR95 = ["SMR95", 5, 9, 2.5, "silver", 0.5, 0.7, 0, 0]; // SMR95 ball bearing for FlexDrive extruder
|
||||||
BB6201 = ["6201", 12, 32, 10, "black", 2.4, 3.7]; // 6201 bearings for KP pillow blocks
|
BB624 = ["624", 4, 13, 5, "blue", 1.2, 1.2, 0, 0]; // 624 ball bearing for idlers
|
||||||
BB6808 = ["6808", 40, 52, 7, "black", 1.5, 1.6];
|
BB608 = ["608", 8, 22, 7, "black", 1.4, 2.0, 0, 0]; // 608 bearings for wades
|
||||||
ball_bearings = [BBSMR95, BB624, BB608, BB6200, BB6201, BB6808];
|
BB6200 = ["6200", 10, 30, 9, "black", 2.3, 3.6, 0, 0]; // 6200 bearings for KP pillow blocks
|
||||||
|
BB6201 = ["6201", 12, 32, 10, "black", 2.4, 3.7, 0, 0]; // 6201 bearings for KP pillow blocks
|
||||||
|
BB6808 = ["6808", 40, 52, 7, "black", 1.5, 1.6, 0, 0];
|
||||||
|
BBMR63 = ["MR63", 3, 6, 2.5, "silver", 0.5, 0.5, 0, 0];
|
||||||
|
BBMR83 = ["MR83", 3, 8, 3, "silver", 0.5, 0.5, 0, 0];
|
||||||
|
BBMR85 = ["MR85", 5, 8, 2.5, "silver", 0.5, 0.5, 0, 0];
|
||||||
|
BBMR93 = ["MR93", 3, 9, 4, "silver", 0.5, 0.5, 0, 0];
|
||||||
|
BBMR95 = ["MR95", 5, 9, 3, "silver", 0.5, 0.5, 0, 0];
|
||||||
|
BBF623 = ["F623", 3, 10, 4, "black", 0.6, 0.7, 11.5, 1];
|
||||||
|
BBF693 = ["F693", 3, 8, 3, "silver", 0.5, 0.7, 9.5, 0.7];
|
||||||
|
BBF695 = ["F695", 5, 13, 4, "silver", 1.0, 1.0, 15, 1];
|
||||||
|
|
||||||
|
ball_bearings = [BBF693, BBF623, BBF695, BBMR63, BBMR83, BBMR93, BBSMR95, BB624, BB608, BB6200, BB6201, BB6808];
|
||||||
|
|
||||||
use <ball_bearing.scad>
|
use <ball_bearing.scad>
|
||||||
|
Reference in New Issue
Block a user