Make use of round gates

This commit is contained in:
Quinn
2022-01-07 16:59:31 -08:00
parent 7129f0c875
commit 48a024a6b2
2 changed files with 17 additions and 10 deletions
+13 -6
View File
@@ -1,3 +1,5 @@
include<round_gates.scad>
$fn = 32; $fn = 32;
collar_r = 34.7/2; collar_r = 34.7/2;
@@ -12,7 +14,7 @@ grommet_dist = 6.8; //distance the grommet sits below this component
grommet_depth = 6.4; //thickness of grommet (when compressed) grommet_depth = 6.4; //thickness of grommet (when compressed)
pivot_depth = grommet_dist + grommet_depth / 2; pivot_depth = grommet_dist + grommet_depth / 2;
VERSION = "V1A"; VERSION = "V1B";
CIR = "CIR"; CIR = "CIR";
SQR = "SQR"; SQR = "SQR";
@@ -26,7 +28,7 @@ rotate([0,0,0]){
* OCTNR corner test (seems to also match OCTN, nice!) * OCTNR corner test (seems to also match OCTN, nice!)
* shaft(shaft_r, pivot_depth, [cardinal_throw+1.95,0,45]); * shaft(shaft_r, pivot_depth, [cardinal_throw+1.95,0,45]);
*/ */
juqs(model = OCTN, ver = VERSION); juqs(model = OCTNR, ver = VERSION);
} }
module juqs(model, ver) { module juqs(model, ver) {
@@ -38,17 +40,20 @@ module juqs(model, ver) {
collar(collar_h); collar(collar_h);
}; };
if(model == CIR) if(model == CIR)
cir_hollow(cardinal_throw, shaft_r, pivot_depth); translate([0,0,-pivot_depth])
cir_gate(cardinal_throw, shaft_r);
if(model == SQR) if(model == SQR)
sqr_hollow(max_throw_square, shaft_r, pivot_depth); sqr_hollow(max_throw_square, shaft_r, pivot_depth);
if(model == OCT) if(model == OCT)
oct_hollow(cardinal_throw, shaft_r, pivot_depth); oct_hollow(cardinal_throw, shaft_r, pivot_depth);
if(model == OCTR) if(model == OCTR)
octr_hollow(cardinal_throw, shaft_r, pivot_depth); translate([0,0,-pivot_depth])
octr_gate(cardinal_throw, shaft_r);
if(model == OCTN) if(model == OCTN)
octn_hollow(cardinal_throw, shaft_r, pivot_depth, 10); octn_hollow(cardinal_throw, shaft_r, pivot_depth, 10);
if(model == OCTNR) if(model == OCTNR)
octnr_hollow(cardinal_throw, shaft_r, pivot_depth); translate([0,0,-pivot_depth])
octnr_gate(cardinal_throw, shaft_r);
}; };
translate([0, -11, -0.1]) { translate([0, -11, -0.1]) {
modtext = str("JUQS-",model); modtext = str("JUQS-",model);
@@ -175,11 +180,13 @@ 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
@@ -187,7 +194,7 @@ module octn_hollow (slope, shaft_r, depth, sharpness = 1) {
module octagon(slope, shaft_r, height, sharpness) { module octagon(slope, shaft_r, height, sharpness) {
shaft_r = shaft_r / sharpness; shaft_r = shaft_r / sharpness;
cardinal = shaft_r * (sharpness - 1) + (height * tan(slope)); cardinal = shaft_r * (sharpness - 1) + (height * tan(slope));
corner = (shaft_r * (sharpness - 1) + (height * tan(slope * 1.3))) / sqrt(2); corner = shaft_r * (sharpness - 1) + (height * tan(slope / 1.2));
octagon = [ octagon = [
[cardinal,0], [cardinal,0],
[corner,corner], [corner,corner],
+4 -4
View File
@@ -9,14 +9,14 @@ module pivot (throw, shaft_r) {
module pivot_square (throw, shaft_r, throw_extend = 0) { module pivot_square (throw, shaft_r, throw_extend = 0) {
hull() { hull() {
rotate([0,throw,0]) rotate([0,throw,0])
pivot(gate_height, throw_extend, shaft_r); pivot(throw_extend, shaft_r);
rotate([0,-throw,0]) rotate([0,-throw,0])
pivot(gate_height, throw_extend, shaft_r); pivot(throw_extend, shaft_r);
rotate([0,0,90]) { rotate([0,0,90]) {
rotate([0,throw,0]) rotate([0,throw,0])
pivot(gate_height, throw_extend, shaft_r); pivot(throw_extend, shaft_r);
rotate([0,-throw,0]) rotate([0,-throw,0])
pivot(gate_height, throw_extend, shaft_r); pivot(throw_extend, shaft_r);
} }
}; };
} }