Added studding.

This commit is contained in:
Chris Palmer 2019-08-18 12:18:12 +01:00
parent 78ce316b86
commit 4ac48c9603
5 changed files with 35 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 707 KiB

After

Width:  |  Height:  |  Size: 708 KiB

View File

@ -2155,13 +2155,19 @@ Rocket switch. Also used for neon indicator in the same form factor.
---
<a name="Rod"></a>
## Rod
Steel rods, with optional chamfer.
Steel rods and studding with chamfered ends.
[vitamins/rod.scad](vitamins/rod.scad) Implementation.
[tests/rod.scad](tests/rod.scad) Code for this example.
### Modules
| Module | Description |
|:--- |:--- |
| ```rod(d , l)``` | Draw a smooth rod with specified length and diameter |
| ```studding(d , l)``` | Draw a threaded rod with specified length and diameter |
![rod](tests/png/rod.png)
### Vitamins
@ -2174,6 +2180,13 @@ Steel rods, with optional chamfer.
| 1 | ```rod(5, 80)``` | Smooth rod 5mm x 80mm |
| 1 | ```rod(6, 80)``` | Smooth rod 6mm x 80mm |
| 1 | ```rod(8, 80)``` | Smooth rod 8mm x 80mm |
| 1 | ```studding(10, 80)``` | Threaded rod M10 x 80mm |
| 1 | ```studding(12, 80)``` | Threaded rod M12 x 80mm |
| 1 | ```studding(3, 80)``` | Threaded rod M3 x 80mm |
| 1 | ```studding(4, 80)``` | Threaded rod M4 x 80mm |
| 1 | ```studding(5, 80)``` | Threaded rod M5 x 80mm |
| 1 | ```studding(6, 80)``` | Threaded rod M6 x 80mm |
| 1 | ```studding(8, 80)``` | Threaded rod M8 x 80mm |
<a href="#top">Top</a>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 49 KiB

View File

@ -24,8 +24,13 @@ include <../vitamins/linear_bearings.scad>
use <../vitamins/rod.scad>
module rods()
layout([for(b = linear_bearings) 2 * bearing_radius(b)])
layout([for(b = linear_bearings) 2 * bearing_radius(b)]) {
rod(bearing_rod_dia(linear_bearings[$i]), 80);
translate([0, 20])
studding(bearing_rod_dia(linear_bearings[$i]), 80);
}
if($preview)
rods();

View File

@ -18,13 +18,14 @@
//
//
//! Steel rods, with optional chamfer.
//! Steel rods and studding with chamfered ends.
//
include <../core.scad>
rod_colour = grey80;
studding_colour = grey70;
module rod(d , l) {
module rod(d , l) { //! Draw a smooth rod with specified length and diameter
vitamin(str("rod(", d, ", ", l, "): Smooth rod ", d, "mm x ", l, "mm"));
chamfer = d / 10;
@ -35,3 +36,15 @@ module rod(d , l) {
cylinder(d = d - 2 * chamfer, h = l, center = true);
}
}
module studding(d , l) { //! Draw a threaded rod with specified length and diameter
vitamin(str("studding(", d, ", ", l,"): Threaded rod M", d, " x ", l, "mm"));
chamfer = d / 20;
color(studding_colour)
hull() {
cylinder(d = d, h = l - 2 * chamfer, center = true);
cylinder(d = d - 2 * chamfer, h = l, center = true);
}
}