Problem with comparison.
/Modules/Mechanical/WINDGAUGE01A/CAD/SRC/WINDGAUGE01A_D01.scad |
---|
0,0 → 1,89 |
$fn=40; // model faces resolution. |
include <../configuration.scad> |
//Drzak na sloup - cast bez drzaku anemometru |
module WINDGAUGE01A_D01(){ |
difference() |
{ |
union() |
{ |
//základní válec |
cylinder(h=D02_vyska_uchytky,r=(D02_prumer_obruby+2*D02_sila_materialu)/2,center=true); |
//úchytové plošky |
translate([D02_dotahova_vzdalenost+D02_sila_materialu/2,0,0]){cube([D02_sila_materialu,D02_delka_celeho_uchytu,D02_vyska_uchytky],center=true);} |
} |
//válec na odečet |
cylinder(h=D02_vyska_uchytky+0.01,r=D02_prumer_obruby/2,center=true); |
//kvádr na odecet |
translate([D02_dotahova_vzdalenost-(D02_prumer_obruby+2*D02_sila_materialu)/2,0,0]){cube([D02_prumer_obruby+2*D02_sila_materialu,D02_prumer_obruby+2*D02_sila_materialu,D02_vyska_uchytky+0.01],center=true);} |
//otvory na sroub |
translate([D02_dotahova_vzdalenost,(D02_delka_celeho_uchytu/2-D02_prumer_obruby/2-D02_sila_materialu)/2+D02_prumer_obruby/2+D02_sila_materialu,D02_vyska_uchytky/4]){rotate([0,90,0]){cylinder(h=D02_sila_materialu+0.01,r=D02_prumer_uchytneho_sroubu/2);}} |
//drzak matky |
translate([D02_dotahova_vzdalenost+D02_sila_materialu-D02_vyska_matky,(D02_delka_celeho_uchytu/2-D02_prumer_obruby/2-D02_sila_materialu)/2+D02_prumer_obruby/2+D02_sila_materialu,D02_vyska_uchytky/4]){rotate([0,90,0]){ cylinder (h = D02_vyska_matky+0.01, r= (D02_sirka_matky+0.2)/2, $fn=6);}} |
translate([D02_dotahova_vzdalenost,(D02_delka_celeho_uchytu/2-D02_prumer_obruby/2-D02_sila_materialu)/2+D02_prumer_obruby/2+D02_sila_materialu,-D02_vyska_uchytky/4]){rotate([0,90,0]){cylinder(h=D02_sila_materialu+0.01,r=D02_prumer_uchytneho_sroubu/2);}} |
//drzak matky |
translate([D02_dotahova_vzdalenost+D02_sila_materialu-D02_vyska_matky,(D02_delka_celeho_uchytu/2-D02_prumer_obruby/2-D02_sila_materialu)/2+D02_prumer_obruby/2+D02_sila_materialu,-D02_vyska_uchytky/4]){rotate([0,90,0]){ cylinder (h = D02_vyska_matky+0.01, r= (D02_sirka_matky+0.2)/2, $fn=6);}} |
translate([D02_dotahova_vzdalenost,-((D02_delka_celeho_uchytu/2-D02_prumer_obruby/2-D02_sila_materialu)/2+D02_prumer_obruby/2+D02_sila_materialu),-D02_vyska_uchytky/4]){rotate([0,90,0]){cylinder(h=D02_sila_materialu+0.01,r=D02_prumer_uchytneho_sroubu/2);}} |
//drzak matky |
translate([D02_dotahova_vzdalenost+D02_sila_materialu-D02_vyska_matky,-((D02_delka_celeho_uchytu/2-D02_prumer_obruby/2-D02_sila_materialu)/2+D02_prumer_obruby/2+D02_sila_materialu),-D02_vyska_uchytky/4]){rotate([0,90,0]){ cylinder (h = D02_vyska_matky+0.01, r= (D02_sirka_matky+0.2)/2, $fn=6);}} |
translate([D02_dotahova_vzdalenost,-((D02_delka_celeho_uchytu/2-D02_prumer_obruby/2-D02_sila_materialu)/2+D02_prumer_obruby/2+D02_sila_materialu),D02_vyska_uchytky/4]){rotate([0,90,0]){cylinder(h=D02_sila_materialu+0.01,r=D02_prumer_uchytneho_sroubu/2);}} |
//drzak matky |
translate([D02_dotahova_vzdalenost+D02_sila_materialu-D02_vyska_matky,-((D02_delka_celeho_uchytu/2-D02_prumer_obruby/2-D02_sila_materialu)/2+D02_prumer_obruby/2+D02_sila_materialu),D02_vyska_uchytky/4]){rotate([0,90,0]){ cylinder (h = D02_vyska_matky+0.01, r= (D02_sirka_matky+0.2)/2, $fn=6);}} |
} |
} |
module WINDGAUGE01A_D01_2(){ |
difference() |
{ |
union() |
{ |
//základní válec |
cylinder(h=D02_vyska_uchytky,r=(D02_prumer_obruby+2*D02_sila_materialu)/2,center=true); |
//úchytové plošky |
translate([D02_dotahova_vzdalenost+D02_sila_materialu/2,0,0]){cube([D02_sila_materialu,D02_delka_celeho_uchytu,D02_vyska_uchytky],center=true);} |
} |
//válec na odečet |
cylinder(h=D02_vyska_uchytky+0.01,r=D02_prumer_obruby/2,center=true); |
//kvádr na odecet |
translate([D02_dotahova_vzdalenost-(D02_prumer_obruby+2*D02_sila_materialu)/2,0,0]){cube([D02_prumer_obruby+2*D02_sila_materialu,D02_prumer_obruby+2*D02_sila_materialu,D02_vyska_uchytky+0.01],center=true);} |
//otvory na sroub |
translate([D02_dotahova_vzdalenost,(D02_delka_celeho_uchytu/2-D02_prumer_obruby/2-D02_sila_materialu)/2+D02_prumer_obruby/2+D02_sila_materialu,D02_vyska_uchytky/4]){rotate([0,90,0]){cylinder(h=D02_sila_materialu+0.01,r=D02_prumer_uchytneho_sroubu/2);}} |
translate([D02_dotahova_vzdalenost,(D02_delka_celeho_uchytu/2-D02_prumer_obruby/2-D02_sila_materialu)/2+D02_prumer_obruby/2+D02_sila_materialu,-D02_vyska_uchytky/4]){rotate([0,90,0]){cylinder(h=D02_sila_materialu+0.01,r=D02_prumer_uchytneho_sroubu/2);}} |
translate([D02_dotahova_vzdalenost,-((D02_delka_celeho_uchytu/2-D02_prumer_obruby/2-D02_sila_materialu)/2+D02_prumer_obruby/2+D02_sila_materialu),-D02_vyska_uchytky/4]){rotate([0,90,0]){cylinder(h=D02_sila_materialu+0.01,r=D02_prumer_uchytneho_sroubu/2);}} |
translate([D02_dotahova_vzdalenost,-((D02_delka_celeho_uchytu/2-D02_prumer_obruby/2-D02_sila_materialu)/2+D02_prumer_obruby/2+D02_sila_materialu),D02_vyska_uchytky/4]){rotate([0,90,0]){cylinder(h=D02_sila_materialu+0.01,r=D02_prumer_uchytneho_sroubu/2);}} |
} |
} |
/Modules/Mechanical/WINDGAUGE01A/CAD/SRC/WINDGAUGE01A_R02.scad |
---|
0,0 → 1,113 |
$fn=100; // model faces resolution. |
include <../configuration.scad> |
include <polyScrewThread_r1.scad> |
PI=3.141592; |
//Drzak rotoru se závitem |
WINDGAUGE01A_R02(); |
module WINDGAUGE01A_R02() |
{ |
difference() |
{ |
union() |
{ |
//kužel na závit |
cylinder(h=R02_zavit_vyska, r1=S01_prumer_vnitrni/2+5*S01_sila_materialu, r2=R03_prumer_zavitu/2+S01_sila_materialu, center=false,$fn=100); |
//kvádr pod tyčí |
translate([-R02_hrana_drzaku/2,-(R02_delka_vyrovnnavaci_tyce+R03_prumer_zavitu/2+S01_sila_materialu),0]) |
cube([R02_hrana_drzaku,R02_delka_vyrovnnavaci_tyce+R03_prumer_zavitu/2+S01_sila_materialu,R02_sila_materialu_pod_tyci],center=false); |
//prední tyč |
translate([0,0,5]) |
rotate([-90, 0, 180]) |
difference() |
{ |
translate([0,0,0]) |
cylinder (h = R02_delka_vyrovnnavaci_tyce+R03_prumer_zavitu/2+S01_sila_materialu, r=R02_hrana_drzaku/2, $fn=100); |
translate([-R02_hrana_drzaku/2,0,-0.01]) |
cube([R02_hrana_drzaku,R02_hrana_drzaku,R02_delka_vyrovnnavaci_tyce+R03_prumer_zavitu/2+S01_sila_materialu+0.02],center=false); |
} |
//spodní tyč pod křídlem |
translate([-R02_hrana_drzaku/2,0,0]) |
cube([R02_hrana_drzaku,R02_delka_kridla+(S01_prumer_vnitrni/2+5*S01_sila_materialu)-R02_hrana_drzaku/2,S01_sila_materialu],center=false); |
//zakulacení spodní tyče |
translate([0,R02_delka_kridla+(S01_prumer_vnitrni/2+5*S01_sila_materialu)-R02_hrana_drzaku/2,0]) |
cylinder (h = S01_sila_materialu, r=R02_hrana_drzaku/2, $fn=100); |
//ližiny pro křídlo |
translate([-(R02_sila_materialu_kridla+R02_sila_materialu_kridla_tolerance)/2,0,0]) |
rotate ([0,-90,0]) |
linear_extrude (height = S01_sila_materialu, convexity = 10) |
polygon(points=[[0,R03_prumer_zavitu/2],[R02_zavit_vyska, R03_prumer_zavitu/2],[R02_zavit_vyska,R02_delka_kridla+(S01_prumer_vnitrni/2+5*S01_sila_materialu)-R02_hrana_drzaku/2],[0,R02_delka_kridla+(S01_prumer_vnitrni/2+5*S01_sila_materialu)-R02_hrana_drzaku/2]]); |
translate([S01_sila_materialu+(R02_sila_materialu_kridla+R02_sila_materialu_kridla_tolerance)/2,0,0]) |
rotate ([0,-90,0]) |
linear_extrude (height = S01_sila_materialu, convexity = 10) |
polygon(points=[[0,R03_prumer_zavitu/2],[R02_zavit_vyska, R03_prumer_zavitu/2],[R02_zavit_vyska,R02_delka_kridla+(S01_prumer_vnitrni/2+5*S01_sila_materialu)-R02_hrana_drzaku/2],[0,R02_delka_kridla+(S01_prumer_vnitrni/2+5*S01_sila_materialu)-R02_hrana_drzaku/2]]); |
} |
//odečet závitu |
translate([0,0,-10]) |
screw_thread((R03_prumer_zavitu),S01_hloubka_zavitu,55,R04_zavit_vyska+R02_zavit_vyska+R01_zavit_vyska+10,PI/2,2); |
//otvor na hlavu šroubu |
translate([-(prumer_hlavy_sroubu+1)/2,-(R02_delka_vyrovnnavaci_tyce+R03_prumer_zavitu/2)+S01_sila_materialu,-0.01]) |
cube([prumer_hlavy_sroubu+1,vyska_hlavy_sroubu+1,R02_sila_materialu_pod_tyci+prumer_hlavy_sroubu/2+0.5],center=false); |
//otvor na sroub - valec |
translate([0,-(R02_delka_vyrovnnavaci_tyce+R03_prumer_zavitu/2)-(S01_sila_materialu)-0.01,R02_sila_materialu_pod_tyci]) |
rotate([-90, 0, 0]) |
cylinder (h = S01_sila_materialu+0.01, r=prumer_sroubu/2+0.2, $fn=100); |
//otvor na sroub - valec pro zasunutí hlavy šroubu |
translate([0,-(R02_delka_vyrovnnavaci_tyce+R03_prumer_zavitu/2)-0.01,R02_sila_materialu_pod_tyci]) |
rotate([-90, 0, 0]) |
cylinder (h = S01_sila_materialu+0.5, r=prumer_hlavy_sroubu/2+0.3, $fn=100); |
//otvor pro vsunutí sroubu |
translate([-(prumer_sroubu+0.2)/2,-(R02_delka_vyrovnnavaci_tyce+R03_prumer_zavitu/2)-S01_sila_materialu-0.01,-0.01]) |
cube([prumer_sroubu+0.2,2*S01_sila_materialu+0.2,R02_sila_materialu_pod_tyci],center=false); |
//otvor na šroub držící směrovku |
translate([(2*S01_sila_materialu+2*R02_sila_materialu_kridla)/2,S01_prumer_vnitrni/2+5*S01_sila_materialu+10,(R02_zavit_vyska-S01_sila_materialu)/2+S01_sila_materialu]) |
rotate ([0,-90,0]) |
cylinder (h = 2*S01_sila_materialu+2*R02_sila_materialu_kridla+0.01, r=prumer_sroubu/2+0.2, $fn=100); |
translate([(2*S01_sila_materialu+2*R02_sila_materialu_kridla)/2,S01_prumer_vnitrni/2+5*S01_sila_materialu+10+R02_vzdalenost_der,(R02_zavit_vyska-S01_sila_materialu)/2+S01_sila_materialu]) |
rotate ([0,-90,0]) |
cylinder (h = 2*S01_sila_materialu+2*R02_sila_materialu_kridla+0.01, r=prumer_sroubu/2+0.2, $fn=100); |
//ořez vyvažovací části v prosotru závitu |
translate([0,0,R02_zavit_vyska]) |
cylinder (h = R02_hrana_drzaku, r=R03_prumer_zavitu/2+S01_sila_materialu+0.5, $fn=100); |
} |
} |
/Modules/Mechanical/WINDGAUGE01A/CAD/SRC/WINDGAUGE01A_R03.scad |
---|
0,0 → 1,95 |
$fn=40; // model faces resolution. |
include <../configuration.scad> |
include <polyScrewThread_r1.scad> |
PI=3.141592; |
//Držák magnetu |
module WINDGAUGE01A_R03() |
{ |
//valec se zavitem |
union() |
{ |
difference() |
{ |
union() |
{ |
//závit |
translate([0,0,S01_sila_materialu]) |
screw_thread((R03_prumer_zavitu-S01_tolerance_zavit),S01_hloubka_zavitu,55,R04_zavit_vyska+R02_zavit_vyska+R01_zavit_vyska,PI/2,2); |
//spodní doraz |
cylinder (h = S01_sila_materialu, r=(R03_prumer_zavitu-S01_tolerance_zavit)/2+S01_sila_materialu, $fn=100); |
} |
//odstranění vnitřní výplně |
translate([0,0,S01_sila_materialu]) |
cylinder (h = R04_zavit_vyska+R02_zavit_vyska+R01_zavit_vyska+0.01, r=(R03_prumer_zavitu-S01_tolerance_zavit)/2-S01_hloubka_zavitu/2-S01_sila_materialu, $fn=100); |
//otvor na ložisko s vodiči |
translate([0,0,S01_sila_materialu/2]) |
cylinder (h = S01_sila_materialu+0.01, r=(LO_horni_prumer+0.2)/2, center = true, $fn=100); |
} |
difference() |
{ |
cylinder (h = LO_vyska_horni_doraz-R03_mezera_mezi_statorem_rotorem, r=(LO_horni_prumer+0.2)/2+S01_sila_materialu, $fn=100); |
translate([0,0,-0.005]) |
cylinder (h = LO_vyska_horni_doraz-R03_mezera_mezi_statorem_rotorem+0.01, r=(LO_horni_prumer+0.2)/2, $fn=100); |
} |
translate([0,0,LO_vyska_horni_doraz-R03_mezera_mezi_statorem_rotorem]) |
difference() |
{ |
cylinder(h=2*S01_sila_materialu, r1=(LO_horni_prumer+0.2)/2+S01_sila_materialu, r2=(LO_horni_prumer+0.2)/2-S01_sila_materialu, center=false); |
translate([0,0,-0.005]) |
cylinder(h=2*S01_sila_materialu+0.01,r1=(LO_horni_prumer+0.2)/2, r2=(LO_horni_prumer+0.2)/2-2*S01_sila_materialu, center=false); |
} |
//držák senzoru |
translate([-(senzor_sirka+2*S01_sila_materialu)/2,-(senzor_delka+2*S01_sila_materialu)/2,0]) |
difference() |
{ |
//základní materiál pro drzak senzoru |
cube([senzor_sirka+2*S01_sila_materialu,senzor_delka+2*S01_sila_materialu,R04_zavit_vyska+R02_zavit_vyska+R01_zavit_vyska+S01_sila_materialu-R01_zavit_vyska],false); |
//otvor na senozor |
translate([S01_sila_materialu,S01_sila_materialu,R04_zavit_vyska+R02_zavit_vyska+R01_zavit_vyska+S01_sila_materialu-R01_zavit_vyska-senzor_sila]) |
cube([senzor_sirka,senzor_delka,senzor_sila+0.01],false); |
//odstraneni vyplně |
translate([2*S01_sila_materialu,2*S01_sila_materialu,-0.005]) |
cube([senzor_sirka-2*S01_sila_materialu,senzor_delka-2*S01_sila_materialu,R04_zavit_vyska+R02_zavit_vyska+R01_zavit_vyska+S01_sila_materialu-R01_zavit_vyska-senzor_sila+0.01],false); |
translate([(senzor_sirka+2*S01_sila_materialu)/2,0,-0.005]) |
cube([4,senzor_delka+2*S01_sila_materialu+0.01,R04_zavit_vyska+R02_zavit_vyska+R01_zavit_vyska+S01_sila_materialu-R01_zavit_vyska+3],false); |
} |
} |
} |
WINDGAUGE01A_R03(); |
/Modules/Mechanical/WINDGAUGE01A/CAD/SRC/WINDGAUGE01A_R05.scad |
---|
0,0 → 1,40 |
$fn=40; // model faces resolution. |
include <../configuration.scad> |
include <polyScrewThread_r1.scad> |
PI=3.141592; |
//Držák ložisek, rotoru, senzoru |
module WINDGAUGE01A_R05() |
{ |
difference() |
{ |
//základní tvar |
minkowski() |
{ |
cube([R05_delka_kridla,R05_vyska_kridla,R02_sila_materialu_kridla/2]); |
cylinder(r=R02_zavit_vyska/2,h=R02_sila_materialu_kridla/2); |
} |
//otvory pro šroub |
translate([0,0,-0.01]) |
cylinder (h = R02_sila_materialu_kridla+1, r=prumer_sroubu/2+0.2, $fn=100); |
translate([R02_vzdalenost_der,0,-0.01]) |
cylinder (h = R02_sila_materialu_kridla+1, r=prumer_sroubu/2+0.2, $fn=100); |
translate([-R02_zavit_vyska/2,R05_vyska_kridla/2+R02_zavit_vyska/2+0.01,-0.01]) |
cube([R05_vyska_kridla/2,R05_vyska_kridla/2,R02_sila_materialu_kridla+0.02]); |
} |
//kolo |
translate([R05_vyska_kridla/2-R02_zavit_vyska/2,R05_vyska_kridla/2+R02_zavit_vyska/2,0]) |
cylinder(r=R05_vyska_kridla/2,h=R02_sila_materialu_kridla); |
} |
/Modules/Mechanical/WINDGAUGE01A/CAD/SRC/WINDGAUGE01A_S01.scad |
---|
0,0 → 1,110 |
$fn=40; // model faces resolution. |
include <../configuration.scad> |
include <polyScrewThread_r1.scad> |
PI=3.141592; |
//Držák ložisek, rotoru, senzoru |
module WINDGAUGE01A_S01() |
{ |
//valec se zavitem |
union() |
{ |
difference() |
{ |
union() |
{ |
translate([0,0,S01_sila_materialu]) |
screw_thread((S01_prumer_vnitrni-S01_tolerance_zavit),S01_hloubka_zavitu,55,S01_vyska_horni_zavit,PI/2,2); |
//spodní doraz |
cylinder (h = S01_sila_materialu, r=S01_prumer_vnitrni/2+5/2*S01_sila_materialu, $fn=100); |
//krycí ovál - usnadnění povolení |
difference() |
{ |
cylinder (h = R01_vyska_preryti_statoru+5, r=S01_prumer_vnitrni/2+5/2*S01_sila_materialu, $fn=100); |
cylinder (h = R01_vyska_preryti_statoru+5+0.01, r=S01_prumer_vnitrni/2+3/2*S01_sila_materialu, $fn=100); |
} |
} |
//odstranění vnitřní výplně |
translate([0,0,S01_sila_materialu]) |
cylinder (h = S01_vyska_horni_zavit+0.01, r=S01_prumer_vnitrni/2-S01_hloubka_zavitu/2-S01_sila_materialu, $fn=100); |
//otvor na ložisko s vodiči |
translate([0,0,S01_sila_materialu/2]) |
cylinder (h = S01_sila_materialu+0.01, r=(LO_spodni_prumer+0.2)/2, center = true, $fn=100); |
} |
//držák ložiska |
difference() |
{ |
cylinder (h = LO_vyska_bez_krytu, r=(LO_spodni_prumer+2*S01_sila_materialu)/2, $fn=100); |
translate([0,0,LO_vyska_bez_krytu]) |
cylinder(h=R02_zavit_vyska+100, r1=(LO_spodni_prumer+S01_sila_materialu)/2, r2=(LO_spodni_prumer+2*S01_sila_materialu)/2, center=false,$fn=100); |
cylinder (h = LO_vyska_bez_krytu, r=(LO_spodni_prumer)/2, $fn=100); |
} |
//držák ložiska doraz |
difference() |
{ |
translate([0,0,LO_vyska_bez_krytu]) |
cylinder(h=2*S01_sila_materialu, r1=(LO_spodni_prumer+2*S01_sila_materialu)/2, r2=(LO_spodni_prumer)/2, center=false,$fn=100); |
translate([0,0,LO_vyska_bez_krytu]) |
cylinder(h=2*S01_sila_materialu, r1=(LO_spodni_prumer)/2, r2=(LO_spodni_prumer-2*S01_sila_materialu)/2, center=false,$fn=100); |
} |
} |
} |
//sloupek na senzor |
module SLOUPEK() |
{ |
translate([0,0,S01_sila_materialu]) |
difference () |
{ |
cylinder (h = R01_vyska_preryti_statoru+2*lozisko_vyska+2*S01_sila_materialu+2*S01_sila_materialu+vyska_hlavy_sroubu+magnet_vyska+vyska_matky, r= sirka_matky/2+S01_sila_materialu, $fn=20); |
translate([0,0,R01_vyska_preryti_statoru+2*lozisko_vyska+2*S01_sila_materialu+2*S01_sila_materialu+vyska_hlavy_sroubu+magnet_vyska+vyska_matky-vyska_matky]) |
cylinder (h = vyska_matky+0.01, r= (sirka_matky+0.2)/2, $fn=6); |
translate([0,0,-0.01]) |
cylinder (h = R01_vyska_preryti_statoru+2*lozisko_vyska+2*S01_sila_materialu+2*S01_sila_materialu+vyska_hlavy_sroubu+magnet_vyska+vyska_matky+0.01, r= (prumer_sroubu+0.2)/2, $fn=40); |
translate([0,0,-0.01]) |
cylinder (h = vyska_hlavy_sroubu-S01_sila_materialu, r= (prumer_hlavy_sroubu)/2, $fn=40); |
translate([0,0,vyska_hlavy_sroubu-S01_sila_materialu-0.02]) |
cylinder(h=2+0.02, r1=(prumer_hlavy_sroubu)/2, r2=(prumer_sroubu+0.2)/2); |
} |
} |
WINDGAUGE01A_S01(); |
/Modules/Mechanical/WINDGAUGE01A/CAD/SRC/WINDGAUGE01A_D02.scad |
---|
0,0 → 1,67 |
$fn=40; // model faces resolution. |
include <../configuration.scad> |
include <WINDGAUGE01A_D01.scad> |
include <polyScrewThread_r1.scad> |
PI=3.141592; |
//Držák anemometru |
module WINDGAUGE01A_D02() |
{ |
difference() |
{ |
union() |
{ |
//výstuha |
rotate ([0,-90,0]) |
linear_extrude (height = S01_sila_materialu, convexity = 10) |
polygon(points=[[D02_vyska_uchytky/2,D01_delka_tyce+S01_prumer_vnitrni/2+D01_material_pred_zavitem+D02_sila_materialu-1],[0, D01_delka_tyce+S01_prumer_vnitrni/2+D01_material_pred_zavitem+D02_sila_materialu-1],[0,S01_prumer_vnitrni/2+D01_material_pred_zavitem],[D01_material_pod_zavitem,S01_prumer_vnitrni/2+D01_material_pred_zavitem]]); |
//zavit |
translate([0,0,D01_material_pod_zavitem]) |
screw_thread(S01_prumer_vnitrni-S01_tolerance_zavit,4,55,S01_vyska_spodniho_zavitu,PI/2,2); |
//spodní valec |
translate([0,0,D01_material_pod_zavitem/2]) |
cylinder (h = D01_material_pod_zavitem, r=(S01_prumer_vnitrni-S01_tolerance_zavit+D01_material_pred_zavitem*2)/2, center = true, $fn=100); |
//uchyt na tyc |
translate([0,D01_delka_tyce/2+(S01_prumer_vnitrni-S01_tolerance_zavit)/2+D01_material_pred_zavitem,D01_material_pod_zavitem/2]) |
cube([D01_sirka_tyce,D01_delka_tyce,D01_material_pod_zavitem],center=true); |
//uchyt na tyc ovalna cast |
translate([0,(S01_prumer_vnitrni-S01_tolerance_zavit)/2+D01_material_pred_zavitem,D01_material_pod_zavitem/2]) |
cube([D01_sirka_tyce,D01_material_za_zavitem+D01_material_pred_zavitem,D01_material_pod_zavitem],center=true); |
//material kolem uchytu na sloupek |
translate([0,D01_delka_tyce+(S01_prumer_vnitrni-S01_tolerance_zavit)/2+D01_material_pred_zavitem+(D02_sila_materialu+D02_prumer_obruby/2)/2-D02_dotahova_vzdalenost,D01_material_pod_zavitem/2]) |
difference() |
{ |
cube([D01_sirka_tyce,D02_sila_materialu+D02_prumer_obruby/2,D01_material_pod_zavitem],center=true); |
translate([0,D02_prumer_obruby/2-D02_dotahova_vzdalenost-D02_sila_materialu,0]) |
cylinder(h=D02_vyska_uchytky+0.01,r=D02_prumer_obruby/2,center=true); |
} |
//uchyt na sloupek |
translate([0,D01_delka_tyce+(S01_prumer_vnitrni-S01_tolerance_zavit)/2+D01_material_pred_zavitem+D02_sila_materialu+(D02_prumer_obruby)/2,D02_vyska_uchytky/2]) |
rotate(a=[0,0,270]) |
WINDGAUGE01A_D01_2(); |
} |
//otvor |
translate([0,0,(D01_material_pod_zavitem+S01_vyska_spodniho_zavitu)/2]) |
cylinder (h = D01_material_pod_zavitem+S01_vyska_spodniho_zavitu+0.02, r=((S01_prumer_vnitrni-S01_tolerance_zavit)-2*D01_material_za_zavitem)/2, center = true, $fn=100); |
} |
} |
WINDGAUGE01A_D02(); |
/Modules/Mechanical/WINDGAUGE01A/CAD/SRC/WINDGAUGE01A_R01.scad |
---|
0,0 → 1,40 |
$fn=100; // model faces resolution. |
include <../configuration.scad> |
include <polyScrewThread_r1.scad> |
PI=3.141592; |
WINDGAUGE01A_R01(); |
module WINDGAUGE01A_R01() |
{ |
translate([0,0,R01_zavit_vyska+1]) |
difference() |
{ |
//kužel |
cylinder(h=10, r1=R03_prumer_zavitu/2+S01_sila_materialu, r2=5, center=false, $fn=100); |
cylinder(h=10-2*S01_sila_materialu, r1=R03_prumer_zavitu/2, r2=5-S01_sila_materialu, center=false,$fn=100); |
} |
difference() |
{ |
//válec na závit |
cylinder (h = R01_zavit_vyska+1, r=R03_prumer_zavitu/2+S01_sila_materialu, $fn=100); |
//odečet závitu |
translate([0,0,-10]) |
screw_thread((R03_prumer_zavitu),S01_hloubka_zavitu,55,R01_zavit_vyska+12,PI/2,2); |
} |
//válec pro držení PCB |
cylinder (h = R01_zavit_vyska+10, r=2, $fn=100); |
} |
/Modules/Mechanical/WINDGAUGE01A/CAD/SRC/WINDGAUGE01A_R04.scad |
---|
0,0 → 1,51 |
$fn=40; // model faces resolution. |
include <../configuration.scad> |
include <polyScrewThread_r1.scad> |
PI=3.141592; |
//podložka u ložiska - nahrazena kovovou |
WINDGAUGE01A_R04(); |
//Model lopatky |
module WINDGAUGE01A_R04() |
{ |
//závit |
difference() |
{ |
union() |
{ |
//materiál na závit |
cylinder (h = R04_zavit_vyska, r=R03_prumer_zavitu/2+S01_sila_materialu, $fn=100); |
//krycí válec |
difference() |
{ |
//spodní válec |
cylinder (h = R01_vyska_preryti_statoru+R04_zavit_vyska, r=S01_prumer_vnitrni/2+5*S01_sila_materialu, $fn=100); |
//Odečet spodního válce |
translate([0,0,S01_sila_materialu]) |
cylinder (h = R01_vyska_preryti_statoru+R04_zavit_vyska+0.01, r=S01_prumer_vnitrni/2+4*S01_sila_materialu, $fn=100); |
} |
} |
translate([0,0,-10]) |
screw_thread((R03_prumer_zavitu),S01_hloubka_zavitu,55,R04_zavit_vyska+R02_zavit_vyska+R01_zavit_vyska,PI/2,2); |
} |
} |
/Modules/Mechanical/WINDGAUGE01A/CAD/SRC/WINDGAUGE01A_S02.scad |
---|
0,0 → 1,68 |
$fn=40; // model faces resolution. |
include <../configuration.scad> |
include <polyScrewThread_r1.scad> |
PI=3.141592; |
//Hlavní válec |
WINDGAUGE01A_S02(); |
module WINDGAUGE01A_S02() |
{ |
difference() |
{ |
union() |
{ |
//základní válec |
cylinder (h = S01_vyska, r=(S01_prumer_vnitrni)/2+S01_sila_materialu, $fn=100); |
} |
//horní závit |
translate([0,0,S01_vyska-S01_vyska_horni_zavit]) |
screw_thread(S01_prumer_vnitrni,S01_hloubka_zavitu,55,S01_vyska_horni_zavit+5,PI/2,2); |
//otvor na drzak rj11 |
translate([0,0,S01_vyska_spodniho_zavitu+S01_sila_drzaku_RJ11-0.3]) |
cylinder( 2*S01_sila_drzaku_RJ11, d1=(S01_prumer_vnitrni)-1-1.5*S01_hloubka_zavitu,d2=(S01_prumer_vnitrni) ); |
translate([0,0,S01_vyska_spodniho_zavitu]) |
cylinder (h = S01_sila_drzaku_RJ11-0.3, r=(S01_prumer_vnitrni)/2-S01_hloubka_zavitu/2+0.5, $fn=100); |
//spodní závit |
translate([0,0,-5]) |
screw_thread((S01_prumer_vnitrni),S01_hloubka_zavitu,55,S01_vyska_spodniho_zavitu+5+0.01,PI/2,2); |
//otvor skrz |
translate([0,0,S01_vyska_spodniho_zavitu+3*S01_sila_drzaku_RJ11-0.3]) |
cylinder (h = S01_vyska-S01_vyska_horni_zavit-(S01_vyska_spodniho_zavitu+3*S01_sila_drzaku_RJ11-0.3), r=(S01_prumer_vnitrni)/2, $fn=100); |
} |
} |
/Modules/Mechanical/WINDGAUGE01A/CAD/SRC/WINDGAUGE01A_S03.scad |
---|
0,0 → 1,29 |
$fn=40; // model faces resolution. |
include <../configuration.scad> |
include <polyScrewThread_r1.scad> |
//Držák na konektor RJ11 |
PI=3.141592; |
module WINDGAUGE01A_S03() |
{ |
difference() |
{ |
translate([0,0,0]) |
cylinder (h = S01_sila_drzaku_RJ11, r=(S01_prumer_vnitrni)/2-S01_hloubka_zavitu/2+0.5, $fn=100); |
translate([0,0,S01_sila_drzaku_RJ11/2]) |
cube([S01_hrana_A_RJ11,S01_hrana_B_RJ11,S01_sila_drzaku_RJ11+0.01],center=true); |
//otvor až ke kraji |
translate([0,((S01_prumer_vnitrni)/2-S01_hloubka_zavitu/2+0.5)/2,S01_sila_drzaku_RJ11/2]) cube([S01_hrana_A_RJ11,(S01_prumer_vnitrni)/2-S01_hloubka_zavitu/2+0.5,S01_sila_drzaku_RJ11+0.01],center=true); |
} |
} |
WINDGAUGE01A_S03(); |
/Modules/Mechanical/WINDGAUGE01A/CAD/SRC/polyScrewThread_r1.scad |
---|
0,0 → 1,233 |
/* |
* polyScrewThread_r1.scad by aubenc @ Thingiverse |
* |
* This script contains the library modules that can be used to generate |
* threaded rods, screws and nuts. |
* |
* http://www.thingiverse.com/thing:8796 |
* |
* CC Public Domain |
*/ |
module screw_thread(od,st,lf0,lt,rs,cs) |
{ |
or=od/2; |
ir=or-st/2*cos(lf0)/sin(lf0); |
pf=2*PI*or; |
sn=floor(pf/rs); |
lfxy=360/sn; |
ttn=round(lt/st+1); |
zt=st/sn; |
intersection() |
{ |
if (cs >= -1) |
{ |
thread_shape(cs,lt,or,ir,sn,st); |
} |
full_thread(ttn,st,sn,zt,lfxy,or,ir); |
} |
} |
module hex_nut(df,hg,sth,clf,cod,crs) |
{ |
difference() |
{ |
hex_head(hg,df); |
hex_countersink_ends(sth/2,cod,clf,crs,hg); |
screw_thread(cod,sth,clf,hg,crs,-2); |
} |
} |
module hex_screw(od,st,lf0,lt,rs,cs,df,hg,ntl,ntd) |
{ |
ntr=od/2-(st/2)*cos(lf0)/sin(lf0); |
union() |
{ |
hex_head(hg,df); |
translate([0,0,hg]) |
if ( ntl == 0 ) |
{ |
cylinder(h=0.01, r=ntr, center=true); |
} |
else |
{ |
if ( ntd == -1 ) |
{ |
cylinder(h=ntl+0.01, r=ntr, $fn=floor(od*PI/rs), center=false); |
} |
else if ( ntd == 0 ) |
{ |
union() |
{ |
cylinder(h=ntl-st/2, |
r=od/2, $fn=floor(od*PI/rs), center=false); |
translate([0,0,ntl-st/2]) |
cylinder(h=st/2, |
r1=od/2, r2=ntr, |
$fn=floor(od*PI/rs), center=false); |
} |
} |
else |
{ |
cylinder(h=ntl, r=ntd/2, $fn=ntd*PI/rs, center=false); |
} |
} |
translate([0,0,ntl+hg]) screw_thread(od,st,lf0,lt,rs,cs); |
} |
} |
module hex_screw_0(od,st,lf0,lt,rs,cs,df,hg,ntl,ntd) |
{ |
ntr=od/2-(st/2)*cos(lf0)/sin(lf0); |
union() |
{ |
hex_head_0(hg,df); |
translate([0,0,hg]) |
if ( ntl == 0 ) |
{ |
cylinder(h=0.01, r=ntr, center=true); |
} |
else |
{ |
if ( ntd == -1 ) |
{ |
cylinder(h=ntl+0.01, r=ntr, $fn=floor(od*PI/rs), center=false); |
} |
else if ( ntd == 0 ) |
{ |
union() |
{ |
cylinder(h=ntl-st/2, |
r=od/2, $fn=floor(od*PI/rs), center=false); |
translate([0,0,ntl-st/2]) |
cylinder(h=st/2, |
r1=od/2, r2=ntr, |
$fn=floor(od*PI/rs), center=false); |
} |
} |
else |
{ |
cylinder(h=ntl, r=ntd/2, $fn=ntd*PI/rs, center=false); |
} |
} |
translate([0,0,ntl+hg]) screw_thread(od,st,lf0,lt,rs,cs); |
} |
} |
module thread_shape(cs,lt,or,ir,sn,st) |
{ |
if ( cs == 0 ) |
{ |
cylinder(h=lt, r=or, $fn=sn, center=false); |
} |
else |
{ |
union() |
{ |
translate([0,0,st/2]) |
cylinder(h=lt-st+0.005, r=or, $fn=sn, center=false); |
if ( cs == -1 || cs == 2 ) |
{ |
cylinder(h=st/2, r1=ir, r2=or, $fn=sn, center=false); |
} |
else |
{ |
cylinder(h=st/2, r=or, $fn=sn, center=false); |
} |
translate([0,0,lt-st/2]) |
if ( cs == 1 || cs == 2 ) |
{ |
cylinder(h=st/2, r1=or, r2=ir, $fn=sn, center=false); |
} |
else |
{ |
cylinder(h=st/2, r=or, $fn=sn, center=false); |
} |
} |
} |
} |
module full_thread(ttn,st,sn,zt,lfxy,or,ir) |
{ |
if(ir >= 0.2) |
{ |
for(i=[0:ttn-1]) |
{ |
for(j=[0:sn-1]) |
assign( pt = [ [0, 0, i*st-st ], |
[ir*cos(j*lfxy), ir*sin(j*lfxy), i*st+j*zt-st ], |
[ir*cos((j+1)*lfxy), ir*sin((j+1)*lfxy), i*st+(j+1)*zt-st ], |
[0,0,i*st], |
[or*cos(j*lfxy), or*sin(j*lfxy), i*st+j*zt-st/2 ], |
[or*cos((j+1)*lfxy), or*sin((j+1)*lfxy), i*st+(j+1)*zt-st/2 ], |
[ir*cos(j*lfxy), ir*sin(j*lfxy), i*st+j*zt ], |
[ir*cos((j+1)*lfxy), ir*sin((j+1)*lfxy), i*st+(j+1)*zt ], |
[0, 0, i*st+st ] ]) |
{ |
polyhedron(points=pt, |
triangles=[ [1,0,3],[1,3,6],[6,3,8],[1,6,4], |
[0,1,2],[1,4,2],[2,4,5],[5,4,6],[5,6,7],[7,6,8], |
[7,8,3],[0,2,3],[3,2,7],[7,2,5] ]); |
} |
} |
} |
else |
{ |
echo("Step Degrees too agresive, the thread will not be made!!"); |
echo("Try to increase de value for the degrees and/or..."); |
echo(" decrease the pitch value and/or..."); |
echo(" increase the outer diameter value."); |
} |
} |
module hex_head(hg,df) |
{ |
rd0=df/2/sin(60); |
x0=0; x1=df/2; x2=x1+hg/2; |
y0=0; y1=hg/2; y2=hg; |
intersection() |
{ |
cylinder(h=hg, r=rd0, $fn=6, center=false); |
rotate_extrude(convexity=10, $fn=6*round(df*PI/6/0.5)) |
polygon([ [x0,y0],[x1,y0],[x2,y1],[x1,y2],[x0,y2] ]); |
} |
} |
module hex_head_0(hg,df) |
{ |
cylinder(h=hg, r=df/2/sin(60), $fn=6, center=false); |
} |
module hex_countersink_ends(chg,cod,clf,crs,hg) |
{ |
translate([0,0,-0.1]) |
cylinder(h=chg+0.01, |
r1=cod/2, |
r2=cod/2-(chg+0.1)*cos(clf)/sin(clf), |
$fn=floor(cod*PI/crs), center=false); |
translate([0,0,hg-chg+0.1]) |
cylinder(h=chg+0.01, |
r1=cod/2-(chg+0.1)*cos(clf)/sin(clf), |
r2=cod/2, |
$fn=floor(cod*PI/crs), center=false); |
} |
/Modules/Mechanical/WINDGAUGE01A/CAD/SRC/polytests.scad |
---|
0,0 → 1,95 |
/* |
* polyTests.scad by aubenc @ Thingiverse |
* |
* This script contains few examples to show how to use the modules |
* included in the library script: polyScrewThead.scad |
* |
* http://www.thingiverse.com/thing:8796 |
* |
* CC Public Domain |
*/ |
include <polyScrewThread.scad> |
PI=3.141592; |
/* Example 01. |
* Just a 100mm long threaded rod. |
* |
* screw_thread(15, // Outer diameter of the thread |
* 4, // Step, traveling length per turn, also, tooth height, whatever... |
* 55, // Degrees for the shape of the tooth |
* (XY plane = 0, Z = 90, btw, 0 and 90 will/should not work...) |
* 100, // Length (Z) of the tread |
* PI/2, // Resolution, one face each "PI/2" mm of the perimeter, |
* 0); // Countersink style: |
* -2 - Not even flat ends |
* -1 - Bottom (countersink'd and top flat) |
* 0 - None (top and bottom flat) |
* 1 - Top (bottom flat) |
* 2 - Both (countersink'd) |
*/ |
// screw_thread(15,4,55,100,PI/2,2); |
/* Example 02. |
* A nut for the previous example. |
* |
* hexa_nut(24, // Distance between flats |
* 8, // Height |
* 4, // Step height (the half will be used to countersink the ends) |
* 55, // Degrees (same as used for the screw_thread example) |
* 15, // Outer diameter of the thread to match |
* 0.5) // Resolution, you may want to set this to small values |
* (quite high res) to minimize overhang issues |
* |
*/ |
// hex_nut(24,8,4,55,15,0.5); |
/* Example 03. |
* A screw, threaded all the way, with hex head. |
* |
* hex_screw(15, // Outer diameter of the thread |
* 4, // Thread step |
* 55, // Step shape degrees |
* 30, // Length of the threaded section of the screw |
* 1.5, // Resolution (face at each 2mm of the perimeter) |
* 2, // Countersink in both ends |
* 24, // Distance between flats for the hex head |
* 8, // Height of the hex head (can be zero) |
* 0, // Length of the non threaded section of the screw |
* 0) // Diameter for the non threaded section of the screw |
* -1 - Same as inner diameter of the thread |
* 0 - Same as outer diameter of the thread |
* value - The given value |
* |
*/ |
// hex_screw(15,4,55,30,1.5,2,24,8,0,0); |
/* Example 04. |
* A screw with a non threaded section and with hex head. |
* |
* Same module and parameters than for Example 03 but for the length of the non |
* threaded section wich is set to 50mm here. |
* |
*/ |
// hex_screw(15,4,55,30,1.5,2,24,8,50,0); |
/* Example 05. |
* |
* A rod whith a middle section without thread and, a portion of it, hex shaped. |
* One end is threaded in the opposite direction than the other. |
* |
* So... yes, OpenSCAD mirror feature will change the thread direction. |
* |
*/ |
/* |
translate([0,0,32.5+5+7.5]) |
union() |
{ |
hex_screw(15,4,55,32.5,1.5,2,15,5,7.5,0); |
mirror([0,0,1]) hex_screw(15,4,55,32.5,1.5,2,15,5,7.5,0); |
} |
*/ |