mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-09-04 20:56:07 +02:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
04e94a859a | ||
|
e696dc4718 | ||
|
30955eb350 | ||
|
d5abee4082 | ||
|
f33a0675f5 | ||
|
5223415429 | ||
|
89d2d2bb71 | ||
|
762ff9cb43 | ||
|
f87f3f51ee |
23
CHANGELOG.md
23
CHANGELOG.md
@@ -3,6 +3,29 @@
|
||||
This changelog is generated by `changelog.py` using manually added semantic version tags to classify commits as breaking changes, additions or fixes.
|
||||
|
||||
|
||||
### [v19.4.0](https://github.com/nophead/NopSCADlib/releases/tag/v19.4.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v19.3.0...v19.4.0 "diff with v19.3.0")
|
||||
* 2022-01-29 [`f33a067`](https://github.com/nophead/NopSCADlib/commit/f33a0675f5b9f6a5ebe1c4b9755e894d1e2b7994 "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
|
||||
|
||||
* 2022-01-29 [`5223415`](https://github.com/nophead/NopSCADlib/commit/52234154294011d4cc312f9ff98716f484d20a41 "show commit") [C.P.](# "Chris Palmer") Ball bearing test now two rows.
|
||||
|
||||
* 2022-01-28 [`f87f3f5`](https://github.com/nophead/NopSCADlib/commit/f87f3f51ee778ef7ca30319d1d6ff3f4013e8258 "show commit") [M.B.](# "Martin Budden") Added support for flanged bearings.
|
||||
Also added some new cartridge bearings.
|
||||
|
||||
### [v19.3.0](https://github.com/nophead/NopSCADlib/releases/tag/v19.3.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v19.2.0...v19.3.0 "diff with v19.2.0")
|
||||
* 2022-01-29 [`1ee80f4`](https://github.com/nophead/NopSCADlib/commit/1ee80f4a908ff9939d06186f3b22f54f726fc4d2 "show commit") [C.P.](# "Chris Palmer") Ribbon clamps can now be made to hold multiple ribbons.
|
||||
|
||||
* 2022-01-29 [`4340884`](https://github.com/nophead/NopSCADlib/commit/43408843af2c9b0924d4f5c29ff96644b5f48295 "show commit") [C.P.](# "Chris Palmer") `Butt_box` now has a `thin_blocks` property to make it use `2screw_blocks` instead of fixing blocks along the edges.
|
||||
|
||||
* 2022-01-29 [`c4ccc30`](https://github.com/nophead/NopSCADlib/commit/c4ccc30b35f9b96c8b891efbe424a31bab7e1904 "show commit") [C.P.](# "Chris Palmer") Added `2screw_blocks,` a two screw version of corner blocks.
|
||||
|
||||
* 2022-01-29 [`20db11f`](https://github.com/nophead/NopSCADlib/commit/20db11f81eb713b255c41e3be7e5b9c0373646de "show commit") [C.P.](# "Chris Palmer") Box top bezels can now be modified by adding a child that gets subtracted.
|
||||
|
||||
* 2022-01-29 [`d82db46`](https://github.com/nophead/NopSCADlib/commit/d82db46ea11d99c92cd845a05cc6f9fc069f9497 "show commit") [C.P.](# "Chris Palmer") Added missing description for terminals.
|
||||
|
||||
* 2022-01-26 [`ac58524`](https://github.com/nophead/NopSCADlib/commit/ac58524b8553d09356ca78e830c5ef47d1c1f05b "show commit") [C.P.](# "Chris Palmer") `Butt_box` `star_washers()` property renamed `bbox_star_washers()`.
|
||||
|
||||
* 2022-01-26 [`ef06aa4`](https://github.com/nophead/NopSCADlib/commit/ef06aa43875aad40b016fb2939f256e074699bcf "show commit") [C.P.](# "Chris Palmer") `Butt_box` size and volume echo changed to show `Butt_box`.
|
||||
|
||||
### [v19.2.0](https://github.com/nophead/NopSCADlib/releases/tag/v19.2.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v19.1.0...v19.2.0 "diff with v19.1.0")
|
||||
* 2022-01-25 [`d775a16`](https://github.com/nophead/NopSCADlib/commit/d775a16baa818e04d707e6759fe480bb88bf8b5f "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
|
||||
|
||||
|
BIN
libtest.png
BIN
libtest.png
Binary file not shown.
Before Width: | Height: | Size: 978 KiB After Width: | Height: | Size: 979 KiB |
12
readme.md
12
readme.md
@@ -149,6 +149,8 @@ Also single bearing balls are modelled as just a silver sphere and a BOM entry.
|
||||
| `bb_bore(type)` | Internal diameter |
|
||||
| `bb_colour(type)` | Shield colour, "silver" for metal |
|
||||
| `bb_diameter(type)` | External diameter |
|
||||
| `bb_flange_diameter(type)` | Flange diameter |
|
||||
| `bb_flange_width(type)` | Flange width |
|
||||
| `bb_hub(type)` | Inner rim thickness guesstimate |
|
||||
| `bb_name(type)` | Part code without shield type suffix |
|
||||
| `bb_rim(type)` | Outer rim thickness guesstimate |
|
||||
@@ -170,8 +172,14 @@ Also single bearing balls are modelled as just a silver sphere and a BOM entry.
|
||||
| 1 | `ball_bearing(BB6201)` | Ball bearing 6201-2RS 12mm x 32mm x 10mm |
|
||||
| 1 | `ball_bearing(BB624)` | Ball bearing 624-2RS 4mm x 13mm x 5mm |
|
||||
| 1 | `ball_bearing(BB6808)` | Ball bearing 6808-2RS 40mm x 52mm x 7mm |
|
||||
| 1 | `ball_bearing(BBF623)` | Ball bearing F623-2RS 3mm x 10mm x 4mm |
|
||||
| 1 | `ball_bearing(BBF693)` | Ball bearing F693ZZ 3mm x 8mm x 3mm |
|
||||
| 1 | `ball_bearing(BBF695)` | Ball bearing F695ZZ 5mm x 13mm x 4mm |
|
||||
| 1 | `ball_bearing(BBMR63)` | Ball bearing MR63ZZ 3mm x 6mm x 2.5mm |
|
||||
| 1 | `ball_bearing(BBMR83)` | Ball bearing MR83ZZ 3mm x 8mm x 3mm |
|
||||
| 1 | `ball_bearing(BBMR93)` | Ball bearing MR93ZZ 3mm x 9mm x 4mm |
|
||||
| 1 | `ball_bearing(BBSMR95)` | Ball bearing SMR95ZZ 5mm x 9mm x 2.5mm |
|
||||
| 6 | ` bearing_ball(3)` | Steel ball 3mm |
|
||||
| 5 | ` bearing_ball(3)` | Steel ball 3mm |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -3868,7 +3876,7 @@ NEMA stepper motor model.
|
||||
| `NEMA(type, shaft_angle = 0, jst_connector = false)` | Draw specified NEMA stepper motor |
|
||||
| `NEMA_outline(type)` | 2D outline |
|
||||
| `NEMA_screw_positions(type, n = 4)` | Positions children at the screw holes |
|
||||
| `NEMA_screws(type, screw, n = 4, screw_length = 8, earth = undef)` | Place screws and optional earth tag |
|
||||
| `NEMA_screws(type, screw, n = 4, screw_length = 8, earth = undef, earth_rot = undef)` | Place screws and optional earth tag |
|
||||
|
||||

|
||||
|
||||
|
@@ -21,10 +21,23 @@ use <../utils/layout.scad>
|
||||
|
||||
include <../vitamins/ball_bearings.scad>
|
||||
|
||||
module ball_bearings()
|
||||
layout([for(b = ball_bearings) bb_diameter(b)])
|
||||
ball_bearing(ball_bearings[$i])
|
||||
bearing_ball(3);
|
||||
|
||||
module do_bearings(list)
|
||||
layout([for(b = list) bb_diameter(b)])
|
||||
ball_bearing(list[$i])
|
||||
if (bb_width(list[$i]) >= 5)
|
||||
bearing_ball(3);
|
||||
|
||||
module ball_bearings() {
|
||||
small_bearings = [for(b = ball_bearings) if(bb_diameter(b) < 12) b];
|
||||
big_bearings = [for(b = ball_bearings) if(!in(small_bearings, b)) b];
|
||||
|
||||
translate([0, 0])
|
||||
do_bearings(big_bearings);
|
||||
|
||||
translate([0, -20])
|
||||
do_bearings(small_bearings);
|
||||
}
|
||||
|
||||
if($preview)
|
||||
ball_bearings();
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 114 KiB |
Binary file not shown.
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 43 KiB |
@@ -103,11 +103,11 @@ function reverse(v) = let(n = len(v) - 1) n < 0 ? [] : [for(i = [0 : n]) v[n - i
|
||||
|
||||
function angle_between(v1, v2) = acos(v1 * v2 / (norm(v1) * norm(v2))); //! Return the angle between two vectors
|
||||
|
||||
// https://www.gregslabaugh.net/publications/euler.pdf
|
||||
// http://eecs.qmul.ac.uk/~gslabaugh/publications/euler.pdf
|
||||
function euler(R) = let(ay = asin(-R[2][0]), cy = cos(ay)) //! Convert a rotation matrix to a Euler rotation vector.
|
||||
cy ? [ atan2(R[2][1] / cy, R[2][2] / cy), ay, atan2(R[1][0] / cy, R[0][0] / cy) ]
|
||||
: R[2][0] < 0 ? [atan2( R[0][1], R[0][2]), 180, 0]
|
||||
: [atan2(-R[0][1], -R[0][2]), -180, 0];
|
||||
: R[2][0] < 0 ? [atan2( R[0][1], R[0][2]), 90, 0]
|
||||
: [atan2(-R[0][1], -R[0][2]), -90, 0];
|
||||
|
||||
module position_children(list, t) //! Position children if they are on the Z = 0 plane when transformed by t
|
||||
for(p = list)
|
||||
|
@@ -28,13 +28,16 @@
|
||||
include <../utils/core/core.scad>
|
||||
include <../utils/tube.scad>
|
||||
|
||||
function bb_name(type) = type[0]; //! Part code without shield type suffix
|
||||
function bb_bore(type) = type[1]; //! Internal diameter
|
||||
function bb_diameter(type) = type[2]; //! External diameter
|
||||
function bb_width(type) = type[3]; //! Width
|
||||
function bb_colour(type) = type[4]; //! Shield colour, "silver" for metal
|
||||
function bb_rim(type) = type[5]; //! Outer rim thickness guesstimate
|
||||
function bb_hub(type) = type[6]; //! Inner rim thickness guesstimate
|
||||
function bb_name(type) = type[0]; //! Part code without shield type suffix
|
||||
function bb_bore(type) = type[1]; //! Internal diameter
|
||||
function bb_diameter(type) = type[2]; //! External diameter
|
||||
function bb_width(type) = type[3]; //! Width
|
||||
function bb_colour(type) = type[4]; //! Shield colour, "silver" for metal
|
||||
function bb_rim(type) = type[5]; //! Outer 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
|
||||
shield = bb_colour(type);
|
||||
@@ -45,32 +48,45 @@ module ball_bearing(type) { //! Draw a ball bearing
|
||||
h = bb_width(type);
|
||||
or = bb_diameter(type) / 2;
|
||||
ir = bb_bore(type) / 2;
|
||||
fr = bb_flange_diameter(type) / 2;
|
||||
fw = bb_flange_width(type);
|
||||
|
||||
color("silver") {
|
||||
$fn = 360;
|
||||
|
||||
rim_chamfer = rim / 6;
|
||||
rotate_extrude()
|
||||
hull() {
|
||||
translate([or - rim, -h / 2 + rim_chamfer])
|
||||
square([rim, h - 2 * rim_chamfer]);
|
||||
chamfer = rim / 6;
|
||||
translate([or - rim, -h / 2 + chamfer])
|
||||
square([rim, h - 2 * chamfer]);
|
||||
|
||||
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()
|
||||
hull() {
|
||||
translate([ir, -h / 2 + hub_chamfer])
|
||||
square([hub, h - 2 * hub_chamfer]);
|
||||
chamfer = hub / 6;
|
||||
translate([ir, -h / 2 + chamfer])
|
||||
square([hub, h - 2 * chamfer]);
|
||||
|
||||
translate([ir + hub_chamfer, -h / 2])
|
||||
square([hub - hub_chamfer, h]);
|
||||
translate([ir + chamfer, -h / 2])
|
||||
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)
|
||||
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.
|
||||
// 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
|
||||
BB6200 = ["6200", 10, 30, 9, "black", 2.3, 3.6]; // 6200 bearings for KP pillow blocks
|
||||
BB6201 = ["6201", 12, 32, 10, "black", 2.4, 3.7]; // 6201 bearings for KP pillow blocks
|
||||
BB6808 = ["6808", 40, 52, 7, "black", 1.5, 1.6];
|
||||
ball_bearings = [BBSMR95, BB624, BB608, BB6200, BB6201, BB6808];
|
||||
|
||||
|
||||
// name id od w colour or ir fd fw
|
||||
BBSMR95 = ["SMR95", 5, 9, 2.5, "silver", 0.5, 0.7, 0, 0]; // SMR95 ball bearing for FlexDrive extruder
|
||||
BB624 = ["624", 4, 13, 5, "blue", 1.2, 1.2, 0, 0]; // 624 ball bearing for idlers
|
||||
BB608 = ["608", 8, 22, 7, "black", 1.4, 2.0, 0, 0]; // 608 bearings for wades
|
||||
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>
|
||||
|
@@ -205,12 +205,12 @@ module NEMA_screw_positions(type, n = 4) { //! Positions children at the screw h
|
||||
children();
|
||||
}
|
||||
|
||||
module NEMA_screws(type, screw, n = 4, screw_length = 8, earth = undef) //! Place screws and optional earth tag
|
||||
module NEMA_screws(type, screw, n = 4, screw_length = 8, earth = undef, earth_rot = undef) //! Place screws and optional earth tag
|
||||
NEMA_screw_positions(type, n)
|
||||
if($i != earth)
|
||||
screw_and_washer(screw, screw_length, true);
|
||||
else
|
||||
rotate($i > 1 ? 180 : 0)
|
||||
rotate(is_undef(earth_rot) ? $i > 1 ? 180 : 0 : earth_rot)
|
||||
ring_terminal(M3_ringterm)
|
||||
star_washer(screw_washer(screw))
|
||||
screw(screw, screw_length);
|
||||
|
Reference in New Issue
Block a user