Merge branch 'martinbudden-carbon_fiber_tube'
This commit is contained in:
commit
f73a7b46a2
BIN
libtest.png
BIN
libtest.png
Binary file not shown.
Before Width: | Height: | Size: 818 KiB After Width: | Height: | Size: 819 KiB |
|
@ -3652,6 +3652,7 @@ Tubing and sleeving. The internal diameter can be forced to stretch it over some
|
||||||
### Vitamins
|
### Vitamins
|
||||||
| Qty | Module call | BOM entry |
|
| Qty | Module call | BOM entry |
|
||||||
| ---:|:--- |:---|
|
| ---:|:--- |:---|
|
||||||
|
| 1 | ```tubing(CBNFIB10)``` | Carbon fiber OD 10mm ID 8mm x 15mm |
|
||||||
| 1 | ```tubing(HSHRNK16)``` | Heatshrink sleeving ID 1.6mm x 15mm |
|
| 1 | ```tubing(HSHRNK16)``` | Heatshrink sleeving ID 1.6mm x 15mm |
|
||||||
| 1 | ```tubing(HSHRNK100)``` | Heatshrink sleeving ID 10mm x 15mm |
|
| 1 | ```tubing(HSHRNK100)``` | Heatshrink sleeving ID 10mm x 15mm |
|
||||||
| 1 | ```tubing(HSHRNK24)``` | Heatshrink sleeving ID 2.4mm x 15mm |
|
| 1 | ```tubing(HSHRNK24)``` | Heatshrink sleeving ID 2.4mm x 15mm |
|
||||||
|
@ -5740,6 +5741,7 @@ Simple tube or ring
|
||||||
|:--- |:--- |
|
|:--- |:--- |
|
||||||
| ```ring(or, ir)``` | Create a ring with specified external and internal radii |
|
| ```ring(or, ir)``` | Create a ring with specified external and internal radii |
|
||||||
| ```tube(or, ir, h, center = true)``` | Create a tube with specified external and internal radii and height ```h``` |
|
| ```tube(or, ir, h, center = true)``` | Create a tube with specified external and internal radii and height ```h``` |
|
||||||
|
| ```woven_tube(or, ir, h, center= true, colour = grey(30)``` | Create a woven tube with specified external and internal radii, height ```h```, colours, warp and weft |
|
||||||
|
|
||||||
![tube](tests/png/tube.png)
|
![tube](tests/png/tube.png)
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 26 KiB |
|
@ -22,7 +22,7 @@ use <../utils/layout.scad>
|
||||||
include <../vitamins/tubings.scad>
|
include <../vitamins/tubings.scad>
|
||||||
|
|
||||||
module tubings()
|
module tubings()
|
||||||
layout([for(t = tubings) tubing_od(t)], 10)
|
layout([for(t = tubings) tubing_od(t)], 8)
|
||||||
tubing(tubings[$i]);
|
tubing(tubings[$i]);
|
||||||
|
|
||||||
if($preview)
|
if($preview)
|
||||||
|
|
|
@ -31,3 +31,41 @@ module ring(or, ir) //! Create a ring with specified external and internal radii
|
||||||
module tube(or, ir, h, center = true) //! Create a tube with specified external and internal radii and height ```h```
|
module tube(or, ir, h, center = true) //! Create a tube with specified external and internal radii and height ```h```
|
||||||
linear_extrude(h, center = center, convexity = 5)
|
linear_extrude(h, center = center, convexity = 5)
|
||||||
ring(or, ir);
|
ring(or, ir);
|
||||||
|
|
||||||
|
module woven_tube(or, ir, h, center= true, colour = grey(30), colour2, warp = 2, weft) {//! Create a woven tube with specified external and internal radii, height ```h```, colours, warp and weft
|
||||||
|
colour2 = colour2 ? colour2 : colour * 0.8;
|
||||||
|
weft = weft ? weft : warp;
|
||||||
|
warp_count = max(floor(PI * or / warp), 0.5);
|
||||||
|
angle = 360 / (2 * warp_count);
|
||||||
|
|
||||||
|
module layer(weft) {
|
||||||
|
points = [[ir, weft / 2], [or, weft / 2], [or, -weft / 2], [ir, -weft / 2]];
|
||||||
|
color(colour)
|
||||||
|
for (i = [0 : warp_count])
|
||||||
|
rotate(2 * i * angle)
|
||||||
|
rotate_extrude(angle = angle)
|
||||||
|
polygon(points);
|
||||||
|
color(colour2)
|
||||||
|
for (i = [0 : warp_count])
|
||||||
|
rotate((2 * i + 1) * angle)
|
||||||
|
rotate_extrude(angle = angle)
|
||||||
|
polygon(points);
|
||||||
|
}
|
||||||
|
|
||||||
|
translate_z(center ? -h / 2 : 0) {
|
||||||
|
weft_count = floor(h / weft);
|
||||||
|
if (weft_count > 0)
|
||||||
|
for (i = [0 : weft_count - 1]) {
|
||||||
|
translate_z(i * weft + weft / 2)
|
||||||
|
rotate(i * angle)
|
||||||
|
layer(weft);
|
||||||
|
}
|
||||||
|
remainder = h - weft * weft_count;
|
||||||
|
if (remainder) {
|
||||||
|
translate_z(weft_count * weft + remainder / 2)
|
||||||
|
rotate(weft_count * angle)
|
||||||
|
layer(remainder);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
//! Tubing and sleeving. The internal diameter can be forced to stretch it over something.
|
//! Tubing and sleeving. The internal diameter can be forced to stretch it over something.
|
||||||
//
|
//
|
||||||
include <../utils/core/core.scad>
|
include <../utils/core/core.scad>
|
||||||
|
include <../utils/tube.scad>
|
||||||
|
|
||||||
function tubing_material(type) = type[1]; //! Material description
|
function tubing_material(type) = type[1]; //! Material description
|
||||||
function tubing_od(type) = type[2]; //! Outside diameter
|
function tubing_od(type) = type[2]; //! Outside diameter
|
||||||
|
@ -38,10 +39,15 @@ module tubing(type, length = 15, forced_id = 0, center = true) { //! Draw specif
|
||||||
vitamin(str("tubing(", type[0], arg(length, 15), "): ", tubing_material(type), " ID ", original_id, "mm x ",length, "mm"));
|
vitamin(str("tubing(", type[0], arg(length, 15), "): ", tubing_material(type), " ID ", original_id, "mm x ",length, "mm"));
|
||||||
else
|
else
|
||||||
vitamin(str("tubing(", type[0], arg(length, 15), "): ", tubing_material(type), " OD ", original_od, "mm ID ", original_id,"mm x ",length, "mm"));
|
vitamin(str("tubing(", type[0], arg(length, 15), "): ", tubing_material(type), " OD ", original_od, "mm ID ", original_id,"mm x ",length, "mm"));
|
||||||
color(tubing_colour(type))
|
|
||||||
linear_extrude(length, center = center, convexity = 4)
|
if(tubing_material(type) == "Carbon fiber")
|
||||||
difference() {
|
woven_tube(od / 2, id /2, length, colour = tubing_colour(type));
|
||||||
circle(d = od);
|
else
|
||||||
circle(d = id);
|
color(tubing_colour(type))
|
||||||
}
|
linear_extrude(length, center = center, convexity = 4)
|
||||||
|
difference() {
|
||||||
|
circle(d = od);
|
||||||
|
circle(d = id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,22 +19,23 @@
|
||||||
|
|
||||||
//
|
//
|
||||||
// Tubing and sleeving
|
// Tubing and sleeving
|
||||||
//
|
// Description OD ID Colour
|
||||||
PVC64 = ["PVC64", "PVC aquarium tubing", 6, 4, [0.8, 0.8, 0.8, 0.75 ]];
|
PVC64 = ["PVC64", "PVC aquarium tubing", 6, 4, [0.8, 0.8, 0.8, 0.75 ]];
|
||||||
PVC85 = ["PVC85", "PVC aquarium tubing", 8, 5, [0.8, 0.8, 0.8, 0.75 ]];
|
PVC85 = ["PVC85", "PVC aquarium tubing", 8, 5, [0.8, 0.8, 0.8, 0.75 ]];
|
||||||
NEOP85 = ["NEOP85", "Neoprene tubing", 8, 5, [0.2,0.2,0.2]];
|
NEOP85 = ["NEOP85", "Neoprene tubing", 8, 5, [0.2,0.2,0.2]];
|
||||||
PTFE07 = ["PTFE07", "PTFE sleeving", 1.2, 0.71, [0.95, 0.95, 0.95, 0.9]];
|
PTFE07 = ["PTFE07", "PTFE sleeving", 1.2, 0.71, [0.95, 0.95, 0.95, 0.9]];
|
||||||
PTFE20 = ["PTFE20", "PTFE sleeving", 2.6, 2, [0.95, 0.95, 0.95, 0.9]];
|
PTFE20 = ["PTFE20", "PTFE sleeving", 2.6, 2, [0.95, 0.95, 0.95, 0.9]];
|
||||||
PTFE2_4 = ["PTFE2_4", "PTFE tubing", 4, 2, [0.95, 0.95, 0.95, 0.9]];
|
PTFE2_4 = ["PTFE2_4", "PTFE tubing", 4, 2, [0.95, 0.95, 0.95, 0.9]];
|
||||||
PTFE2_3 = ["PTFE2_3", "PTFE tubing", 3, 2, [0.95, 0.95, 0.95, 0.9]];
|
PTFE2_3 = ["PTFE2_3", "PTFE tubing", 3, 2, [0.95, 0.95, 0.95, 0.9]];
|
||||||
PTFE4_6 = ["PTFE4_6", "PTFE tubing", 6, 4, [0.95, 0.95, 0.95, 0.9]];
|
PTFE4_6 = ["PTFE4_6", "PTFE tubing", 6, 4, [0.95, 0.95, 0.95, 0.9]];
|
||||||
PF7 = ["PF7", "PTFE tubing", 46/10, 3.84, [0.95, 0.95, 0.95, 0.9]];
|
PF7 = ["PF7", "PTFE tubing", 46/10, 3.84, [0.95, 0.95, 0.95, 0.9]];
|
||||||
HSHRNK16 = ["HSHRNK16", "Heatshrink sleeving", 2.0, 1.6, "grey"];
|
HSHRNK16 = ["HSHRNK16", "Heatshrink sleeving", 2.0, 1.6, "grey"];
|
||||||
HSHRNK24 = ["HSHRNK24", "Heatshrink sleeving", 2.8, 2.4, "grey"];
|
HSHRNK24 = ["HSHRNK24", "Heatshrink sleeving", 2.8, 2.4, "grey"];
|
||||||
HSHRNK32 = ["HSHRNK32", "Heatshrink sleeving", 3.6, 3.2, "grey"];
|
HSHRNK32 = ["HSHRNK32", "Heatshrink sleeving", 3.6, 3.2, "grey"];
|
||||||
HSHRNK64 = ["HSHRNK64", "Heatshrink sleeving", 6.8, 6.4, "grey"];
|
HSHRNK64 = ["HSHRNK64", "Heatshrink sleeving", 6.8, 6.4, "grey"];
|
||||||
HSHRNK100 = ["HSHRNK100", "Heatshrink sleeving",10.4, 10.0, [0.2,0.2,0.2]];
|
HSHRNK100 = ["HSHRNK100", "Heatshrink sleeving",10.4, 10.0, [0.2,0.2,0.2]];
|
||||||
|
CARBONFIBER10 = ["CBNFIB10", "Carbon fiber", 10.0, 8.0, [0.3,0.3,0.3]];
|
||||||
|
|
||||||
tubings = [PVC64, PVC85, NEOP85, PTFE07, PTFE20, PF7, PTFE2_3, PTFE2_4, PTFE4_6, HSHRNK16, HSHRNK24, HSHRNK64, HSHRNK100];
|
tubings = [PVC64, PVC85, NEOP85, PTFE07, PTFE20, PF7, PTFE2_3, PTFE2_4, PTFE4_6, HSHRNK16, HSHRNK24, HSHRNK64, HSHRNK100, CARBONFIBER10];
|
||||||
|
|
||||||
use <tubing.scad>
|
use <tubing.scad>
|
||||||
|
|
Loading…
Reference in New Issue