From 3716a751bb76da12e735776ddc240b2de94f111b Mon Sep 17 00:00:00 2001 From: Pierre Lecomte Date: Wed, 24 May 2023 16:39:48 +0200 Subject: [PATCH] add ready_to_print module + doc updates --- cad/sma_open.scad | 50 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 14 deletions(-) diff --git a/cad/sma_open.scad b/cad/sma_open.scad index 7fa7b48..080a0c5 100644 --- a/cad/sma_open.scad +++ b/cad/sma_open.scad @@ -1,17 +1,23 @@ /* * Open SMA design for cylindrical microphone capsules * Copyright 2023 Pierre Lecomte - sekisushai@gmail.com + * + * The open SMA configuration is realized by means of microphone holding parts (in yellow) connected to each other with thin metal rods (in blue). + * The SMA is fixed to a mic stand by the mean of a threaded part, attached to neighbouring microphones (in red) + * */ - -include ; -//$fn=128; - + +// To visualize the whole SMA open_sma(); +// To render only one attach or the support, ready to print +//ready_to_print(5); + // EDIT BELOW +//$fn=128; //for final render /*[ Array parameters ]*/ -// Last parameter is for support attach. +// Last parameters [r, theta, phi] are for the threaded mic stand support. // sphere radius (mm): r = [100, 100, 100, 100, 34, 150]; @@ -22,7 +28,7 @@ theta = [0, 109.471, 109.471, 109.471, 70.5284, 180]; // microphone azimuth coordinates (°): phi = [0, 240, 120, 0, 180, 0]; -// connection matrix +// connection matrix : For the i-th microphone, the neighbouring microphones number are listed in the i-th row (i starts at 0). neighbors = [ [1, 2, 3, 4], //0 @@ -34,6 +40,7 @@ neighbors = ]; // DO NOT EDIT BELOW HERE +include ; module attach(id_mic, rmic=3.82, rstud=1.75, color="yellow"){ rtp = [r[id_mic], theta[id_mic], phi[id_mic]]; @@ -76,8 +83,6 @@ module attach(id_mic, rmic=3.82, rstud=1.75, color="yellow"){ } } -support(); - // treaded attach module support(stud=1.75){ id_mic = len(r)-1; @@ -105,6 +110,7 @@ module support(stud=1.75){ rotate([0, rtp[1], rtp[2]]) translate([0, 0, -10]) cylinder(r=6,h=20, center=false); + } for(i=[0:len(neighbors[id_mic])-1]){ neighbor = @@ -122,11 +128,14 @@ module support(stud=1.75){ cylinder(r=stud,h=25); }; }; - translate(center) - rotate([0, rtp[1], rtp[2]]) - translate([0,0,-30]) - render() - english_thread(3/8,16,2,internal=true); +translate(center) +rotate([0, rtp[1], rtp[2]]) +translate([0,0,-30]) +render() + /* + Change here the type of threaded hole for mounting on a mic stand. See threads.scad file for help + */ +english_thread(3/8,16,2,internal=true); } } @@ -150,9 +159,22 @@ function cart2sph(vec) function sph2cart(vec) = [vec[0]*sin(vec[1])*cos(vec[2]), vec[0]*sin(vec[1])*sin(vec[2]), vec[0]*cos(vec[1])]; +// draw the whole array with attach and studs and support module open_sma(){ for (i = [0:len(theta)-2]){ attach(i); studs(i); }; -}; \ No newline at end of file +support(); +}; + +module ready_to_print(i){ + mirror([0, 0, -1]) + translate([0, 0, -r[i]]) + rotate([0, -theta[i], 0]) + rotate([0, 0, -phi[i]]) + if (i != len(r)-1) + attach(i); + else + support(); +} \ No newline at end of file