More OCTN work, last before total refactor
This commit is contained in:
+10
-11
@@ -46,7 +46,7 @@ module juqs(model, ver) {
|
|||||||
if(model == OCTR)
|
if(model == OCTR)
|
||||||
octr_hollow(cardinal_throw, shaft_r, pivot_depth);
|
octr_hollow(cardinal_throw, shaft_r, pivot_depth);
|
||||||
if(model == OCTN)
|
if(model == OCTN)
|
||||||
octn_hollow(cardinal_throw, shaft_r, pivot_depth);
|
octn_hollow(cardinal_throw, shaft_r, pivot_depth, 10);
|
||||||
if(model == OCTNR)
|
if(model == OCTNR)
|
||||||
octnr_hollow(cardinal_throw, shaft_r, pivot_depth);
|
octnr_hollow(cardinal_throw, shaft_r, pivot_depth);
|
||||||
};
|
};
|
||||||
@@ -175,20 +175,19 @@ module oct_hollow (slope, shaft_r, depth) {
|
|||||||
sq_pivot(slope, shaft_r, depth);
|
sq_pivot(slope, shaft_r, depth);
|
||||||
sq_pivot(slope, shaft_r, depth);
|
sq_pivot(slope, shaft_r, depth);
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
hull() {
|
hull() {
|
||||||
rotate([0,0,45])
|
rotate([0,0,45])
|
||||||
sq_bevel(slope, shaft_r, depth);
|
sq_bevel(slope, shaft_r, depth);
|
||||||
sq_bevel(slope, shaft_r, depth);
|
sq_bevel(slope, shaft_r, depth);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//work in progress
|
//work in progress
|
||||||
module octn_hollow (slope, shaft_r, depth) {
|
module octn_hollow (slope, shaft_r, depth, sharpness = 1) {
|
||||||
module octagon(slope, height) {
|
module octagon(slope, shaft_r, height, sharpness) {
|
||||||
cardinal = height * tan(slope);
|
shaft_r = shaft_r / sharpness;
|
||||||
corner = height * tan(slope / 1.2);
|
cardinal = shaft_r * (sharpness - 1) + (height * tan(slope));
|
||||||
|
corner = (shaft_r * (sharpness - 1) + (height * tan(slope * 1.3))) / sqrt(2);
|
||||||
octagon = [
|
octagon = [
|
||||||
[cardinal,0],
|
[cardinal,0],
|
||||||
[corner,corner],
|
[corner,corner],
|
||||||
@@ -207,14 +206,14 @@ module octn_hollow (slope, shaft_r, depth) {
|
|||||||
translate([0,0,-0.1])
|
translate([0,0,-0.1])
|
||||||
linear_extrude(0.01)
|
linear_extrude(0.01)
|
||||||
minkowski(){
|
minkowski(){
|
||||||
octagon(slope, depth);
|
octagon(slope, shaft_r, depth, sharpness);
|
||||||
circle(shaft_r);
|
circle(shaft_r / sharpness);
|
||||||
}
|
}
|
||||||
translate([0,0,collar_h])
|
translate([0,0,collar_h])
|
||||||
linear_extrude(0.01)
|
linear_extrude(0.01)
|
||||||
minkowski(){
|
minkowski(){
|
||||||
octagon(slope, depth + collar_h);
|
octagon(slope, shaft_r, depth + collar_h, sharpness);
|
||||||
circle(shaft_r);
|
circle(shaft_r / sharpness);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user