Better OCTN WIP

This commit is contained in:
Quinn
2022-01-05 22:04:09 -08:00
parent 77a8e0237c
commit 102294fcab
+19 -5
View File
@@ -185,10 +185,10 @@ module oct_hollow (slope, shaft_r, depth) {
};
//work in progress
module octn_hollow (slope, shaft_r, depth, sharpness = 1) {
shaft_r = shaft_r / sharpness;
cardinal = shaft_r * (sharpness - 1) + depth * tan(slope);
corner = shaft_r * (sharpness - 1) + depth * tan(slope / 1.3);
module octn_hollow (slope, shaft_r, depth) {
module octagon(slope, height) {
cardinal = height * tan(slope);
corner = height * tan(slope / 1.2);
octagon = [
[cardinal,0],
[corner,corner],
@@ -199,10 +199,24 @@ module octn_hollow (slope, shaft_r, depth, sharpness = 1) {
[0,-cardinal],
[corner,-corner],
];
minkowski(){
polygon(points=octagon);
};
hull(){
translate([0,0,-0.1])
linear_extrude(0.01)
minkowski(){
octagon(slope, depth);
circle(shaft_r);
}
translate([0,0,collar_h])
linear_extrude(0.01)
minkowski(){
octagon(slope, depth + collar_h);
circle(shaft_r);
}
}
};
module octr_hollow (slope, shaft_r, depth) {