Added insert_nose_length()

This commit is contained in:
Chris Palmer 2020-08-22 14:31:06 +01:00
parent 699385342f
commit 57d223d84b
2 changed files with 11 additions and 1 deletions

View File

@ -1252,6 +1252,7 @@ Heatfit threaded inserts. Can be pushed into thermoplastics using a soldering ir
| Function | Description |
|:--- |:--- |
| ```insert_boss_radius(type, wall)``` | Compute the outer radius of an insert boss |
| ```insert_nose_length(type, d)``` | The length before the second ring. |
### Modules
| Module | Description |

View File

@ -35,6 +35,15 @@ function insert_ring3_d(type) = type[8]; //! Diameter of the bottom r
function insert_hole_length(type) = round_to_layer(insert_length(type));
function insert_nose_length(type, d) = let( //! The length before the second ring.
length = insert_length(type),
ring1_h = insert_ring1_h(type),
chamfer1 = (insert_ring2_d(type) - insert_barrel_d(type)) / 2,
chamfer2 = (insert_ring3_d(type) - insert_barrel_d(type)) / 2,
ring2_h = ring1_h + chamfer1,
gap = (length - ring1_h - ring2_h - chamfer2) / 3
) ring1_h + gap + ring2_h - d + insert_barrel_d(type);
module insert(type) { //! Draw specified insert
length = insert_length(type);
ring1_h = insert_ring1_h(type);
@ -58,7 +67,7 @@ module insert(type) { //! Draw specified insert
h3 = ring1_h + gap + ring2_h;
h4 = ring1_h + gap + ring2_h + gap;
color(brass)
rotate_extrude()
rotate_extrude(convexity = 3)
polygon([
[r1, 0],
[r1, length],