diff --git a/libtest.png b/libtest.png
index 61235a3..736f25c 100644
Binary files a/libtest.png and b/libtest.png differ
diff --git a/libtest.scad b/libtest.scad
index 6a5169d..05f19a3 100644
--- a/libtest.scad
+++ b/libtest.scad
@@ -228,7 +228,8 @@ inserts_y = 0;
nuts_y = inserts_y + 20;
washers_y = nuts_y + 140;
screws_y = washers_y + 120;
-circlips_y = screws_y + 180;
+threaded_inserts_y = screws_y + 180;
+circlips_y = threaded_inserts_y + 30;
springs_y = circlips_y + 20;
o_rings_y = springs_y;
sealing_strip_y = springs_y + 20;
@@ -258,6 +259,9 @@ translate([x0, nuts_y])
translate([x0, washers_y])
washers();
+translate([x0, threaded_inserts_y])
+ threaded_inserts();
+
translate([x0, screws_y])
screws();
diff --git a/readme.md b/readme.md
index 4a454b2..17251b4 100644
--- a/readme.md
+++ b/readme.md
@@ -1703,6 +1703,8 @@ Heatfit threaded inserts. Can be pushed into thermoplastics using a soldering ir
| `insert_ring2_d(type)` | Diameter of the middle ring |
| `insert_ring3_d(type)` | Diameter of the bottom ring |
| `insert_screw_diameter(type)` | Screw size |
+| `threaded_insert_chamfer(type)` | Size of the chamfer for threaded inserts |
+| `threaded_insert_pitch(type)` | Pitch of the outer thread for threaded inserts |
### Functions
| Function | Description |
@@ -1718,6 +1720,7 @@ Heatfit threaded inserts. Can be pushed into thermoplastics using a soldering ir
| `insert_boss(type, z, wall = 2 * extrusion_width)` | Make a boss to take an insert |
| `insert_hole(type, counterbore = 0, horizontal = false)` | Make a hole to take an insert, `counterbore` is the extra length for the screw |
| `insert_lug(insert, wall, counter_bore = 0, extension = 0, corner_r = 0, flying = true)` | Make a flying insert lug, see [ssr_shroud](#Ssr_shroud) |
+| `threaded_insert(type)` | Draw specified threaded insert, for use in wood |
![inserts](tests/png/inserts.png)
@@ -1732,6 +1735,14 @@ Heatfit threaded inserts. Can be pushed into thermoplastics using a soldering ir
| 1 | `insert(CNCKM4)` | Heatfit insert M4 x 4mm |
| 1 | `insert(F1BM4)` | Heatfit insert M4 x 8.2mm |
| 2 | `insert(CNCKM5)` | Heatfit insert M5 x 5.8mm |
+| 1 | `threaded_insert(M10x25)` | Threaded insert M10 x 25mm |
+| 1 | `threaded_insert(M12x30)` | Threaded insert M12 x 30mm |
+| 1 | `threaded_insert(M16x30)` | Threaded insert M16 x 30mm |
+| 1 | `threaded_insert(M3x8)` | Threaded insert M3 x 8mm |
+| 1 | `threaded_insert(M4x10)` | Threaded insert M4 x 10mm |
+| 1 | `threaded_insert(M5x12)` | Threaded insert M5 x 12mm |
+| 1 | `threaded_insert(M6x15)` | Threaded insert M6 x 15mm |
+| 1 | `threaded_insert(M8x18)` | Threaded insert M8 x 18mm |
Top
diff --git a/tests/inserts.scad b/tests/inserts.scad
index a482be9..1afc58a 100644
--- a/tests/inserts.scad
+++ b/tests/inserts.scad
@@ -22,7 +22,6 @@ use <../utils/layout.scad>
include <../vitamins/inserts.scad>
module inserts() {
-
for(i = [0: len(inserts) -1])
translate([10 * i, 5])
insert(inserts[i]);
@@ -32,7 +31,6 @@ module inserts() {
insert(short_inserts[i]);
-
stl_colour(pp1_colour)
translate([len(inserts) * 10, 0]) {
insert_lug(inserts[0], 2, 1);
@@ -42,6 +40,17 @@ module inserts() {
}
}
+module threaded_inserts()
+ for(i = [0: len(threaded_inserts) -1]) {
+ d = insert_hole_radius(threaded_inserts[i]);
+ translate([(10 + d) * i, 0])
+ threaded_insert(threaded_inserts[i]);
+ }
+
if($preview)
- let($show_threads = true)
+ let($show_threads = true) {
inserts();
+
+ translate([0, 20])
+ threaded_inserts();
+ }
diff --git a/tests/png/corner_block.png b/tests/png/corner_block.png
index 79392c8..eca62dd 100644
Binary files a/tests/png/corner_block.png and b/tests/png/corner_block.png differ
diff --git a/tests/png/inserts.png b/tests/png/inserts.png
index 5c75bed..9d2a0c3 100644
Binary files a/tests/png/inserts.png and b/tests/png/inserts.png differ
diff --git a/vitamins/insert.scad b/vitamins/insert.scad
index 25ba2c5..b1a784a 100644
--- a/vitamins/insert.scad
+++ b/vitamins/insert.scad
@@ -32,6 +32,9 @@ function insert_barrel_d(type) = type[5]; //! Diameter of the main bar
function insert_ring1_h(type) = type[6]; //! Height of the top and middle rings
function insert_ring2_d(type) = type[7]; //! Diameter of the middle ring
function insert_ring3_d(type) = type[8]; //! Diameter of the bottom ring
+function threaded_insert_pitch(type) = type[9]; //! Pitch of the outer thread for threaded inserts
+function threaded_insert_chamfer(type) = type[10]; //! Size of the chamfer for threaded inserts
+
function insert_hole_length(type) = round_to_layer(insert_length(type)); //! Length of the insert rounded to layer height
@@ -46,6 +49,14 @@ function insert_nose_length(type, d) = let( //! The length before the second rin
module insert(type) { //! Draw specified insert
length = insert_length(type);
+
+ vitamin(str("insert(", type[0], "): Heatfit insert M", insert_screw_diameter(type), " x ", length, "mm"));
+
+ base_insert(type);
+}
+
+module base_insert(type) {
+ length = insert_length(type);
ring1_h = insert_ring1_h(type);
chamfer1 = (insert_ring2_d(type) - insert_barrel_d(type)) / 2;
@@ -53,7 +64,6 @@ module insert(type) { //! Draw specified insert
ring2_h = ring1_h + chamfer1;
gap = (length - ring1_h - ring2_h - chamfer2) / 3;
- vitamin(str("insert(", type[0], "): Heatfit insert M", insert_screw_diameter(type), " x ", length, "mm"));
$fn = 64;
thread_d = insert_screw_diameter(type);
explode(20, offset = [0, 0, -length]) translate_z(eps) vflip() {
@@ -186,3 +196,54 @@ module insert_lug(insert, wall, counter_bore = 0, extension = 0, corner_r = 0, f
}
}
}
+
+
+module threaded_insert(type) { //! Draw specified threaded insert, for use in wood
+ d2 = insert_outer_d(type);
+ d3 = insert_barrel_d(type);
+ pitch = threaded_insert_pitch(type);
+
+ profile = thread_profile((d2 - d3) /2 , 0, 60);
+ socket = insert_screw_diameter(type) / cos(30) / 2;
+ length = insert_length(type);
+
+ r=insert_barrel_d(type) / 2;
+ z=threaded_insert_chamfer(type);
+
+ thread_l = insert_length(type) - z; // - insert_ring1_h(type);
+
+
+
+
+ vitamin(str("threaded_insert(", type[0], "): Threaded insert M", insert_screw_diameter(type), " x ", length, "mm"));
+ union() {
+ color(silver)
+ difference() {
+ base_insert(type);
+ translate_z(-socket/2 + 0.01)
+ cylinder(r=socket, $fn = 6, h=socket/2);
+
+ // chamfer the end
+ rotate_extrude(convexity = 3)
+ polygon([
+ [r - z, -length],
+ [r + 0.1, - length],
+ [r + 0.1, - length + z + 0.1]
+ ]);
+ }
+
+ translate_z(-thread_l/2)
+ thread(insert_barrel_d(type),
+ pitch,
+ thread_l,
+ profile,
+ center = true,
+ top = 1,
+ bot = -1,
+ starts = 1,
+ solid = false,
+ female = false,
+ colour = silver);
+ }
+
+}
diff --git a/vitamins/inserts.scad b/vitamins/inserts.scad
index 386175c..1df9918 100644
--- a/vitamins/inserts.scad
+++ b/vitamins/inserts.scad
@@ -39,8 +39,23 @@ CNCKM3 = [ "CNCKM3", 3.0, 4.6, 4.0, 3, 3.65, 0.7, 4.4, 3.9 ];
CNCKM4 = [ "CNCKM4", 4.0, 6.3, 5.6, 4, 5.15, 1.0, 6.0, 5.55];
CNCKM5 = [ "CNCKM5", 5.8, 7.1, 6.4, 5, 6.0, 1.6, 6.8, 6.33];
+// Measurements according to DIN 7965
+//
+// If you want to add an additional length, it should be sufficient copy one with the same
+// M size and change the name (2x) and the first number column (l), all others are dependent
+// on the M size.
+// l, d2, d5, d, d3, h, d3, d3, P1 (h), z
+M3x8 = [ "M3x8", 8, 6, 5, 3, 4.5, 0.5, 4.5, 4.5, 2, 0.6];
+M4x10 = [ "M4x10", 10, 8, 6.5, 4, 5.5, 0.5, 5.5, 5.5, 2.5, 0.6];
+M5x12 = [ "M5x12", 12, 10, 8.5, 5, 7.5, 0.5, 7.5, 7.5, 3.5, 0.8];
+M6x15 = [ "M6x15", 15, 12, 10.5, 6, 9.5, 0.5, 9.5, 9.5, 4, 1];
+M8x18 = [ "M8x18", 18, 16, 14.5, 8, 12.5, 0.5, 12.5, 12.5, 5, 1];
+M10x25 = [ "M10x25", 25, 18.5, 17, 10, 15, 0.5, 15, 15, 5, 1.6];
+M12x30 = [ "M12x30", 30, 22, 20, 12, 18, 0.5, 18, 18, 5, 1.6];
+M16x30 = [ "M16x30", 30, 25, 22.5, 16, 20.5, 0.5, 20.5, 20.5, 5, 1.6];
inserts = [ F1BM2, F1BM2p5, F1BM3, F1BM4, CNCKM5 ];
short_inserts = [ F1BM2, CNCKM2p5, CNCKM3, CNCKM4, CNCKM5 ];
+threaded_inserts = [ M3x8, M4x10, M5x12, M6x15, M8x18, M10x25, M12x30, M16x30 ];
use