Better OCTN WIP
This commit is contained in:
+19
-5
@@ -185,10 +185,10 @@ module oct_hollow (slope, shaft_r, depth) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//work in progress
|
//work in progress
|
||||||
module octn_hollow (slope, shaft_r, depth, sharpness = 1) {
|
module octn_hollow (slope, shaft_r, depth) {
|
||||||
shaft_r = shaft_r / sharpness;
|
module octagon(slope, height) {
|
||||||
cardinal = shaft_r * (sharpness - 1) + depth * tan(slope);
|
cardinal = height * tan(slope);
|
||||||
corner = shaft_r * (sharpness - 1) + depth * tan(slope / 1.3);
|
corner = height * tan(slope / 1.2);
|
||||||
octagon = [
|
octagon = [
|
||||||
[cardinal,0],
|
[cardinal,0],
|
||||||
[corner,corner],
|
[corner,corner],
|
||||||
@@ -199,10 +199,24 @@ module octn_hollow (slope, shaft_r, depth, sharpness = 1) {
|
|||||||
[0,-cardinal],
|
[0,-cardinal],
|
||||||
[corner,-corner],
|
[corner,-corner],
|
||||||
];
|
];
|
||||||
minkowski(){
|
|
||||||
polygon(points=octagon);
|
polygon(points=octagon);
|
||||||
|
};
|
||||||
|
|
||||||
|
hull(){
|
||||||
|
translate([0,0,-0.1])
|
||||||
|
linear_extrude(0.01)
|
||||||
|
minkowski(){
|
||||||
|
octagon(slope, depth);
|
||||||
circle(shaft_r);
|
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) {
|
module octr_hollow (slope, shaft_r, depth) {
|
||||||
|
|||||||
Reference in New Issue
Block a user