cad/outdoor/dromToggle.scad

53 lines
1.1 KiB
OpenSCAD
Raw Permalink Normal View History

2024-09-23 04:21:01 +00:00
// Cord toggle for securing grommet equipment
2024-09-23 02:22:51 +00:00
mainDiam=10;
mainLength=20;
cordDiam=3;
cordHoleGap=1;
flattenBottom=0.3;
$fn = 40;
difference(){
2024-09-23 04:21:01 +00:00
// cyl mirrored across yz +++++++++++++++++++++++++++++++++++++++++++
2024-09-23 02:22:51 +00:00
color("blue"){
for (dir = [-1 : 1] ) mirror([dir, 0, 0]){
union(){
rotate([0,90,0]){
cylinder(mainLength / 2, d = mainDiam, center=false);
}
2024-09-23 04:21:01 +00:00
// rounded ends
2024-09-23 02:22:51 +00:00
translate([mainLength / 2, 0, 0]){
sphere(d = mainDiam);
}
}
}
}
2024-09-23 04:21:01 +00:00
// flatten bottom for better print and interface ---------------------------
2024-09-23 02:22:51 +00:00
color("red"){
translate([0, 0, -1 * (1 - flattenBottom) * mainDiam]){
cube( [2 * mainLength, mainDiam, mainDiam], center=true);
}
}
2024-09-23 04:21:01 +00:00
//holes for cord
2024-09-23 02:22:51 +00:00
color("green"){
for (dir = [-1 : 1]) mirror([dir, 0, 0]){
translate([cordHoleGap * cordDiam, 0, 0]){
cylinder( mainDiam * 1.1, d = cordDiam, center = true);
}
}
}
2024-09-23 04:21:01 +00:00
//relief for cord bend
2024-09-23 02:22:51 +00:00
color("yellow"){
translate([0, 0, mainDiam / 2]){
rotate([0, 90, 0]){
cylinder(cordDiam * cordHoleGap * 2, d = cordDiam, center = true);
}
}
}
}