Compare commits

..

No commits in common. "4c0a761c89fb0089f5339f895923ad9c3a66bf32" and "f30413ec510ba467f4338ef7726933b7e1474034" have entirely different histories.

View file

@ -25,7 +25,7 @@ module puzzle_line(a=20, b=15, z=40, h=10) {
module contour(h=70) { module contour(h=70) {
for(r = [0:5]) { for(r = [0:5]) {
rotate([0,0,(r+0.5)*60]) rotate([0,0,(r+0.5)*60])
translate([10.9,-6.88,0]) translate([10.95,-6.88,0])
{ {
if( r%2 == 0 ) { if( r%2 == 0 ) {
mirror([1,0,0]) mirror([1,0,0])
@ -46,7 +46,7 @@ module contour_hull(h=1, a=5.7, b=3.2, z=6.88*2, a0=4.5,b0=2.2,z0=6.88*2) {
for(r = [0:2]) { for(r = [0:2]) {
rotate([0,0,r*120-30]) rotate([0,0,r*120-30])
translate([10.9,-6.88,0]) { translate([10.95,-6.88,0]) {
hull() { hull() {
translate([-0.5,(z0-(a0-1))/2,0]) translate([-0.5,(z0-(a0-1))/2,0])
cube([0.5, (a0-1), h]); cube([0.5, (a0-1), h]);
@ -59,7 +59,7 @@ module contour_hull(h=1, a=5.7, b=3.2, z=6.88*2, a0=4.5,b0=2.2,z0=6.88*2) {
for(r = [0:2]) { for(r = [0:2]) {
rotate([0,0,30+r*120]) rotate([0,0,30+r*120])
translate([10.9,-6.88,0]) translate([10.95,-6.88,0])
mirror([1,0,0]) mirror([1,0,0])
translate([-1,0,0]) translate([-1,0,0])
{ {
@ -78,14 +78,14 @@ module contour_hull(h=1, a=5.7, b=3.2, z=6.88*2, a0=4.5,b0=2.2,z0=6.88*2) {
module inner_contour(h=70) { module inner_contour(h=70) {
for(r = [0:5]) { for(r = [0:5]) {
rotate([0,0,(r+0.5)*60]) rotate([0,0,(r+0.5)*60])
translate([10.5-1,-6,0]) translate([10.8-1,-6.25,0])
{ {
if( r%2 == 0 ) { if( r%2 == 0 ) {
mirror([1,0,0]) mirror([1,0,0])
translate([-1,0,0]) translate([-1,0,0])
puzzle_line(6, 4.4, z=6*2, h=h); puzzle_line(6, 4.4, z=6.25*2, h=h);
} else { } else {
puzzle_line(4.5, 1, z=6*2, h=h); puzzle_line(4.5, 1, z=6.25*2, h=h);
} }
} }
} }
@ -99,42 +99,7 @@ module inner_contour_hull(h=1, a=5.7, b=3.2, z=6.88*2, a0=4.4,b0=2.1,z0=6.88*2)
} }
} }
module front_text(value="220", unit="Ω") { module inner(h=70) {
color([0,0,1])
{
translate([0,4,6])
linear_extrude(8)
text(value, size=6, halign="center", font="+Jakatar");
translate([0,-9,0])
linear_extrude(8)
text(unit, size=10, halign="center", font="+Jakatar");
}
}
module front() {
render()
difference() {
cylinder(d=26.5, h=8, $fn=6);
translate([0,-8,2])
cylinder(d=24, h=6, $fn=6);
translate([0,-3,1])
cylinder(d=20, h=5, $fn=6);
}
}
module inner_color(value, unit, h) {
translate([0,0,h])
render()
intersection(){
front();
front_text(value, unit);
}
}
module inner(value="220", unit="Ω", h=70) {
{ {
render() render()
difference() difference()
@ -145,27 +110,25 @@ module inner(value="220", unit="Ω", h=70) {
cube([40, 15,h]); cube([40, 15,h]);
} }
// back
inner_contour_hull(); inner_contour_hull();
// front
translate([0,0,h]) translate([0,0,h])
{
render() render()
difference() difference() {
{ cylinder(d=26, h=4, $fn=6);
front();
front_text(value, unit);
}
}
}
}
translate([0,-8,2])
cylinder(d=16, h=3, $fn=6);
translate([0,-3,1])
cylinder(d=20, h=2, $fn=6);
}
}
}
module outer(h=70) { module outer(h=70) {
translate([0,0,-10]) translate([0,0,-8])
cylinder(d=15.5, h=10, $fn=6); cylinder(d=15, h=8, $fn=6);
contour(h=h); contour(h=h);
@ -174,17 +137,10 @@ module outer(h=70) {
} }
color([1,1,0])
translate([0,0,10]) translate([0,0,10])
{ inner(h=70);
color([0.22,0.2,0.2])
inner("220", "Ω", h=70);
color([0.7,0.8,1.0])
inner_color("220", "Ω", h=70);
}
color([0.7, 0.4, 0.4]) color([0.7, 0.4, 0.4])
outer(h=70); outer(h=70);