make the teardrop fn customizable

This commit is contained in:
Kaan Barmore-Genç 2023-12-30 10:57:38 -06:00
parent bd0a7ba3f0
commit 265ce0600c
Signed by: kaan
GPG key ID: B2E280771CD62FCF

View file

@ -23,9 +23,9 @@ This script generates a teardrop shape at the appropriate angle to prevent overh
module teardrop(radius, length, angle) {
rotate([0, angle, 0]) union() {
linear_extrude(height = length, center = true, convexity = radius, twist = 0)
circle(r = radius, $fn = 30);
circle(r = radius);
linear_extrude(height = length, center = true, convexity = radius, twist = 0)
projection(cut = false) rotate([0, -angle, 0]) translate([0, 0, radius * sin(45) * 1.5]) cylinder(h = radius * sin(45), r1 = radius * sin(45), r2 = 0, center = true, $fn = 30);
projection(cut = false) rotate([0, -angle, 0]) translate([0, 0, radius * sin(45) * 1.5]) cylinder(h = radius * sin(45), r1 = radius * sin(45), r2 = 0, center = true);
}
//I worked this portion out when a bug was causing the projection above to take FOREVER to calculate. It works as a replacement, and I figured I'd leave it here just in case.