// Heatsinks made by loops of differences // WIP - needs better lighting, environment, and metal textures! #version 3.7; #declare SDL = true; #default {finish {ambient 0 diffuse 1} } global_settings { assumed_gamma 1.0 max_trace_level 5 radiosity { pretrace_start 0.08 // start pretrace at this size pretrace_end 0.04 // end pretrace at this size count 35 // higher -> higher quality (1..1600) [35] nearest_count 5 // higher -> higher quality (1..10) [5] error_bound 1.8 // higher -> smoother, less accurate [1.8] recursion_limit 3 // how much interreflections are calculated (1..5+) [3] low_error_factor 0.5 // reduce error_bound during last pretrace step gray_threshold 0.0 // increase for weakening colors (0..1) [0] minimum_reuse 0.015 // reuse of old radiosity samples [0.015] brightness 1 // brightness of radiosity effects (0..1) [1] adc_bailout 0.01/2 //normal on // take surface normals into account [off] //media on // take media into account [off] //save_file "file_name" // save radiosity data //load_file "file_name" // load saved radiosity data //always_sample off // turn sampling in final trace off [on] //max_sample 1.0 // maximum brightness of samples } // end radiosity } // end global settings #include "colors.inc" #include "debug.inc" Set_Debug (true) #include "math.inc" #include "rand.inc" #include "shapes.inc" #include "shapes2.inc" #include "shapes3.inc" #include "metals.inc" #include "textures.inc" #include "transforms.inc" #include "RoundedBox.mcr" camera { //location <2.5, 4, -3> //location <0, 4, -5> // heatsink 2 location <8, 16, -8> // heatsink 2 //location <14, 6, 0> // heatsink 9 side view //right x*image_width/image_height //look_at <2.5, 1, 1.01>} // heatsink 1 //look_at <0, 2, 0>} // heatsink 2 look_at <8, 1, 1>} // heatsink 3 //light_source {<6, 24, -10> color rgb <1, 1, 1>} light_source {< 12, 18, 9> color srgb <1, 1, 0.8> spotlight radius 12 point_at <15, 0, 11>} // rear right light_source {< 15, 18, 6> color srgb <0.9, 0.9, 1> spotlight radius 12 point_at < 4, 0, 4>} // right light_source {<-15, 18, 6> color srgb <1, 0.8, 0.8> spotlight radius 12 point_at <-4, 0, 4>} // left sky_sphere {pigment {White*0.8}} /* sky_sphere {pigment {gradient <0, 1, 0> color_map {[0 color rgb <1, 1, 1> ] // White [0.4 color rgb <0.14, 0.14, 0.56>*1.5] //~Navy [0.6 color rgb <0.14, 0.14, 0.56>*1.5] //~Navy [1.0 color rgb <1, 1, 1> ] // White } scale 2 } } // end of sky_sphere */ #declare MetalFinish1 = finish { metallic ambient 0.2 diffuse 0.5 // 0.7 brilliance 4 // 6 reflection 0.25 phong 0.75 phong_size 80 } #declare Tone2 = <1, 1, 0.5>; #declare Wood = texture { pigment { wood color_map { [0.0 srgb <121, 52, 13>/255 * Tone2] //[0.2 srgb <142, 73, 18>/255 * Tone2] [0.2 srgb <148, 144, 133>/255 * Tone2] [0.4 srgb <184, 115, 48>/255 * Tone2] //[0.6 srgb <157, 81, 23>/255 * Tone2] [0.6 srgb <143, 142, 131>/255 * Tone2] [0.8 srgb <158, 118, 53>/255 * Tone2] //[0.8 srgb <108, 45, 4>/255 * Tone2] [1.0 srgb <156, 72, 26>/255 * Tone2] } warp {turbulence <0.6, 0.1, 0.1>*0.5} scale <0.1, 0.1, 10>*0.5 translate y*0.1 rotate y*90 } // end pigment normal { wood warp {turbulence <0.6, 0.1, 0.1>*0.5} scale <0.1, 0.1, 10>*0.5 translate y*0.1 rotate y*90 } // end normal scale 2 } // end texture #declare Cr = texture { pigment {srgb <200, 198, 180>/255} //{ rgb <0.658824, 0.658824, 0.658824> } finish { ambient 0.3 diffuse 0.7 reflection 0.15 brilliance 8 specular 0.8 roughness 0.1 } } #declare Al = texture { Cr normal { bumps -0.01 scale <0.1, 0.001, 0.001> } } #declare MyCopper1 = finish { metallic ambient 0.1 diffuse 0.6 brilliance 4 reflection 0.2 //irid {0.55 thickness 0.4 turbulence 0.05} irid {0.65 thickness 0.4 turbulence 0.05} phong 0.75 phong_size 50 } #declare Cu = texture {pigment {rgb <0.72, 0.45, 0.20> * <1.4, 0.8, 1.6>* 0.6} finish {MyCopper1} normal {bumps 0.01}} #declare PurpleOverlay = pigment {agate color_map { [0, rgb <0.72*0.1, 0.45*0.1, 0.40>*0.3] [1, rgbt <0, 0, 0, 1>]} scale 0.5 } #declare SmudgeTone = 0.8; #declare WhiteSmudge = texture { #declare Percentage = 0.3; #declare Hazy = 0.9; pigment { granite color_map { [0, rgbt ] [Percentage, rgbt ] [Percentage, rgbt <1, 1, 1, 1>] [1, rgbt <1, 1, 1, 1>]} scale 6 } normal {granite 0.6} } #declare ThermalPaste = texture { #declare Percent = 0.1; pigment { granite color_map { [0.0, rgb <1, 1, 1>*0.1] [Percent, rgb <1, 1, 1>*0.1] [Percent, rgb <1, 1, 1>*0.1] [1, rgb <1, 1, 1>*0.3]} scale 0.1 } normal {granite 0.1} } //#declare Cu2 = texture {pigment {srgb <0.72, 0.45, 0.20>} finish {MetalFinish1} } #declare Cu2 = texture {pigment {srgb <0.72, 0.45, 0.20>} finish {MyCopper1} normal {granite 0.05 scale <5, 1, 1>} } #declare Cast_Cu = texture { #declare Bumpy = 0.1; Cu normal { bumps 0.5 scale } } //############################################################################################################# // 1/32 thick 1/8 standoffs 1/4" radius #declare Standoff = cylinder {<0, -0.125, 0>, <0, 0.125, 0>, 3/32} #declare StandoffHole = cylinder {<0, -0.25, 0>, <0, 0.25, 0>, 3/64} #declare Solid = union { box{<0, 0, 1/8>, <17/8, 1/32, 15/8> } // large cutout box box{<2.75, 0, 2>, <3.5, 1/32, 2.5> } // small flat surface box{<2.75, 0, 2>, <3.125, 1/32, 3> } // tab connector box box{<2, 0, 6/8>, <4.5, 1/32, 17/8> } // extension from large cutout box, and cylinder box box{<1, 0, 15/8>, <23/8, 1/32, 26/8>} // Cone square box{<3.125, 1/32, 2.5>, <(3.125-1/32), -5/32, 3> } // vertical tab connector box{<23/8, 0, 2.5>, <3.25, 1/16, 3> translate -y*3/16} // horizontal tab connector cylinder {<0, 0, 0>, <0, 1/16, 0>, 0.25 translate <3.25, -3/16, 2.75>} // round tab box{<0, 0, -0.125/2>, <-0.5, 1/32, 0.125/2> rotate y*30 translate <4.75, 0, 5/8>} // bottom right corner tab cylinder {<0, 0, 0>, <0, 1/32, 0>, 0.125/2 translate <4.75, 0, 5/8>} // bottom right corner extension box{<7/8, 0, 2+3/16>, <1, 1/32, 2+7/16> } // left horizontal tab connector cylinder {<0, 0, 0>, <0, 1/32, 0>, 0.125 translate <7/8, 0, 2+5/16>} // left tab #declare FirstCone = <1+6/16, 1/32, 1+12/16>; #for (Z, 1, 9) #for (X, 0, 8) cone {FirstCone, 1/32, FirstCone + <0, 3/16, 0>, 1/64 translate <(5/32)*X, 0, (5/32)*Z>} #end // end for X #end // end for Y #declare FirstCyl = <3+4/16, 1/32, 0.75>; #for (Z, 1, 9) #for (X, 0, 8) cylinder {FirstCyl, FirstCyl + <0, 1/32, 0>, 1/32 translate <(9/64)*X, 0, (9/64)*Z>} #end // end for X #end // end for Y }// end union #declare Heatsink1 = union { difference{ object {Solid} box{<1/16, -0.1, 3/16>, <33/16, 2/32, 29/16>} // end box box{<17/8, -0.1, 10/8>, <24/8, 2/32, 14/8>} // end box cylinder {<0, 0, 0>, <0, -6/16, 0>, 0.125/2 translate <3.25, 0, 2.75>} cylinder {<0, 1/8, 0>, <0, -1/8, 0>, 0.125/4 translate <7/8, 0, 2+5/16>} cylinder {<0, -1/32, 0>, <0, 2/32, 0>, 0.125/4 translate <4.75, 0, 5/8>} // hole in bottom right corner extension } // end difference difference{ union { object {Standoff translate <1.5, 0, 1/16>} object {Standoff translate <1, 0, 1+7/8>} object {Standoff translate <1/8, 0, 7/8>} object {Standoff translate <2+3/8, 0, 1>} } // end union object {StandoffHole translate <1.5, 0, 1/16>} object {StandoffHole translate <1, 0, 1+7/8>} object {StandoffHole translate <1/8, 0, 7/8>} object {StandoffHole translate <2+3/8, 0, 1>} }// end difference texture {Al} // ALUMINUM TEXTURE translate y*0.2 } //############################################################################################################################# #declare Heatsink2 = union{ #declare Notch = 17/16; difference{ union{ box{<-1.75, 1.5, -1.75>, <1.75, 0.25, 1.75>} // end box box{<-7/8, 0, -7/8>, <7/8, 0.25, 7/8>} // end box } cylinder {<0, 1.6, 0>, <0, -0.3, 0>, 0.5} #for (Cut, 0, 14) #declare Raise = 0; #if (Cut >5) #declare Raise = (Cut-4)*(3/64); #end // end if #for (Rotate, 0, 270, 90) box {<-(1/64), 1.6, 0.625+Raise>, <(1/64), -0.3, 1.8> translate x*Cut*(5/64) rotate y*Rotate} // for fins box {<-(1/64), 1.6, 0.625+Raise>, <(1/64), -0.3, 1.8> translate -x*Cut*(5/64) rotate y*Rotate} // for fins #if (Cut <5) box{, <1.76, -0.3, 1.76> rotate y*Rotate} box{<5/8, 1.6, 1.5>, <1.76, -0.3, 1.76> rotate y*Rotate} box{<1.5, 1.6, 5/8>, <1.76, -0.3, 1.76> rotate y*Rotate} #end // end if #end // end for Rotate #end // end for Cut } cylinder {<0, 0.75, 0>, <0, 0, 0>, 0.5 texture {Cu} } #for (Round, 0, 3) cylinder {, , 0.125/2 rotate y*Round*90} #end texture {Al} // ALUMINUM TEXTURE } // end union //############################################################################################################################# #declare Heatsink3 = union { #declare Fin = union { box {<0, -3/8, 4.25>, <(3/32)-1/128, (-3/8)+1/128, (4.25)+1.5>} // bottom fold box {<3/32, (-3/8)+1/128, 4.25>, <(3/32)+1/128, 0.5-(1/128), (4.25)+1.5>} // main fin box {<0, 0.5, 4.25>, <(3/32)-1/128, (0.5)-1/128, (4.25)+1.5>} // top fold texture {Chrome_Metal} } // end Fin #difference { #union { #for (F, 0, 72) object {Fin translate x*F*3/32} #end // end for F } // end union box {<-0.1, 0.25, 5+5/16>, <9.75, 0.6, 5+7/16>} box {<-0.1, 0.25, 4+11/16>, <9.75, 0.6, 4+13/16>} } // end difference #declare Label1 = union { box {<0, 0.5-1/128, 5.75-3/8>, <1.75, 0.5, 5.75> texture {pigment {White}} } text { ttf "arial.ttf", "POV ||||||||", 1/128, 0.0 scale <3/8, 3/8, 1/64> rotate x*90 translate <0.125, 0.5+1/512, 5.75-5/16> pigment {Black}} } // end union Label 1 #declare Label2 = union { box {<5.5, 0.5-1/128, 5.75-3/8>, <6.75, 0.5, 5.75> texture {pigment {White}} } text { ttf "arial.ttf", "|||| Ray", 1/128, 0.0 scale <3/8, 3/8, 1/64> rotate x*90 translate <5.625, 0.5+1/512, 5.75-5/16> pigment {Black}} } // end union Label 1 object {Label1} object {Label2} box {<0, 0.5-1/128, 3.75>, <6, 0.5+1/64, 4.5> texture {pigment {Black}} } // BLACK TAPE #declare Mount = difference { box {<0, -3/8, 4.75> <5/8, -(3/8+1/128), 5.75+5/8>} sphere {<5/16, -3/8, (5.75+5/8)-3/16>, 1/16} cylinder {<5/16, -3/8, (5.75+5/8)-3/16>, <5/16, -3/8, (5.75+5/8)-3/8>, 1/16} // slotted hole sphere {<5/16, -3/8, (5.75+5/8)-3/8>, 1/16} texture {Chrome_Metal} } // end difference Mount object {Mount} object {Mount translate x*(2+1/16) } box {<11.5, 0, 7/8>, <1.75+11.5, -1/8, (7/8)+1.5> texture {Cu2} } // Main heatsink collector #declare Holddown = union { #declare Spring = union { #declare SpringRadius = 0.125; #declare SpringLength = 0.125; #declare WireThickness = 1/64; #declare TPI = 16; isosurface { function { f_helix1(x,y,z, 1, TPI*pi*2, WireThickness, SpringRadius, 1, 1, 0) } contained_by { box { <-(SpringRadius*1.5), 0, -(SpringRadius*1.5)>, } } max_gradient 5 all_intersections texture { Chrome_Metal } no_shadow scale <1,1,-1> rotate <0,0,0> // rotate <0,0,90> } // end isosurface } // end union union{ box {<0, 0, -11/16>, <5/16, 1/16, 11/16>} // z-axis press-fit #declare Rivet = difference { cylinder {<5/32, 0, 0>, <5/32, 3/32, 0>, 3/64 texture {Cu}} cone {<5/32, 1/32, 0>, 1/128, <5/32, 4/32, 0>, 6/128 texture {Cu}} } // end difference Rivet object {Rivet} object {Rivet translate z*0.5} object {Rivet translate -z*0.5} #declare Arm = union { box {< 4/16, 0, -3/16>, <-11/16, 1/16, 3/16>} // 45-degree arm box {<-3/16, 1/16, -3/32>, <-12/16, 2/16, 3/32>} // bulge box {<0, 1/16, -3/16>, <-1/16, -4/16, 3/16> rotate -z*30 translate <-11/16, 0, 0>} // slanted connector box {<0, 1/16, -3/32>, <-1/16, -4/16, 3/32> rotate -z*30 translate <-12/16, 0, 0>} // slanted connector box {<-13/16, -3/16, -3/16>, <-(1+1/8), -4/16, 3/16>} // outer arm end cylinder {<-(1+1/8), -3/16, 0>, <-(1+1/8), -4/16, 0>, 3/16} // outer arm round-off object {Spring translate <-(1+1/8), -3/16, 0>} #declare Screw = union { difference { cylinder {<0, 4/16, 0>, <0, 5/16, 0>, 5/32} // head box {<-6/32, 9/32, -1/32>, <6/32, 11/32, 1/32>} // slot cylinder {<0, 4/16, 0>, <0, 6/16, 0>, 1/16} //Torx hole } // end head difference cylinder {<0, 0, 0>, <0, 4/16, 0>, 1/16} // shaft cylinder {<0, 0, 0>, <0, -1/16, 0>, 1/32} // threads } // end union Screw object {Screw translate <-(1+1/8), -3/16, 0>} }//end arm union object {Arm rotate -y*45 translate -z*12/16} object {Arm rotate y*45 translate z*12/16} texture {Chrome_Metal} } // end union chrome parts } // end union Holddown object {Holddown translate <11.5, 0, 0.75+7/8>} object {Holddown rotate y* 180 translate <11.5+1.75, 0, 0.75+7/8>} // larger heat tube union { sphere {<-1/8, 1/8, 5+3/8>, 1/8} // top left end of larger heat tube cylinder{<-1/8, 1/8, 5+3/8>, <11.5, 1/8, 5+3/8>, 1/8} // x-axis portion of large heat tube cylinder{<12+5/8, 1/8, 5/8>, <12+5/8, 1/8, 4>, 1/8} // z-axis portion of large heat tube sphere {<12+5/8, 1/8, 5/8>, 1/8} // bottom right end of larger heat tube object {Segment_of_Torus(11/8, // major radius, 1/8, // minor radius, 90 // segment angle (in degrees) ) rotate -y*90 translate <11.25, 1/8, 4>} // end torus segment texture {Cast_Cu} } // end union // smaller heat tube union { sphere {<-1/8, 1/8, 4.75>, 1/8} // top left end of smaller heat tube cylinder{<-1/8, 1/8, 4.75>, <11.5, 1/8, 4.75>, 1/8} // x-axis portion of small heat tube cylinder{<12+1/8, 1/8, 5/8>, <12+1/8, 1/8, 4>, 1/8} // z-axis portion of small heat tube sphere {<12+1/8, 1/8, 5/8>, 1/8} // bottom right end of smaller heat tube object {Segment_of_Torus(6/8, // major radius, 1/8, // minor radius, 90 // segment angle (in degrees) ) rotate -y*90 translate <11+3/8, 1/8, 4>} // end torus segment texture {Cast_Cu} } // end union texture {Cu} translate y*0.38 } // end union //############################################################################################################################# //Heatsink 4 //3" x 2+3/8 #declare Fin = box {<-1.5, 0, -(1+3/16)>, <1.5, 1/128, (1+3/16)>} #declare Base = union { box {<-1.5, 3/16, -(1+4/16)>, <1.5, 6/16, (1+4/16)>} box {<-1.75, 3/32, -(1+4/16)>, <1.75, 3/16, (1+4/16)>} box {<-1.75/2, 0, -(1+4/16)>, <1.75/2, 3/32, (1+4/16)>} } // end union base #declare Cutter = box {<0, 13/32, -1>, <0.25, 4.25, 1> rotate y*45 translate <1.3, 0, -1.1>} #declare Heatsink4 = union{ object {Base} #difference { union{ #for (F, 0, 57) object {Fin translate <0, (7/16)+(3.5/57)*F, 0>} #end } // end union #for (C, 0, 3) object {Cutter rotate y*90*C} #end } // end difference union { cylinder{<-0.75, 3/32, -(0.25+3/16)>, <-0.75, 4.125, -(0.25+3/16)>, 1/8} sphere {<-0.75, 4.125, -(0.25+3/16)>, 1/8} cylinder{<-0.75, 3/32, (0.25+3/16)>, <-0.75, 4.125, (0.25+3/16)>, 1/8 } sphere {<-0.75, 4.125, (0.25+3/16)>, 1/8 } cylinder{< 0.75, 3/32, 0>, < 0.75, 4.125, 0>, 1/8} sphere {< 0.75, 4.125, 0>, 1/8} texture {Cast_Cu} } // end union texture {Chrome_Metal} } //############################################################################################################################# //Heatsink 5 // 5.5 x 3 #declare Fin = union { box {<-2.75, 3/16, 0>, <2.75, (3/16)+1/128, 3/45>} // bottom fold box {<-2.75, (3/16)+1/128, 0>, <2.75, 1.25-(1/128), 1/128>} // main fin box {<-2.75, 1.25, 1/128>, <2.75, (1.25)-1/128, 3/45>} // top fold translate -z*1.5 texture {Chrome_Metal} } // end Fin #declare Screw = union { #difference { cylinder{<0, 1+1/16, 0>, <0, 1.25, 0>, 1/4} // Head cylinder{<0, 1+1/16, 0>, <0, 1.26, 0>, (1/4-1/32)} } // end difference cylinder{<0, 1/16, 0>, <0, 1+1/16, 0>, 1/8} // shaft cylinder{<0, -1/16, 0>, <0, 1/16, 0>, 1/16} // threads texture {Chrome_Metal} } #declare Spring = union { #declare SpringRadius = 6/32; #declare SpringLength = 11/16; #declare WireThickness = 1/16; #declare TPI = 4; isosurface { function { f_helix1(x,y,z, 1, TPI*pi*2, WireThickness, SpringRadius, 1, 1, 0) } contained_by { box { <-(SpringRadius*1.5), 0, -(SpringRadius*1.5)>, } } max_gradient 5 all_intersections texture { Chrome_Metal } no_shadow scale <1,1,-1> rotate <0,0,0> translate y*(7/32) } // end isosurface } // end union #declare Heatsink5 = union { difference { union { box {<-11/16, 0, -11/16>, <11/16, 1/16, 11/16>} box {<-11/16, -1/64, -11/16>, <11/16, 0, 11/16> texture {ThermalPaste} } box {<-5/16, 0, -5/16>, <5/16, 1/16, 5/16> translate -x*1.75} box {<-5/16, 0, -5/16>, <5/16, 1/16, 5/16> translate x*1.75} box {<-2.75, 1/16, -1.5>, <2.75, 3/16, 1.5>} //box {<-2.75, 3/64, -1.5>, <2.75, 1/16, 1.5> texture {WhiteSmudge} } #for (F, 0, 45) object {Fin translate z*((3/45)*F)} #end }// end union box {< -7/16, -0.1, -5/16>, <5/16, 4/16, 5/16> translate -x*(1.75+5/8)} // through-notch box {< -5/16, -0.1, -5/16>, <7/16, 4/16, 5/16> translate x*(1.75+5/8)} box {< -6/16, 3/16, -5/16>, <15/16, 1.26, 5/16> translate -x*(1.75+5/8)} // notch in fins box {<-15/16, 3/16, -5/16>, <6/16, 1.26, 5/16> translate x*(1.75+5/8)} box {<-(1+3/16), 1.26, -1.6>, < -3/16, (1.25)-1/127, 1.6>} box {< 3/16, 1.26, -1.6>, <1+3/16, (1.25)-1/127, 1.6>} texture {Cu2} } // end difference object {Spring translate -x*(1.75)} object {Spring translate x*(1.75)} object {Screw translate -x*(1.75)} object {Screw translate x*(1.75)} }// end union //############################################################################################################################# //2.5 x 2+3/8 // Heatsink 6 #declare Cutter1 = union { #declare CWidth = 7/128; cylinder {<0, (1/8)+CWidth, -(1+4/16)>, <0, (1/8)+CWidth, (1+4/16)>, CWidth} box {<-CWidth, (1/8)+CWidth, -(1+4/16)>, } texture {Cr} } // end union Cutter1 #declare Cutter2 = box {<-3/128, 1/8, -(1+4/16)>, <3/128, 11/15, (1+4/16)> rotate y*90 texture {Cr}} #declare Heatsink6 = difference { box {<-1.25, 0, -(1+3/16)>, <1.25, 11/16, 1+3/16>} #for (C1, 0, 8) object {Cutter1 translate x*(18/128)*C1} object {Cutter1 translate -x*(18/128)*C1} #end // end for C1 #for (C2, 0, 4) object {Cutter2 translate z*(1/4)*C2} object {Cutter2 translate -z*(1/4)*C2} #end // end for C1 texture {Al} } // end difference Heatsink6 //############################################################################################################################# // Heatsink 7 #declare Cutter1 = union { #declare CWidth = 3/64; box {<-CWidth, (1/8), -1.5>, } } // end union Cutter1 #declare Cutter2 = box {<-2.6, 1/8, -(1+3/8)+0.5-CWidth>, <2.6, 1/2, -(1+3/8)+0.5+CWidth>} #declare Hole = union { cylinder {<0, 1/8, 0>, <0, 1/2, 0> 3/32} cylinder {<0, 1/16, 0>, <0, 1/2, 0> 3/32} cylinder {<0, -1/16, 0>, <0, 1/2, 0> 1/32} } // end union Hole #declare Heatsink7 = difference { union { box {<-2.5, 0, -(1+3/8)>, <2.5, 3/8, 1+3/8>} box {<-(2+7/8), 0, 1+3/8>, <-2.5, 1/8, (1+3/8)-0.5>} cylinder {<-(2+7/8), 0, (1+3/8)-0.25>, <-(2+7/8), 1/8, (1+3/8)-0.25>, 0.25} } #for (C1, 3, 39, 2) object {Cutter1 translate x*(1/16)*C1} #end // end for C1 #for (C2, 7, 39, 2) object {Cutter1 translate -x*(1/16)*C2} #end // end for C2 #for (C3, 5, 35, 2) object {Cutter2 translate z*(1/16)*C3} #end // end for C3 object {Hole translate <-3/8, 0, 1/8>} object {Hole translate <1, 0, 11/16>} object {Hole translate <1, 0, -11/16>} object {Hole translate <-(2+7/8), 0, (1+3/8)-0.25>} // tab hole texture {pigment {Black} finish {specular 0.6} } } // end difference Heatsink7 //############################################################################################################################# // Heatsink 8 #declare Cutter1 = union { #declare CWidth = 5/64; cylinder {<0, (1/8)+CWidth, -(1+4/16)>, <0, (1/8)+CWidth, (1+4/16)>, CWidth} box {<-CWidth, (1/8)+CWidth, -(1+4/16)>, } } // end union Cutter1 #declare Cutter2 = box {<-0.8, 1/8, -(1/16)>, <0.8, 1, 1/16>} #declare Heatsink8 = difference { #declare Shift = 13/64; box {<-0.75, 0, -(1+3/16)>, <0.75, 7/8, 1+3/16>} #for (C1, 0, 3) object {Cutter1 translate x*Shift*C1} object {Cutter1 translate -x*Shift*C1} #end // end for C1 #declare Shift2 = 5/16; #for (C2, 0, 4) object {Cutter2 translate z*Shift2*C2} object {Cutter2 translate -z*Shift2*C2} #end // end for C1 texture {pigment {Black} finish {specular 0.6} } } // end difference Heatsink8 //############################################################################################################################# // Heatsink 9 // 2+3/8 + 1+5/8 #declare Mounted = false; // if mounted, arms are flat, if free, arms are sprung up 30 degrees #declare Length = 2+3/8; // x-direction #declare Width = 1+5/8; // z-direction #declare Height = 3/8; // full height #declare Base = 3/16; // base thickness after cutting #declare XSlots = 19; #declare ZSlots = 7; #declare RoundCutterZ = union { #declare X_Width = 3/64; // half width or radius cylinder {<0, Base+X_Width, -(Width/2)*1.1>, <0, Base+X_Width, (Width/2)*1.1>, X_Width} box {<-X_Width, Base+X_Width, -(Width/2)*1.1>, } } // end union RoundCutterZ #declare Z_Width = 1/64; // half width or radius #declare FlatCutterX = box {<-(Length/2)*1.1, Base, -Z_Width>, <(Length/2)*1.1, Height*1.1, Z_Width>} #declare Clip = union { #declare Wire = 1/32; #declare Curve = (Height-Base)/3; #declare ArmCenter = union { cylinder {<0, Height+Wire, -3/16>, <0, Height+Wire, 0>, Wire} // center wire object {Segment_of_Torus ( Curve, // radius major, Wire, // radius minor, 90 // segment angle (in degrees) ) // end macro rotate z*90 translate -z*3/16 translate y*(Height+Wire-Curve) } // end segment of torus Down-turn //----------------------------------------------------------------------------------------------- cylinder {<0, Base+Wire+Curve, -4/16>, <0, (Height+Wire-Curve), -4/16>, Wire} // Upright conector //----------------------------------------------------------------------------------------------- object {Segment_of_Torus ( Curve, // radius major, Wire, // radius minor, -90 // segment angle (in degrees) ) rotate -y*90 rotate z*90 translate -z*(4/16+Curve) translate y*(Base+Wire+Curve) } // end segment of torus Out-turn //----------------------------------------------------------------------------------------------- } // end union Arm center #declare ArmHalf = union { cylinder {<0, Base+Wire, -5/16>, <0, Base+Wire, -(5/16+5/8-(Curve*2))>, Wire} //----------------------------------------------------------------------------------------------- object {Segment_of_Torus ( Curve, // radius major, Wire, // radius minor, 90 // segment angle (in degrees) ) translate -z*(0.75+1/16) translate -x*Curve translate y*(Base+Wire) } // end segment of torus Side-turn //----------------------------------------------------------------------------------------------- cylinder {<-1/16, Base+Wire, -((Width/2)+1/16)>, <-(0.75+1/16), Base+Wire, -((Width/2)+1/16)>, Wire } // side arm //----------------------------------------------------------------------------------------------- object {Segment_of_Torus ( Curve, // radius major, Wire, // radius minor, 90 // segment angle (in degrees) ) rotate z*90 rotate y*90 translate -z*((Width/2)+1/16) translate -x*(0.75+1/16) translate y*(Base+Wire-Curve) } // end segment of torus // downturn to hook //----------------------------------------------------------------------------------------------- cylinder {<-((Width/2)+Curve), Base+Wire-Curve-1/8, -((Width/2)+2/32)>, <-((Width/2)+Curve), Base+Wire-Curve, -((Width/2)+2/32)>, Wire } // connection to hook //----------------------------------------------------------------------------------------------- object {Segment_of_Torus ( Curve, // radius major, Wire, // radius minor, -90 // segment angle (in degrees) ) rotate -z*90 translate -z*((Width/2)+1/16+Curve) translate -x*(0.75+1/16+Curve) translate y*(Base+Wire-Curve-1/8) } // end segment of torus // downturn into hook //----------------------------------------------------------------------------------------------- object {Segment_of_Torus ( Curve, // radius major, Wire, // radius minor, 90 // segment angle (in degrees) ) rotate -z*90 translate -z*((Width/2)+1/16+Curve) translate -x*(0.75+1/16+Curve) translate y*(Base+Wire-Curve-1/8) } // end segment of torus // upturn of hook translate -y*(Base+Wire) } // end union ArmHalf #object {ArmCenter} #object {ArmCenter rotate y*180} #declare Raise = -30; #if (Mounted) #declare Raise = 0; #end object {ArmHalf rotate z*Raise translate y*(Base+Wire) } object {ArmHalf rotate z*Raise rotate y*180 translate y*(Base+Wire) } texture {Chrome_Metal} } // end union Clip #declare Heatsink9 = union { object {Clip} difference { box {<-(Length/2), 0, -(Width/2)>, } // main block #declare XFinWidth = (Length-(XSlots*X_Width))/(XSlots); #declare ShiftX = XFinWidth+X_Width; #debug concat ("XFinWidth ", str(XFinWidth, 3, 5), " ShiftX ", str(ShiftX, 3, 5)," \n") #declare ZFinWidth = (Width-(ZSlots*Z_Width))/(ZSlots+1); #declare ShiftZ = ZFinWidth+Z_Width; #debug concat ("ZFinWidth ", str(XFinWidth, 3, 5), " ShiftZ ", str(ShiftX, 3, 5)," \n") #for (CX, 0, (XSlots-1)/2) #debug concat ("CX ", str(CX, 3, 5), " \n") object {RoundCutterZ translate x*ShiftX*CX} object {RoundCutterZ translate -x*ShiftX*CX} #end // end for C1 #for (CZ, 0, (ZSlots-1)/2) #debug concat ("CZ ", str(CZ, 3, 5), " \n") object {FlatCutterX translate z*ShiftZ*CZ} object {FlatCutterX translate -z*ShiftZ*CZ} #end // end for C1 texture {pigment {Black} finish {specular 0.6} } } // end difference Heatsink9 } // end union //############################################################################################################################# //############################################################################################################################# //box {<-10, -0.5, -5>, <20, -2.5, 20> texture {Wood scale <1, 1, 4>} } // benchtop #declare TRS = seed (345); #for (Z, -5, 20, 1.25) #for (X, -10, 10, 10) #declare TR = int (RRand (0, 3, TRS)); box {, texture {Wood normal {granite 0.6} rotate x*TR*90 scale <1+(0.3*TR), 1, 4>} } #end // end for X #end // end for Z box {<-10, -3/16+0.001, -5>, <20, -3/16+0.01, 20> texture {WhiteSmudge scale 3} no_shadow} //------------------------------------------------------------------------------------------------------------ #macro Loc (Obj, BB) #local Rad = 0.01; #local Min = min_extent (Obj); #local Max = max_extent (Obj); #debug concat ("Object extends from ", vstr(3, Min, ", ", 3, 3), " to ", vstr(3, Max, ", ", 3, 3), " \n") #if (BB) union { object {Wire_Box(Min, Max, Rad, no) texture { pigment {color rgb <0.6, 0, 0>} finish {specular 0.6} } } cylinder {Min, , Rad texture {pigment {Green*0.6} finish {specular 0.6} }} cylinder {, , Rad texture {pigment {Green*0.6} finish {specular 0.6} }} } // end union #end // end if sphere {<0, 0, 0>, 0.001 pigment {rgbt <0, 0, 0, 1>} } #end // end macro Loc //------------------------------------------------------------------------------------------------------------ #declare Boxes = no; object {Heatsink1 translate <3, 0, -1>} // cutout with cones object {Loc (Heatsink1, Boxes) translate <3, 0, -1>} object {Heatsink2 rotate -x*15 translate <10, 1, 8>} // Aztec looking with copper plug object {Loc (Heatsink2, Boxes) rotate -x*15 translate <10, 1, 8>} object {Heatsink3} // Long copper tubes with bend object {Loc (Heatsink3, Boxes)} object {Heatsink4 translate x*6 translate z*9} // tower style object {Loc (Heatsink4, Boxes) translate x*6 translate z*9} object {Heatsink5 rotate -y*30 translate z*9} // stainless steels block with copper slab object {Loc (Heatsink5, Boxes) rotate -y*30 translate z*9} object {Heatsink6 translate -x*2 translate z*2} // small square aluminum object {Loc (Heatsink6, Boxes) translate -x*2 translate z*2} object {Heatsink7 rotate -x*25 rotate y*30 translate x*15 translate z*11 translate y*0.5} // big flat black with thermocouple object {Loc (Heatsink7, Boxes) rotate -x*25 rotate y*30 translate x*15 translate z*11 translate y*0.5} object {Heatsink8 translate x*1} // small black block object {Loc (Heatsink8, Boxes) translate x*1} object {Heatsink9 translate x*9 translate z*1} // small black with mounting spring clips object {Loc (Heatsink9, Boxes) translate x*9 translate z*1} object {Heatsink5 rotate x*180 translate x*6 translate y*1.25 translate z*-4} object {Loc (Heatsink5, Boxes) rotate x*180 translate x*6 translate y*1.25 translate z*-4} //object {Heatsink3 rotate x*90 translate z*14 translate y*2.5} //cylinder {<0, -2, 0>, <0, 4, 0> 0.25 texture {Cast_Cu} translate <2.5, 0, 2>}