brilliant cut diamond script

master
Vitaliy Filippov 2014-06-26 08:58:06 +00:00
parent bd49a5e4f8
commit e8aca336d4
2 changed files with 72 additions and 1 deletions

71
diamond2.scad Normal file
View File

@ -0,0 +1,71 @@
// Brilliant cut diamond (57 faces)
// Inspired by thing:50915 by takuya, but rewritten to be more correct
// (original script produces incorrect results with diameter != 20)
// (c) Vitaliy Filippov 2014, license: CC-BY-SA 4.0
// Diamond_size_d
dd=40;
// Diamond_height_ratio
hr=0.615;
// ignore variable values
pag1=42.45; // Pavillion_angle1
pag2=40.75; // Pavillion_angle2
cag3=40.16; // Crown_angle3
cag4=34.5; // Crown_angle4
cag5=24.6; // Crown_angle4 [was 23.45 in original script?! shouldn't be...]
dh=dd*hr; // Diamond height
difference() {
translate([0,0,-dd*0.431]) cylinder(h=dh,r=dd/2,$fn=48);
union() {
for (i = [0 : 16-1]) {
rotate([0,0,360/16*i])
translate([dd/2,0,0])
rotate([0,90-pag1,0])
translate([0, -dd/4, -dd])
cube(size=[dd/2,dd/2,1.1*dd], center=false);
}
}
union() {
for (i = [0 : 8-1]) {
rotate([0,0,360/8*i+11.25])
translate([dd/2 + /*compensation for elliptical cut*/dd/2*(1-cos(360/32))*tan(90-pag1),0,0])
rotate([0,90-pag2,0])
translate([0, -dd/4, -dd])
cube(size=[dd/2,dd/2,1.1*dd], center=false);
}
}
union() {
for (i = [0 : 16-1]) {
rotate([0,0,360/16*i])
translate([dd/2,0,0])
rotate([0,-90+cag3,0])
translate([0, -dd/4, -0])
cube(size=[dd/2,dd/2,dd], center=false);
}
}
union() {
for (i = [0 : 8-1]) {
rotate([0,0,360/8*i+11.25])
translate([dd/2,0,dd/2*(1-cos(360/32))*tan(cag3)])
rotate([0,-90+cag4,0])
translate([0, -dd/4, -dd/2])
cube(size=[dd/2,dd/2,dd], center=false);
}
}
union() {
for (i = [0 : 8-1] ) {
rotate([0,0,360/8*i-11.25])
translate([cos(22.5)*(dd/2-((dh-dd*0.431)-(dd/2*(1-cos(360/32))*tan(cag3)))/tan(cag4)),0,dh-dd*0.431])
rotate([0,-90+cag5,0])
translate([0, -dd/4, -dd])
cube(size=[dd/2,dd/2,dd], center=false);
}
}
}

View File

@ -218,7 +218,7 @@ module protector_angular() {
}
}
module axle(height) {
module axle() {
axle_gap = 1.95;
union() {
translate([-HOLE_RADIUS, -axle_gap/2, 0])