diff --git a/printed/cable_grommets.scad b/printed/cable_grommets.scad index 6176ff4..7c137bd 100644 --- a/printed/cable_grommets.scad +++ b/printed/cable_grommets.scad @@ -149,12 +149,17 @@ module mouse_grommet_hole(r, h = 50, z = undef, expand = wall + clearance) //! M hull(){ R = r + expand; translate([0, z == undef ? R : z]) - semi_circle(R); + if(expand) + semi_circle(R); + else + semi_teardrop(r = R, h = 0); translate([-R, 0]) square([2 * R, eps]); } +function mouse_grommet_offset(r) = r + wall; + module mouse_grommet(r, thickness) { //! Make the STL for a mouse grommet stl(str("mouse_grommet_", r * 10, "_", thickness)); @@ -167,7 +172,7 @@ module mouse_grommet(r, thickness) { //! Make the STL for a mouse grommet translate_z(side * (width - wall) / 2) linear_extrude(height = wall, center = true) difference() { - mouse_grommet_hole(r + wall + overlap, z = r + wall, h = 0, expand = 0); + mouse_grommet_hole(r, z = r + wall, h = 0, expand = wall + overlap); translate([0, wall]) mouse_grommet_hole(r, h = 0, expand = 0); diff --git a/readme.md b/readme.md index 0daef17..c058792 100644 --- a/readme.md +++ b/readme.md @@ -4589,6 +4589,7 @@ Small holes can get away without it, but they print better with truncated teardr ### Modules | Module | Description | |:--- |:--- | +| ```semi_teardrop(h, r, d = undef, center = true)``` | A semi teardrop in the positive Y domain | | ```teardrop(h, r, center = true, truncate = true)``` | For making horizontal holes that don't need support material, set ```truncate = false``` to make traditional RepRap teardrops that don't even need bridging | | ```teardrop_plus(h, r, center = true, truncate = true)``` | Slightly bigger teardrop to allow for the 3D printing staircase effect | | ```tearslot(h, r, w, center = true)``` | A horizontal slot that doesn't need support material | diff --git a/tests/png/cable_grommets.png b/tests/png/cable_grommets.png index a527bc8..89cde9d 100644 Binary files a/tests/png/cable_grommets.png and b/tests/png/cable_grommets.png differ diff --git a/tests/png/teardrops.png b/tests/png/teardrops.png index a94dcab..45d3777 100644 Binary files a/tests/png/teardrops.png and b/tests/png/teardrops.png differ diff --git a/tests/teardrops.scad b/tests/teardrops.scad index 9d62cd6..0d8efca 100644 --- a/tests/teardrops.scad +++ b/tests/teardrops.scad @@ -36,7 +36,10 @@ module teardrops() { tearslot(h = 0, r = 3, w = 10); translate([30, 15]) - vertical_tearslot(h = 0, r =3, l = 10); + vertical_tearslot(h = 0, r =3, l = 10); + + translate([20, 10]) + semi_teardrop(h = 0, r = 3); } } diff --git a/utils/core/teardrops.scad b/utils/core/teardrops.scad index 74821a0..fb9b185 100644 --- a/utils/core/teardrops.scad +++ b/utils/core/teardrops.scad @@ -34,6 +34,18 @@ module teardrop(h, r, center = true, truncate = true) //! For making horizontal polygon([[0, 0], [eps, 0], [0, r * sqrt(2)]]); } +module semi_teardrop(h, r, d = undef, center = true) //! A semi teardrop in the positive Y domain + render(convexity = 5) + extrude_if(h, center) + intersection() { + R = is_undef(d) ? r : d / 2; + teardrop(r = R, h = 0); + + sq = R + 1; + translate([-sq, 0]) + square([2 * sq, sq]); + } + module teardrop_plus(h, r, center = true, truncate = true) //! Slightly bigger teardrop to allow for the 3D printing staircase effect teardrop(h, r + layer_height / 4, center, truncate);