1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-09-04 12:45:30 +02:00

Compare commits

...

14 Commits

Author SHA1 Message Date
Chris
523fc9e9a5 Adafruit Feather 405 contributed by Chris Lott. 2023-07-22 23:56:42 +01:00
Chris
09d2ffb126 Typo in comment fixed. 2023-07-22 19:32:42 +01:00
Chris
3c370359c8 Make front page readme.md labels lower case as GitHub seems have stopped working with uppercase. 2023-07-22 19:08:53 +01:00
Chris
acf45d2aae Updated changelog. 2023-07-22 17:38:06 +01:00
Chris
568d63dd14 Merge branch 'jeroenrnl-SBR' 2023-07-22 17:35:34 +01:00
Chris
e3cde64b61 open_bearing_theta() now derived from open_bearing_width(). 2023-07-22 17:34:22 +01:00
Chris
e61ce02414 Moved things around for better test images. 2023-07-22 16:37:35 +01:00
Chris
f8e125654e Rendred the 3D difference. 2023-07-22 16:36:11 +01:00
Chris
62b1511c82 Removed 3D difference for speed. 2023-07-22 16:35:50 +01:00
Jeroen Roos
84d98a1081 Added SBR rails
This change adds
- SBR rails. For now only SBR16
- The bearing block that goes with it (SBR16UU)
- An 'open' linear bearing (LM16UUOP) that is used by the bearing block
- A 28mm circlip that has a wider opening than then normal circlip.
(circlip_28iw)
2023-06-30 12:57:13 +02:00
Chris
8efbb1d441 Updated changelog. 2023-06-29 11:20:45 +01:00
Chris
5899ffe88f More typos in comments. 2023-06-29 10:43:15 +01:00
Chris
b05131145c Comment typo. 2023-06-28 23:04:15 +01:00
Chris Palmer
5da0f97485 Updated changelog. 2023-05-08 20:19:50 +01:00
30 changed files with 793 additions and 247 deletions

View File

@@ -3,6 +3,47 @@
This changelog is generated by `changelog.py` using manually added semantic version tags to classify commits as breaking changes, additions or fixes.
### [v21.6.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.6.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.5.1...v21.6.0 "diff with v21.5.1")
* 2023-07-22 [`e3cde64`](https://github.com/nophead/NopSCADlib/commit/e3cde64b61b6abfc4a2883e8aa32b66346fde1c4 "show commit") [C.](# "Chris") `open_bearing_theta()` now derived from `open_bearing_width()`.
* 2023-07-22 [`e61ce02`](https://github.com/nophead/NopSCADlib/commit/e61ce0241443fb2c1f0585953bd3f7383b217086 "show commit") [C.](# "Chris") Moved things around for better test images.
* 2023-07-22 [`f8e1256`](https://github.com/nophead/NopSCADlib/commit/f8e125654ed60842d6ca7f33a91377d9cb5f1dc9 "show commit") [C.](# "Chris") Rendred the 3D difference.
* 2023-07-22 [`62b1511`](https://github.com/nophead/NopSCADlib/commit/62b1511c82eacb5124302aed36a52fe0d8104385 "show commit") [C.](# "Chris") Removed 3D difference for speed.
* 2023-06-27 [`84d98a1`](https://github.com/nophead/NopSCADlib/commit/84d98a1081d38c56d5b02645a99223b7616fcd70 "show commit") [J.R.](# "Jeroen Roos") Added SBR rails
* This change adds
- SBR rails. For now only SBR16
- The bearing block that goes with it (SBR16UU)
- An 'open' linear bearing (LM16UUOP) that is used by the bearing block
- A 28mm circlip that has a wider opening than then normal circlip.
`(circlip_28iw)`
#### [v21.5.1](https://github.com/nophead/NopSCADlib/releases/tag/v21.5.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.5.0...v21.5.1 "diff with v21.5.0")
* 2023-06-29 [`5899ffe`](https://github.com/nophead/NopSCADlib/commit/5899ffe88f7952108ce928a5a6188b4aad5044c5 "show commit") [C.](# "Chris") More typos in comments.
* 2023-06-28 [`b051311`](https://github.com/nophead/NopSCADlib/commit/b05131145caf500cd9198b1e9b9fafc69506b50f "show commit") [C.](# "Chris") Comment typo.
### [v21.5.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.5.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.4.1...v21.5.0 "diff with v21.4.1")
* 2023-05-08 [`c3f3d62`](https://github.com/nophead/NopSCADlib/commit/c3f3d629b1ff79d40cc5ad3efcb33e940d6c8056 "show commit") [C.P.](# "Chris Palmer") Added PanelDue V3.
* 2023-05-08 [`c7ba052`](https://github.com/nophead/NopSCADlib/commit/c7ba052ccf24d764aa6460d4559e92596c9e4cf4 "show commit") [C.P.](# "Chris Palmer") Added SMD QFP package.
* 2023-05-08 [`c2c5f50`](https://github.com/nophead/NopSCADlib/commit/c2c5f509860b909ca8fca5ffcc65dbef2f7177c5 "show commit") [C.P.](# "Chris Palmer") Can now used `smd_res()` to draw chokes.
* 2023-05-08 [`d0ae8ca`](https://github.com/nophead/NopSCADlib/commit/d0ae8ca216108f53c9b8e60896ea9b59b845b7e0 "show commit") [C.P.](# "Chris Palmer") Added the ability to have more than one grid on a PCB.
* 2023-05-08 [`e81dcfd`](https://github.com/nophead/NopSCADlib/commit/e81dcfdbd8163ce8e2db450f3a20c296c21327a8 "show commit") [C.P.](# "Chris Palmer") Added right angle option to box headers.
#### [v21.4.1](https://github.com/nophead/NopSCADlib/releases/tag/v21.4.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.4.0...v21.4.1 "diff with v21.4.0")
* 2023-05-08 [`06a286d`](https://github.com/nophead/NopSCADlib/commit/06a286dc989e9cc8cf7918049cd16a862b1a9b94 "show commit") [C.P.](# "Chris Palmer") Fixed missing BOM entry for JST connectors.
Fixed default colour for JST connectors.
Corrected BOM entry to show right angle options on Molex and pin headers.
* 2023-05-08 [`f5496c3`](https://github.com/nophead/NopSCADlib/commit/f5496c373a1ab8ae47d07cc0a52d76e4299876cc "show commit") [C.P.](# "Chris Palmer") Fixed typo in `smd_diode(DO214AC)` package name.
### [v21.4.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.4.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.3.1...v21.4.0 "diff with v21.3.1")
* 2023-05-01 [`5e24a32`](https://github.com/nophead/NopSCADlib/commit/5e24a32a0b422e8032c3c5d377c1a756ff6f1022 "show commit") [C.P.](# "Chris Palmer") Added ESP32 camera.
@@ -66,8 +107,6 @@ This changelog is generated by `changelog.py` using manually added semantic vers
* 2023-02-01 [`abf1f1a`](https://github.com/nophead/NopSCADlib/commit/abf1f1ab3f3eddc2f274df649e8481a4117901eb "show commit") [C.P.](# "Chris Palmer") PCB blocks can now have rounded edges for more realistic cans.
* 2023-02-01 [`df06d1f`](https://github.com/nophead/NopSCADlib/commit/df06d1f57fff64cd6da20684f8371da204f69a82 "show commit") [C.P.](# "Chris Palmer") Updated changelog.
### [v20.23.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.23.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.22.0...v20.23.0 "diff with v20.22.0")
* 2023-02-01 [`470d6d6`](https://github.com/nophead/NopSCADlib/commit/470d6d6216b1cef8ce6cafd4b14300edb62eac4a "show commit") [C.P.](# "Chris Palmer") Started radial components with crystals.
@@ -109,7 +148,7 @@ This changelog is generated by `changelog.py` using manually added semantic vers
* 2023-01-24 [`77e948f`](https://github.com/nophead/NopSCADlib/commit/77e948f43c911442211bcbf6d1b1520184d2c70b "show commit") [C.P.](# "Chris Palmer") Added can bus connectors to OpenGrab model.
Tweaked some PCB component positions.
* 2023-01-24 [`543cdb4`](https://github.com/nophead/NopSCADlib/commit/543cdb4e01d38308a06d4368ebabadb85c696567 "show commit") [C.P.](# "Chris Palmer") Incresed the clearance of holes made for pin header.
* 2023-01-24 [`543cdb4`](https://github.com/nophead/NopSCADlib/commit/543cdb4e01d38308a06d4368ebabadb85c696567 "show commit") [C.P.](# "Chris Palmer") Increased the clearance of holes made for pin header.
### [v20.19.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.19.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.18.1...v20.19.0 "diff with v20.18.1")
* 2023-01-12 [`ebd50ba`](https://github.com/nophead/NopSCADlib/commit/ebd50bae535283b94b310ee74c9b98b2e3b7f8be "show commit") [C.P.](# "Chris Palmer") Added SMD diodes, inductors and potentiometers.
@@ -144,8 +183,6 @@ Client code now calls `dxf()` so that the generated files can be used to speed u
* Change comment about nut sizes from radius to diameter.
* 2022-09-29 [`d95e1e6`](https://github.com/nophead/NopSCADlib/commit/d95e1e64edba4ef51852a1e72d00497154c80c88 "show commit") [C.](# "Chris") Udated changelog.
### [v20.14.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.14.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.13.0...v20.14.0 "diff with v20.13.0")
* 2022-09-29 [`f1737d2`](https://github.com/nophead/NopSCADlib/commit/f1737d257b54957772ab6faea102f8ddb829119b "show commit") [C.](# "Chris") Updated images and readme.
@@ -545,7 +582,7 @@ Lead length removed from TO220 and TO247 vitamin string.
Mainly text spacing changes.
* 2021-09-27 [`9b5ec6a`](https://github.com/nophead/NopSCADlib/commit/9b5ec6af1aba313df6812a5313470ebb7e8fbdd7 "show commit") [C.P.](# "Chris Palmer") Fixed new `rounded_polygon` to work with last OpenSCAD release.
Trainling commas in `let()`.
Trailing commas in `let()`.
* 2021-09-27 [`50958b0`](https://github.com/nophead/NopSCADlib/commit/50958b064d5a6d5ca3fd6525a8c3d3a2c5b20199 "show commit") [C.P.](# "Chris Palmer") Added `$show_plugs` to show crude reprentations of housings on `pin_headers` and Molex KK headers.
@@ -1207,7 +1244,7 @@ Updated pics and readme.
* 2020-12-28 [`f6f4fcc`](https://github.com/nophead/NopSCADlib/commit/f6f4fcc7e84e40669446708e2352ea68c49b7961 "show commit") [M.B.](# "Martin Budden") Added `M5_cs_cap` screw
#### [v10.21.1](https://github.com/nophead/NopSCADlib/releases/tag/v10.21.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v10.21.0...v10.21.1 "diff with v10.21.0")
* 2020-12-28 [`ba586b3`](https://github.com/nophead/NopSCADlib/commit/ba586b368582db163af143ebb60afed270f77b1c "show commit") [C.P.](# "Chris Palmer") Example images update to match new contersink screws and teardrops.
* 2020-12-28 [`ba586b3`](https://github.com/nophead/NopSCADlib/commit/ba586b368582db163af143ebb60afed270f77b1c "show commit") [C.P.](# "Chris Palmer") Example images update to match new countersink screws and teardrops.
### [v10.21.0](https://github.com/nophead/NopSCADlib/releases/tag/v10.21.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v10.20.1...v10.21.0 "diff with v10.20.1")
* 2020-12-28 [`8d22940`](https://github.com/nophead/NopSCADlib/commit/8d22940506df525ac52ef6f8a00ea03661f3b682 "show commit") [C.P.](# "Chris Palmer") Project blurb can now be split with into sections with markdown horizontal rules
@@ -1485,7 +1522,7 @@ Reverted the jst header pin position change.
* 2020-09-20 [`933fea6`](https://github.com/nophead/NopSCADlib/commit/933fea687c54d7d8ec48fe92aae12ffca0666789 "show commit") [C.P.](# "Chris Palmer") Removed debug code
* 2020-09-19 [`a7803b1`](https://github.com/nophead/NopSCADlib/commit/a7803b1efbf92c5e27f3171d7e2a92634fa2d84f "show commit") [C.P.](# "Chris Palmer") Improved numerical accuarcy of catenary calculations.
* 2020-09-19 [`a7803b1`](https://github.com/nophead/NopSCADlib/commit/a7803b1efbf92c5e27f3171d7e2a92634fa2d84f "show commit") [C.P.](# "Chris Palmer") Improved numerical accuracy of catenary calculations.
### [v9.7.0](https://github.com/nophead/NopSCADlib/releases/tag/v9.7.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v9.6.1...v9.7.0 "diff with v9.6.1")
* 2020-09-19 [`1255e71`](https://github.com/nophead/NopSCADlib/commit/1255e712719ce66fd3b231e5c212ea69b0bb9f1c "show commit") [C.P.](# "Chris Palmer") Added catenary curves.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 977 KiB

After

Width:  |  Height:  |  Size: 956 KiB

View File

@@ -96,6 +96,7 @@ use <tests/rails.scad>
use <tests/ring_terminals.scad>
use <tests/rockers.scad>
use <tests/rod.scad>
use <tests/SBR_rails.scad>
use <tests/screws.scad>
use <tests/sealing_strip.scad>
use <tests/servo_motors.scad>
@@ -144,7 +145,7 @@ x1 = x0 + 110;
x2 = x1 + 90;
x3 = x2 + 130;
x4 = x3 + 200;
x5 = 850;
x5 = 900;
x6 = x5 + 150;
cable_grommets_y = 0;
@@ -233,8 +234,8 @@ tubings_y = sealing_strip_y + 20;
pillars_y = tubings_y + 20;
ball_bearings_y = pillars_y + 40;
pulleys_y = ball_bearings_y + 40;
leadnuts_y = pulleys_y + 60;
linear_bearings_y = leadnuts_y + 50;
leadnuts_y = pulleys_y + 35;
linear_bearings_y = leadnuts_y + 65;
steppers_y = linear_bearings_y + 110;
sheets_y = steppers_y + 55;
pcbs_y = sheets_y + 60;
@@ -289,7 +290,9 @@ translate([x0 + 120, leadnuts_y])
leadnuthousings();
translate([x0, linear_bearings_y]) {
linear_bearings();
translate([0, -30])
linear_bearings();
rods();
}
@@ -397,7 +400,7 @@ blowers_y = ssrs_y + 60;
hot_ends_y = blowers_y + 100;
batteries_y = hot_ends_y + 55;
panel_meters_y = batteries_y + 70;
extrusions_y = panel_meters_y + 80;
extrusions_y = panel_meters_y + 100;
translate([x3, veroboard_y])
veroboard_test();
@@ -465,11 +468,11 @@ rails_y = belts_y + 200;
extrusion_brackets_y = rails_y + 250;
sk_brackets_y = extrusion_brackets_y + 80;
kp_pillow_blocks_y = sk_brackets_y + 60;
scs_bearing_blocks_y = kp_pillow_blocks_y + 60;
bearing_blocks_y = kp_pillow_blocks_y + 60;
box_sections_y = batteries_y;
BLDC_y = scs_bearing_blocks_y + 120;
pot_y = BLDC_y + 40;
cable_strip_y = pot_y + 50;
BLDC_y = bearing_blocks_y + 180;
pot_y = bearing_blocks_y;
cable_strip_y = sheets_y + 30;
translate([0, transformers_y])
servo_motors();
@@ -484,9 +487,13 @@ translate([x4 + 200, belts_y + 58]) {
translate([x4 + 175, belts_y, -20])
drag_chains();
translate([x4, rails_y + 130])
translate([x4, rails_y + 130]) {
rails();
translate([305, 0])
sbr_rails();
}
translate([x4, cable_strip_y])
cable_strips();
@@ -502,8 +509,8 @@ translate([x4, extrusion_brackets_y])
translate([x1, swiss_clips_y + 50])
shaft_couplings();
translate([x4, scs_bearing_blocks_y])
scs_bearing_blocks();
translate([x4, bearing_blocks_y])
bearing_blocks();
translate([x4, BLDC_y])
bldc_motors();

427
readme.md

File diff suppressed because it is too large Load Diff

View File

@@ -80,9 +80,16 @@ def codify(word, url):
return '`' + word + '`'
return word
typos = [ # Typos that are ambiguous to codespell
('cnc_bit+_r', 'cnc_bit_r'),
('Udated', 'Updated'),
('decription', 'description'),
('Trainling', 'Trailing'),
]
def fixup_comment(comment, url):
comment = comment.replace('cnc_bit+_r', 'cnc_bit_r')
for typo in typos:
comment = comment.replace(typo[0], typo[1])
""" markup code words and fix new paragraphs """
result = ''
word = ''
@@ -162,6 +169,6 @@ if __name__ == '__main__':
# Print commits excluding merges
if not c.comment.startswith('Merge branch') and not c.comment.startswith('Merge pull') and not re.match(r'U..ated ch.*log.*', c.comment):
if not c.comment.startswith('Merge branch') and not c.comment.startswith('Merge pull') and not re.match(r'U.?.ated ch.*log.*', c.comment):
print('* %s [`%s`](%s "show commit") %s %s\n' % (c.date, c.hash[:7], url + '/commit/' + c.hash, initials(c.author), fixup_comment(c.comment, url)), file = file)
do_cmd(('codespell -w -L od ' + filename).split())

View File

@@ -201,7 +201,7 @@ def tests(tests):
body = bodies[type]
index[type] += [cap_name]
body += ['<a name="%s"></a>' % cap_name]
body += ['<a name="%s"></a>' % cap_name.lower()]
body += ["## " + cap_name]
doc = None
@@ -301,7 +301,7 @@ def tests(tests):
for type in types:
if i < len(index[type]):
name = sorted(index[type])[i]
print('<td> <a href = "#' + name + '">' + name + '</a> </td>', file = doc_file, end = '')
print('<td> <a href = "#' + name.lower() + '">' + name + '</a> </td>', file = doc_file, end = '')
else:
print('<td></td>', file = doc_file, end = '')
print('</tr>', file = doc_file)

46
tests/SBR_rails.scad Normal file
View File

@@ -0,0 +1,46 @@
//
// NopSCADlib Copyright Chris Palmer 2023
// nop.head@gmail.com
// hydraraptor.blogspot.com
//
// This file is part of NopSCADlib.
//
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
// GNU General Public License as published by the Free Software Foundation, either version 3 of
// the License, or (at your option) any later version.
//
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with NopSCADlib.
// If not, see <https://www.gnu.org/licenses/>.
//
include <../core.scad>
include <../vitamins/sbr_rails.scad>
use <../utils/layout.scad>
use <../vitamins/bearing_block.scad>
length = 200;
sheet = 3;
module sbr_rails()
layout([for(r = sbr_rails) sbr_rail_base_width(r)], 10)
rotate([90, 180,0]) {
rail = sbr_rails[$i];
sbr_rail(rail, length);
carriage = sbr_rail_carriage(rail);
screw = sbr_rail_screw(rail);
sbr_bearing_block_assembly(carriage, sheet);
sbr_screw_positions(rail, length)
explode(20)
rotate([90,0,0])
screw(sbr_rail_screw(rail), 18);
}
if($preview)
sbr_rails();

View File

@@ -24,12 +24,26 @@ use <../utils/layout.scad>
module scs_bearing_blocks()
layout([for(s = scs_bearing_blocks) scs_size(s).x], 10) {
part_thickness = 5;
scs_bearing_block_assembly(scs_bearing_blocks[$i], part_thickness);
translate([0, 60])
scs_bearing_block_assembly(scs_bearing_blocks[$i], part_thickness);
if($i > 0) // skip $i==0, since no SCS6LUU long variant to match SCS6UU
translate([0, 60])
translate([0, 120])
scs_bearing_block_assembly(scs_bearing_blocks_long[$i - 1], part_thickness);
}
if($preview)
module sbr_bearing_blocks()
layout([for(s = sbr_bearing_blocks) sbr_size(s).x], 10) {
part_thickness = 5;
sbr_bearing_block_assembly(sbr_bearing_blocks[$i], part_thickness);
}
module bearing_blocks() {
scs_bearing_blocks();
translate([190, 0])
sbr_bearing_blocks();
}
if($preview)
bearing_blocks();

View File

@@ -22,7 +22,7 @@ use <../utils/layout.scad>
include <../vitamins/circlips.scad>
module circlips(all = false)
layout([for(c = circlips) circlip_d3(c)], 10, false) let(c = circlips[$i]) {
layout([for(c = circlips) circlip_d3(c)], 5, false) let(c = circlips[$i]) {
gap = circlip_d3(c) + 2;
internal_circlip(c, 1);

View File

@@ -21,13 +21,18 @@ use <../utils/layout.scad>
include <../vitamins/linear_bearings.scad>
module linear_bearings()
module linear_bearings() {
layout([for(b = linear_bearings) 2 * bearing_radius(b)]) {
linear_bearing(linear_bearings[$i]);
translate([0, 30])
linear_bearing(linear_bearings[$i]);
translate([0, 60])
linear_bearing(long_linear_bearings[$i]);
}
layout([for(b = open_linear_bearings) 2 * bearing_radius(b)])
translate([105, 0])
linear_bearing(open_linear_bearings[$i]);
}
if($preview)
linear_bearings();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 258 KiB

After

Width:  |  Height:  |  Size: 254 KiB

BIN
tests/png/sbr_rails.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View File

@@ -104,7 +104,7 @@ 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
// 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.
function euler(R) = let(ay = asin(-R[2][0]), cy = cos(ay)) //! Convert a rotation matrix to an 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]), 90, 0]
: [atan2(-R[0][1], -R[0][2]), -90, 0];

View File

@@ -41,6 +41,17 @@ function scs_circlip(type) = type[15]; //! Circlip used
function scs_spacer(type) = type[16]; //! Spacer used in long bearings
function sbr_size(type) = [type[4],type[6],type[5]]; //! Size of SBR bracket bounding block
function sbr_hole_offset(type) = type[2]; //! Offset of bearing hole from base of *rail*
function sbr_side_height(type) = type[3]; //! Height of side above *rail*
function sbr_screw(type) = type[10]; //! Screw type
function sbr_screw_separation_x(type) = type[7]; //! Screw separation in X direction
function sbr_screw_separation_z(type) = type[8]; //! Screw separation in Z direction
function sbr_bearing(type) = type[12]; //! Linear bearing used
function sbr_circlip(type) = type[13]; //! Circlip used
function sbr_spacer(type) = type[14]; //! Spacer used in long bearings
sks_bearing_block_colour = grey(90);
module scs_bearing_block(type) { //! Draw the specified SCS bearing block
@@ -63,11 +74,6 @@ module scs_bearing_block(type) { //! Draw the specified SCS bearing block
bearing = scs_bearing(type);
clip = scs_circlip(type);
module right_trapezoid(base, top, height, h = 0, center = true) {//! A right angled trapezoid with the 90&deg; corner at the origin. 3D when `h` is nonzero, otherwise 2D
extrude_if(h, center = center)
polygon(points = [ [0,0], [base, 0], [top, height], [0, height] ]);
}
boltHoleRadius = screw_clearance_radius(S1);
footHeight = min(0.75, (G - bearing_dia(bearing) - 1.5) / 2); // estimate, not specified on drawings
@@ -169,3 +175,142 @@ module scs_bearing_block_assembly(type, part_thickness, screw_type, nut_type) {
washer(washer_type);
}
}
/* SBR bearing blocks */
module sbr_bearing_block(type) { //! Draw the specified SBR bearing block
vitamin(str("sbr_bearing_block(", type[0], "): ", type[0], " bearing block"));
T = type[1];
h = sbr_hole_offset(type);
H = sbr_side_height(type);
W = sbr_size(type)[0];
G = sbr_size(type)[1];
M = sbr_size(type)[2];
J = sbr_screw_separation_x(type);
K = sbr_screw_separation_z(type);
S1 = sbr_screw(type);
I = type[11]; // screw length
S2 = type[15];
S2L = type[16];
bearing = sbr_bearing(type);
clip = sbr_circlip(type);
chamfer = 1.5;
A = type[9]; // size of chamfered overhang - vertical
Ah = A + chamfer * 2; // size of chamfered overhand - horizontal - not given in drawings
width = W - (2 * chamfer);
height = G - chamfer;
boltHoleRadius = screw_radius(S1);
setScrewRadius = screw_radius(S2);
color(sks_bearing_block_colour) {
render() difference() {
linear_extrude(M, center = true, convexity=2) {
cutoutheight = 15; // chosen to fit SBR16, may not work with others
bearingRadius = bearing_dia(bearing) / 2;
bearingTheta = open_bearing_theta(bearing);
bearingOpening = open_bearing_width(bearing);
bearingOpeningBig = bearingOpening + (tan(bearingTheta/2) * cutoutheight);
// center section with bearing hole
difference() {
translate([-width/2, -(H-h - chamfer)])
square([width, height]);
circle(r = bearingRadius);
for(m = [0, 1])
mirror([m, 0, 0])
translate([0, h - (cutoutheight/2) - H + G + 0.1])
right_trapezoid(bearingOpening/2, bearingOpeningBig/2, cutoutheight/2);
}
// add the sides
for(m = [0, 1])
mirror([m, 0, 0]) {
translate([-(W/2) + chamfer, -((H-h))]) {
difference() {
union() {
right_trapezoid(Ah - chamfer,Ah,chamfer);
rotate([0,0,90])
right_trapezoid(A + chamfer,A,chamfer);
}
translate([-(chamfer +0.1), -0.1,0])
right_trapezoid(chamfer/2 + 0.2, 0, chamfer/2+ 0.2);
}
}
}
}
// bolt holes
for(x = [-J / 2, J / 2])
translate([x, h - H + I/2 - 0.1, 0])
rotate([90, 0, 0])
for (y = [-K / 2, K / 2])
translate([0, y])
cylinder(r = boltHoleRadius, h=I + 0.1, center=true);
// set screw holes
translate([-width/2 + S2L/2 - 0.1,0,0])
rotate([0,90,0])
cylinder(r = setScrewRadius, h=S2L, center=true);
translate([0,-(H-h) + chamfer + S2L/2 -0.1,0])
rotate([0,90,90])
cylinder(r = setScrewRadius, h=S2L, center=true);
}
}
not_on_bom() no_explode() {
spacer = sbr_spacer(type);
for(end = spacer ? [-1, 1] : 0)
translate_z(end * (bearing_length(bearing) + spacer) / 2)
rotate([0,0,-90])
linear_bearing(bearing);
for(end = [-1, 1])
translate_z(end * ((spacer ? 2 * bearing_length(bearing) + spacer : bearing_length(bearing)) + circlip_thickness(clip)) / 2)
rotate(180)
internal_circlip(clip);
translate([-width/2 - 0.1,0,0])
rotate([0,90,180])
screw(S2, S2L);
translate([0,-(H-h) + chamfer - 0.1,0])
rotate([0,90,270])
screw(S2, S2L);
}
}
module sbr_bearing_block_hole_positions(type) { //! Place children at hole positions
y = sbr_hole_offset(type) - sbr_side_height(type);
screw_separation_x = sbr_screw_separation_x(type);
screw_separation_z = sbr_screw_separation_z(type);
for(x = [-screw_separation_x, screw_separation_x], z = [-screw_separation_z, screw_separation_z])
translate([x / 2, y, z / 2])
rotate([-90, 0, 0])
children();
}
module sbr_bearing_block_assembly(type, part_thickness, screw_type) { //! Assembly with screws in place
I = type[11]; // screw length
sbr_bearing_block(type);
screw_type = is_undef(screw_type) ? sbr_screw(type) : screw_type;
G = sbr_size(type)[1];
screw_length = screw_shorter_than(I + part_thickness);
translate([0,-part_thickness,0])
sbr_bearing_block_hole_positions(type)
rotate([0,180,0])
screw(screw_type, screw_length);
}
/* Generic bearing block functions */
module right_trapezoid(base, top, height, h = 0, center = true) {//! A right angled trapezoid with the 90&deg; corner at the origin. 3D when `h` is nonzero, otherwise 2D
extrude_if(h, center = center)
polygon(points = [ [0,0], [base, 0], [top, height], [0, height] ]);
}

View File

@@ -36,8 +36,12 @@ SCS10LUU = ["SCS10LUU", 8, 13, 20, 40, 68, 26, 21, 28, 45, 6, M5_cap_sc
SCS12LUU = ["SCS12LUU", 8, 15, 21, 42, 70, 28, 24, 30.5, 50, 5.75, M5_cap_screw, 4.3, 12, LM12UU, circlip_21i, 4];
SCS16LUU = ["SCS16LUU", 9, 19, 25, 50, 85, 38.5, 32.5, 36, 60, 7, M5_cap_screw, 4.3, 12, LM16UU, circlip_28i, 4];
// T h H W M G J K A S1 I LB S2 S2L
SBR16UU = ["SBR16UU", 16, 25, 45, 45, 45, 33, 32, 30, 9, M5_cap_screw, 12, LM16UUOP, circlip_28iw, 0, M5_grub_screw, 5];
scs_bearing_blocks = [SCS6UU, SCS8UU, SCS10UU, SCS12UU, SCS16UU];
scs_bearing_blocks_long = [SCS8LUU, SCS10LUU, SCS12LUU, SCS16LUU];
sbr_bearing_blocks = [SBR16UU];
use <bearing_block.scad>

View File

@@ -32,14 +32,14 @@ function circlip_thickness(type) = type[4]; //! Thickness
function circlip_a(type) = type[5]; //! Size of the lugs
function circlip_b(type) = type[6]; //! Widest part of the taper
function circlip_d5(type) = type[7]; //! Plier hole diameter
function circlip_closed_angle(type) = is_undef(type[8]) ? 25 : type[8]; //! Closed angle
circlip_colour = grey(20);
closed_angle = 25;
module internal_circlip(type, open = 0) { //! Draw specified internal circlip, open = 0, for nominal size installed, 1 for relaxed uninstalled, -1 for squeezed to install
d1 = circlip_d1(type);
vitamin(str("circlip(", type[0], "): Circlip internal ", d1, "mm"));
wide = is_undef(type[8]) ? "" : " (wide opening)";
vitamin(str("circlip(", type[0], "): Circlip internal ", d1, "mm",wide));
d3 = circlip_d3(type);
d2 = circlip_d2(type);
a = circlip_a(type);
@@ -50,7 +50,7 @@ module internal_circlip(type, open = 0) { //! Draw specified internal circlip, o
or = od / 2;
c = (d3 - d1);
angle = (od - d1) / d1 * 360 + closed_angle;
angle = (od - d1) / d1 * 360 + circlip_closed_angle(type);
tab_angle = 360 * a / PI / od;
p = [0, -or + b / 2, 1] * rot3_z(angle / 2 + tab_angle);
pitch = (or - a / 2);

View File

@@ -22,7 +22,8 @@ circlip_15i = ["circlip_15i", 15, 15.7, 16.2, 1.0, 3.7, 2.0, 1.7];
circlip_19i = ["circlip_19i", 19, 20.0, 20.5, 1.0, 4.1, 2.2, 2.0];
circlip_21i = ["circlip_21i", 21, 22.0, 22.5, 1.0, 4.2, 2.4, 2.0];
circlip_28i = ["circlip_28i", 28, 29.4, 30.1, 1.2, 4.8, 2.9, 2.0];
circlip_28iw = ["circlip_28iw", 28, 29.4, 30.1, 1.2, 4.8, 2.9, 2.0, 100]; // with wide opening
circlips = [circlip_12i, circlip_15i, circlip_19i, circlip_21i, circlip_28i];
circlips = [circlip_12i, circlip_15i, circlip_19i, circlip_21i, circlip_28i, circlip_28iw];
use <circlip.scad>

View File

@@ -23,6 +23,7 @@
include <../utils/core/core.scad>
use <../utils/tube.scad>
use <../utils/sector.scad>
bearing_colour = grey(70);
groove_colour = grey(60);
@@ -36,6 +37,10 @@ function bearing_groove_length(type) = type[4]; //! Groove length
function bearing_groove_dia(type) = type[5]; //! Groove diameter
function bearing_groove_spacing(type) = type[6]; //! Spacing between grooves, outer to outer, ie includes the grooves themselves
function open_bearing_width(type) = type[7]; //! For open bearings, the width of the opening at the rod
function open_bearing_theta(type) = 2 * asin(open_bearing_width(type) / bearing_rod_dia(type)); //! For open bearings, the angle of the opening
function bearing_radius(type) = bearing_dia(type) / 2; //! Outside radius
module linear_bearing(type) { //! Draw specified linear bearing
@@ -50,21 +55,34 @@ module linear_bearing(type) { //! Draw specified linear bearing
gs = bearing_groove_spacing(type);
offset = (length-gs)/2;
module cut_tube(or, ir, h, center = true)
linear_extrude(h, center = center, convexity = 5)
difference() {
ring(or = or, ir = ir);
// Open bearing
if (!is_undef(type[7])) {
theta = open_bearing_theta(type);
sector(or + 1, 180 - theta / 2, 180 + theta / 2);
}
}
if(gs==0) {
color(bearing_colour) tube(or = or, ir = casing_ir, h = length);
} else {
translate_z(-length/2) {
color(bearing_colour) tube(or = or, ir = casing_ir, h = offset, center = false);
color(groove_colour) translate_z(offset) tube(or = gr, ir = casing_ir, h = gl,center = false);
color(bearing_colour) translate_z(offset+gl) tube(or = or, ir = casing_ir, h = gs-2*gl, center = false);
color(groove_colour) translate_z(offset+gs-gl) tube(or = gr, ir = casing_ir, h = gl, center = false);
color(bearing_colour) translate_z(offset+gs) tube(or = or, ir = casing_ir, h = offset, center = false);
color(bearing_colour) cut_tube(or = or, ir = casing_ir, h = offset, center = false);
color(groove_colour) translate_z(offset) cut_tube(or = gr, ir = casing_ir, h = gl,center = false);
color(bearing_colour) translate_z(offset+gl) cut_tube(or = or, ir = casing_ir, h = gs-2*gl, center = false);
color(groove_colour) translate_z(offset+gs-gl) cut_tube(or = gr, ir = casing_ir, h = gl, center = false);
color(bearing_colour) translate_z(offset+gs) cut_tube(or = or, ir = casing_ir, h = offset, center = false);
}
}
rod_r = bearing_rod_dia(type) / 2;
color(seal_colour)
tube(or = casing_ir, ir = rod_r + eps, h = length - 0.5);
cut_tube(or = casing_ir, ir = rod_r + eps, h = length - 0.5);
color(seal_colour * 0.8)
tube(or = rod_r * 1.12, ir = rod_r, h = length);
cut_tube(or = rod_r * 1.12, ir = rod_r, h = length);
}

View File

@@ -20,25 +20,27 @@
//
// Linear bearings
//
// L od id gl gd gs
LM16UU = ["LM16UU", 37, 28, 16, 1.6, 27.0, 26.5];
LM16LUU = ["LM16LUU", 70, 28, 16, 1.6, 27.0, 53.0];
LM12UU = ["LM12UU", 30, 21, 12, 1.3, 20.0, 23.0];
LM12LUU = ["LM12LUU", 57, 21, 12, 1.3, 20.0, 46.0];
LM10UU = ["LM10UU", 29, 19, 10, 1.3, 18.0, 22.0];
LM10LUU = ["LM10LUU", 55, 19, 10, 1.3, 18.0, 44.0];
LM8UU = ["LM8UU", 24, 15, 8, 1.1, 14.3, 17.5];
LM8LUU = ["LM8LUU", 45, 15, 8, 1.1, 14.3, 35.0];
LM6UU = ["LM6UU", 19, 12, 6, 1.1, 11.5, 13.5];
LM6LUU = ["LM6LUU", 35, 12, 6, 1.1, 11.5, 27.0];
LM5UU = ["LM5UU", 15, 10, 5, 1.1, 9.5, 10.2];
LM5LUU = ["LM5LUU", 28, 10, 5, 1.1, 9.5, 20.4];
LM4UU = ["LM4UU", 12, 8, 4, 0, 0, 0];
LM4LUU = ["LM4LUU", 23, 8, 4, 0, 0, 0];
LM3UU = ["LM3UU", 10, 7, 3, 0, 0, 0];
LM3LUU = ["LM3LUU", 19, 7, 3, 0, 0, 0];
// L od id gl gd gs h1
LM16UU = ["LM16UU", 37, 28, 16, 1.6, 27.0, 26.5];
LM16LUU = ["LM16LUU", 70, 28, 16, 1.6, 27.0, 53.0];
LM16UUOP = ["LM16UUOP", 37, 28, 16, 1.6, 27.0, 26.5, 11];
LM12UU = ["LM12UU", 30, 21, 12, 1.3, 20.0, 23.0];
LM12LUU = ["LM12LUU", 57, 21, 12, 1.3, 20.0, 46.0];
LM10UU = ["LM10UU", 29, 19, 10, 1.3, 18.0, 22.0];
LM10LUU = ["LM10LUU", 55, 19, 10, 1.3, 18.0, 44.0];
LM8UU = ["LM8UU", 24, 15, 8, 1.1, 14.3, 17.5];
LM8LUU = ["LM8LUU", 45, 15, 8, 1.1, 14.3, 35.0];
LM6UU = ["LM6UU", 19, 12, 6, 1.1, 11.5, 13.5];
LM6LUU = ["LM6LUU", 35, 12, 6, 1.1, 11.5, 27.0];
LM5UU = ["LM5UU", 15, 10, 5, 1.1, 9.5, 10.2];
LM5LUU = ["LM5LUU", 28, 10, 5, 1.1, 9.5, 20.4];
LM4UU = ["LM4UU", 12, 8, 4, 0, 0, 0];
LM4LUU = ["LM4LUU", 23, 8, 4, 0, 0, 0];
LM3UU = ["LM3UU", 10, 7, 3, 0, 0, 0];
LM3LUU = ["LM3LUU", 19, 7, 3, 0, 0, 0];
linear_bearings = [LM3UU, LM4UU, LM5UU, LM6UU, LM8UU, LM10UU, LM12UU, LM16UU];
long_linear_bearings = [LM3LUU, LM4LUU, LM5LUU, LM6LUU, LM8LUU, LM10LUU, LM12LUU, LM16LUU];
open_linear_bearings = [LM16UUOP];
use <linear_bearing.scad>

View File

@@ -1040,11 +1040,46 @@ PanelDue_v3 = ["PanelDue_v3", "Panel Due v3.0a LCD Display interface", 53, 73, 1
],
];
//================================================
// Adafruit Feather
// by Chris Lott, chris@thestumbler.io
// Sacheon South Korea, 17 Jul 2023
//================================================
// NOTES:
// * mounting holes should be accurate
// * corner radius was just eyeballed
// * pin headers should be accurate
// * battery and qwiik connectore just eyeballed
Feather405 = let(size = [inch(2.0), inch(0.9)])
["Feather405", "Adafruit Feather 405",
size.x, size.y, 1.6, inch(0.10),
inch(0.1), inch(0.175), "green", false,
[[ inch(0.1), inch(0.1) ], // Holes
[ -inch(0.1), inch(0.1) ],
[ -inch(0.1), -inch(0.1) ],
[ inch(0.1), -inch(0.1) ],
],
[
[size.x / 2, inch(0.05), 0, "-2p54header", 16, 1],
[inch(1.2), -inch(0.05), 0, "-2p54header", 12, 1],
[inch(1.3), size.y / 2, -90, "smd_qfp", QFP50P1200X1200X160_64N, "STM32F405"],
[ 3, size.y / 2, 180, "usb_C"],
[ 10, -6.5, 180, "jst_ph", 2, true, grey(25) ],
[ -5, 0.40 * size.y, 90, "jst_zh", 4, true, grey(30) ],
], // components
[], // accessories
[inch(0.65), inch(0.05), 12, 2, gold, inch(0.1), inch(0.8),
inch(0.25), inch(0.05), 4, 1, gold, inch(0.1), 0 ], // grids of holes for the pins
[], // polygon
M2p5_dome_screw,
];
tiny_pcbs = [XIAO, MP1584EN, TP4056, ESP_01, LIPO_fuel_gauge];
big_pcbs = [BTT_RELAY_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO, BTT_SKR_V1_4_TURBO, DuetE, Duex5];
pcbs = [RAMPSEndstop, MT3608, KY_040, L9110S, ZC_A0591, ArduinoNano, RPI_Pico, ESP32_DOIT_V1, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, WD2002SJ, OPZ2, PanelDue_v3, RPI3A, RPI3, RPI4];
pcbs = [RAMPSEndstop, MT3608, KY_040, L9110S, ZC_A0591, ArduinoNano, Feather405, RPI_Pico, ESP32_DOIT_V1, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, WD2002SJ, OPZ2, PanelDue_v3, RPI3A, RPI3, RPI4];
pcbs_not_shown = [Melzi, Duex2, PSU12V1A, Keyes5p1, PI_IO, ExtruderPCB];

View File

@@ -32,7 +32,7 @@ function pot_face(type) = type[2]; //! Faceplate rib width, plate depth and
function pot_wafer(type) = type[3]; //! Width, diameter and thickness of the track wafer plus true if curved
function pot_gangs(type) = type[4]; //! Number of gangs for mult-gang pot
function pot_thread_d(type) = type[5]; //! Nomininal thread diameter
function pot_thread_p(type) = type[6]; //! Thread pritch
function pot_thread_p(type) = type[6]; //! Thread pitch
function pot_thread_h(type) = type[7]; //! Height of threaded part
function pot_boss_d(type) = type[8]; //! Boss diameter
function pot_boss_h(type) = type[9]; //! Boss height

123
vitamins/sbr_rail.scad Normal file
View File

@@ -0,0 +1,123 @@
//
// NopSCADlib Copyright Chris Palmer 2023
// nop.head@gmail.com
// hydraraptor.blogspot.com
//
// This file is part of NopSCADlib.
//
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
// GNU General Public License as published by the Free Software Foundation, either version 3 of
// the License, or (at your option) any later version.
//
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with NopSCADlib.
// If not, see <https://www.gnu.org/licenses/>.
//
//
//! SBR rails
//!
//! The rails are drawn from the center of the rod.
//! `sbr_rail_center_height(type)` can be used to determine where the bottom of the rail is.
//
include <../utils/core/core.scad>
use <bearing_block.scad>
use <linear_bearing.scad>
use <rod.scad>
use <screw.scad>
function sbr_rail_diameter(type) = type[1]; //! Diameter of the rod
function sbr_rail_center_height(type) = type[2]; //! Height of the center above the bottom of the rail
function sbr_rail_base_width(type) = type[3]; //! Width of the rail base
function sbr_rail_carriage(type) = type[5]; //! Carriage to use with this rail
function sbr_rail_screw(type) = type[7]; //! Screw to fasten this rail
module sbr_rail(type , l) { //! Draw an SBR rail
base_colour = grey(70);
screw_colour = grey(10);
d = sbr_rail_diameter(type);
h = sbr_rail_center_height(type);
B = sbr_rail_base_width(type);
T = type[4];
C = type[8];
S2 = sbr_rail_screw(type);
S3 = type[9]; // Screw that fastens the rod to the base
S3L = type[10]; // length of that screw
h1 = open_bearing_width(sbr_bearing(sbr_rail_carriage(type)));
vitamin(str("sbr_rail(", d, ", ", l, "): SBR", d, " rail, length ", l, "mm"));
not_on_bom()
no_explode()
rod(d, l, center=true);
base = (h1/2 + C/2) /2; // guess, not clear from drawings
color(base_colour)
difference() {
linear_extrude(l - 5, center=true, convexity=2)
translate([0,h-(T/2),0])
polygon([
[-h1/2, -T/2],
[-h1/2 - T/2, T/2],
[-B/2, T/2],
[-B/2, -T/2],
[-base, -T/2],
[-d/4, -h+(d/2)],
[d/4, -h+(d/2)],
[base, -T/2],
[B/2, -T/2],
[B/2, T/2],
[h1/2 + T/2, T/2],
[h1/2, -T/2],
]);
sbr_screw_locations(type, l)
translate([0,h-T+0.01,0])
rotate([90,0,0])
cylinder(r=screw_clearance_radius(S3), h=S3L, center=true);
sbr_screw_positions(type, l)
translate([0,T/2,0])
rotate([90,0,0])
cylinder(r=screw_clearance_radius(S2), h=T+0.1, center=true);
}
not_on_bom()
no_explode()
color(screw_colour)
sbr_screw_locations(type, l)
translate([0,h-T,0])
rotate([270,0,0])
screw(S3, S3L);
}
module sbr_screw_locations(type, l) { //! Linear locations of screws
P = type[6];
count = floor(l / P);
first = (l - count * P)/2;
N = first == 0 ? P/2 : first; // we don't want screws right on the edge
for (x = [N:P:l])
translate([0,0,l/2 - x])
children();
}
module sbr_screw_positions(type, l) { //! Screw positions
h = type[2];
T = type[4];
C = type[8];
S2 = sbr_rail_screw(type);
for (x = [-C/2, C/2])
translate([x,h-T, 0])
sbr_screw_locations(type, l)
children();
}

31
vitamins/sbr_rails.scad Normal file
View File

@@ -0,0 +1,31 @@
//
// NopSCADlib Copyright Chris Palmer 2023
// nop.head@gmail.com
// hydraraptor.blogspot.com
//
// This file is part of NopSCADlib.
//
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
// GNU General Public License as published by the Free Software Foundation, either version 3 of
// the License, or (at your option) any later version.
//
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with NopSCADlib.
// If not, see <https://www.gnu.org/licenses/>.
//
include <../core.scad>
include <../vitamins/bearing_blocks.scad>
//
// SBR Rails
//
// d h B T carriage P S2 C S3 S3L
SBR16S = ["SBR16S", 16, 25, 40, 5, SBR16UU, 150, M5_cap_screw, 30, M5_cap_screw, 18 ];
sbr_rails = [SBR16S];
use <sbr_rail.scad>

View File

@@ -41,7 +41,7 @@ function screw_washer(type) = type[9]; //! Default washer
function screw_nut(type) = type[10]; //! Default nut
function screw_pilot_hole(type) = type[11]; //! Pilot hole radius for wood screws, tap radius for machine screws
function screw_clearance_radius(type) = type[12]; //! Clearance hole radius
function screw_thread_diameter(type) = type[13]; //! Thread diameter, if different from nominal diamter
function screw_thread_diameter(type) = type[13]; //! Thread diameter, if different from nominal diameter
function screw_nut_radius(type) = screw_nut(type) ? nut_radius(screw_nut(type)) : 0; //! Radius of matching nut
function screw_boss_diameter(type) = max(washer_diameter(screw_washer(type)) + 1, 2 * (screw_nut_radius(type) + 3 * extrusion_width)); //! Boss big enough for nut trap and washer
function screw_head_depth(type, d = 0) = //! How far a counter sink head will go into a straight hole diameter d