Path reorg
This commit is contained in:
5
v1/scad/lib/util/hexagon.scad
Normal file
5
v1/scad/lib/util/hexagon.scad
Normal file
@@ -0,0 +1,5 @@
|
||||
module hexagon(inradius) {
|
||||
circle(r=2 * inradius / sqrt(3), $fn=6);
|
||||
}
|
||||
|
||||
hexagon(inradius=2.8);
|
||||
30
v1/scad/lib/util/screw_hole_m3.scad
Normal file
30
v1/scad/lib/util/screw_hole_m3.scad
Normal file
@@ -0,0 +1,30 @@
|
||||
use <hexagon.scad>
|
||||
|
||||
module screw_hole_m3(h) {
|
||||
// Through screw hole
|
||||
translate([0, 0, -0.01])
|
||||
cylinder(h=h, d=3.2, $fn=50);
|
||||
|
||||
// Hex nut cutout
|
||||
translate([0, 0, h - 3])
|
||||
hull() {
|
||||
// Large hex nut
|
||||
translate([0, 0, 3])
|
||||
linear_extrude(0.01)
|
||||
hexagon(inradius=2.85);
|
||||
|
||||
// Small hex nut
|
||||
linear_extrude(0.01)
|
||||
hexagon(inradius=2.65);
|
||||
}
|
||||
|
||||
// Screw head cutout
|
||||
translate([0, 0, h - 3])
|
||||
cylinder(h=2.61, d=5.5, $fn=50);
|
||||
|
||||
// Bottom screw thread protrusion cutout
|
||||
translate([0, 0, -0.01])
|
||||
cylinder(h=1.01, d=4.4, $fn=100);
|
||||
}
|
||||
|
||||
screw_hole_m3(h=10);
|
||||
8
v1/scad/lib/util/torus.scad
Normal file
8
v1/scad/lib/util/torus.scad
Normal file
@@ -0,0 +1,8 @@
|
||||
module torus(r_major, r_minor, xs=1.0, ys=1.0) {
|
||||
rotate_extrude()
|
||||
translate([r_major, 0, 0])
|
||||
scale([xs, ys, 1.0])
|
||||
circle(r=r_minor);
|
||||
}
|
||||
|
||||
torus(r_major=10, r_minor=2, xs=0.5, $fn=200);
|
||||
Reference in New Issue
Block a user