//#################################################################### //## add to, or adjust 3d41.ulp //#################################################################### //----------------------- // add colors to array, povray colors //----------------------- string color_lgtp[] = {"White","Red","Green","Blue","Yellow","Gray50","Gray25","Gray10","SpringGreen","Med_Purple"};//Lichtfarbenausgabe //----------------------- // add colors to structure, user colors, language separated //----------------------- //Farbnamen laden if(opt_lang==0) { color_lgt[0] = "Weiß"; color_lgt[1] = "Rot"; color_lgt[2] = "Grün"; color_lgt[3] = "Blau"; color_lgt[4] = "Gelb"; color_lgt[5] = "Grau50"; color_lgt[6] = "Grau25"; color_lgt[7] = "Schwartz"; color_lgt[8] = "Maus_Grün"; color_lgt[9] = "Tastatur_Violett"; } else if(opt_lang==1) { color_lgt[0] = "White"; color_lgt[1] = "Red"; color_lgt[2] = "Green"; color_lgt[3] = "Blue"; color_lgt[4] = "Yellow"; color_lgt[5] = "Gray50"; color_lgt[6] = "Gray25"; color_lgt[7] = "Black"; color_lgt[8] = "Mouse_green"; color_lgt[9] = "Keyboard_purple"; } else { color_lgt[0] = "White"; color_lgt[1] = "Red"; color_lgt[2] = "Green"; color_lgt[3] = "Blue"; color_lgt[4] = "Yellow"; color_lgt[5] = "Gray50"; color_lgt[6] = "Gray25"; color_lgt[7] = "Black"; color_lgt[8] = "Mouse_green"; color_lgt[9] = "Keyboard_purple"; } //----------------------- // add test on pack_tra[21], just below the test on pack_tra[20] //----------------------- if(pack_tra[20] == "1") //Logo Dialog { ... } if(pack_tra[21] == "1") // select color { dlgDialog(lang[81]) { dlgGridLayout { dlgCell(0,0) dlgLabel("Name:"); dlgCell(0,1) dlgLabel(E.name); dlgCell(0,2) dlgLabel("Value:"); dlgCell(0,3) dlgLabel(E.value); dlgCell(1,0,1,3) dlgComboBox(color_lgt,col_inf[5]); } dlgPushButton("+OK") dlgAccept(); }; sprintf(pov_pack,"%s%s,",pov_pack,color_lgtp[col_inf[5]]); } //#################################################################### //## add to 3dusrpac.dat //#################################################################### MDIN03SS:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:1:0:0:0:0:0:0:0:0:0:CON_MDIN03SS(:Minidin 3p: MDIN04SS:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:1:0:0:0:0:0:0:0:0:0:CON_MDIN04SS(:Minidin 4p: MDIN05SS:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:1:0:0:0:0:0:0:0:0:0:CON_MDIN05SS(:Minidin 5p: MDIN06SS:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:1:0:0:0:0:0:0:0:0:0:CON_MDIN06SS(:Minidin 6p: MDIN07SS:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:1:0:0:0:0:0:0:0:0:0:CON_MDIN07SS(:Minidin 7p: MDIN08SS:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:1:0:0:0:0:0:0:0:0:0:CON_MDIN08SS(:Minidin 8p: //#################################################################### //## add to Connector.inc, just above // End of Macros //#################################################################### /******************************************************************************************************************************************************* // MDINxxSS ********************************************************************************************************************************************************/ #macro CON_MDINxxSS_GRND(col, pins) #local pcb_pin = box { <-0.25,1,-0.2><0.25, -3.8,0.2> texture{col_silver} } #local pin_hole = #union { cylinder{<0,0,0><0,0,5.0>0.35 } cone{<0,0,0>,0.7,<0,0.0,0.6>,0.0 } } union { // pcb pins #if(pins>=3) object { pcb_pin translate<-3.4,0,8.5> } object { pcb_pin translate< 3.4,0,8.5> } #end #if(pins>=4) object { pcb_pin translate<-3.4,0,11.0> } object { pcb_pin translate< 3.4,0,11.0> } #end #if(pins>=5) object { pcb_pin translate<1.3,0,8.5> } #end #if(pins>=6) object { pcb_pin translate<-1.3,0,8.5> } #end #if(pins>=7 | pins=3) object { pcb_pin translate<-0.9,0,11.0> } #end #if(pins>=8) object { pcb_pin translate<1.3,0,11.0> } #end // casing union { difference { Round_Box(<-7,0,0><7,13,12.9>,0.3,0) cylinder{<0,0,0><0,0,0.5>5.1 translate<0,6.5,-0.1>} cylinder{<0,0,0><0,0,6.0>4.6 translate<0,6.5,-0.1>} // corner gaps box{<-0.5,0,0><0,2.75,0.5> translate<7.01,4.8,-0.01>} box{<0,0,0><0.5,2.75,0.5> translate<-7.01,4.8,-0.01>} // side grooves box{<-0.2,0,0><0,13,0.3> translate<7.01,0,6.5>} box{<0,0,0><0.2,13,0.3> translate<-7.01,0,6.5>} // side gaps small prism{ 0.00, 1.75, 4 < 0.00, 0.00>, <-0.50, 0.25>, < 0.00, 1.50>, < 0.00, 0.00> translate<7.01,3,3> } prism{ 0.00, 1.75, 4 < 0.00, 0.00>, <-0.50, 0.25>, < 0.00, 1.50>, < 0.00, 0.00> translate<7.01,9,3> } prism{ 0.00, 1.75, 4 < 0.00, 0.00>, < 0.50, 0.25>, < 0.00, 1.50>, < 0.00, 0.00> translate<-7.01,3,3> } prism{ 0.00, 1.75, 4 < 0.00, 0.00>, < 0.50, 0.25>, < 0.00, 1.50>, < 0.00, 0.00> translate<-7.01,9,3> } //side gaps large prism{ 0.00, 2.25, 4 < 0.00, 0.00>, <-0.50, 1.25>, < 0.00, 1.50>, < 0.00, 0.00> translate<7.01,5.5,8.5> } prism{ 0.00, 2.25, 4 < 0.00, 0.00>, < 0.50, 1.25>, < 0.00, 1.50>, < 0.00, 0.00> translate<-7.01,5.5,8.5> } // casing color texture{col_silver} } // rounding casing hole torus { 5.1,0.5 scale <1,1,1> rotate<90,0,0> translate<0,6.5,0.5> texture{col_silver} } // left mechanical pin prism { 0.00, 0.3, 6 < -1, -1>, <-1, 2.8>, < 0, 3.8>, < 1, 2.80>, <1, -1>, <-1,-1> rotate<90,90,0> translate<-6.70,0,5.5> texture{col_silver} } // right mechanical pin prism { 0.00, 0.3, 6 < -1, -1>, <-1, 2.8>, < 0, 3.8>, < 1, 2.80>, <1, -1>, <-1,-1> rotate<90,90,0> translate<6.70,0,5.5> texture{col_silver} } // centre mechanical pin prism { 0.00, 0.3, 6 < -1.25, -1>, <-1.25, 2.8>, < 0, 3.8>, < 1.25, 2.80>, <1.25, -1>, <-1.25,-1> rotate<90,0,0> translate<0,0,4.7> texture{col_silver} } } // interior difference { cylinder{<0,6.5,0.0><0,6.5,6.0>4.0 } // gap top box{<-0.85,0,0><0.85,3.5,10> translate<0,9.5,-0.01> } // side orientation gaps box{<-2.4,0,-0.01><-6,4.83,5>} box{<2.4,0,-0.01><6,4.83,5>} // gap centre #if(pins=3) box{<-0.9,0,0><0.9,2.0,5> translate<0,3.95,-0.01> } #end #if(pins=4) box{<-1.2,0,0><1.2,1.4,5> translate<0,4.9,-0.01> } #end #if(pins=5) box{<-0.7,0,0><0.7,2.2,5> translate<0,5.6,-0.01> } #end #if(pins=6) box{<-0.7,0,0><0.7,2.2,5> translate<0,6.5,-0.01> } #end #if(pins=7) box{<-1.05,0,0><1.05,1.4,5> translate<0,5.25,-0.01> } #end // pin holes and cones #if(pins>=3) object { pin_hole translate<-2.4,5.95,-0.01> } object { pin_hole translate< 2.4,5.95,-0.01> } #end #if(pins>=4) object { pin_hole translate<-1.91,7.9,-0.01> } object { pin_hole translate< 1.91,7.9,-0.01> } #end #if(pins>=5) object { pin_hole translate<0.95,4.05,-0.01> } #end #if(pins>=6) object { pin_hole translate<-0.95,4.04,-0.01> } #end #if(pins>=7 | pins=3) object { pin_hole translate<0,7.9,-0.01> } #end #if(pins>=8) object { pin_hole translate<0.50,5.95,-0.01> } #end }pigment {col} finish {phong 0.1 phong_size 25 } } translate<0,0,0> #end #macro CON_MDIN03SS(col) object{CON_MDINxxSS_GRND(col, 3)} #end #macro CON_MDIN04SS(col) object{CON_MDINxxSS_GRND(col, 4)} #end #macro CON_MDIN05SS(col) object{CON_MDINxxSS_GRND(col, 5)} #end #macro CON_MDIN06SS(col) object{CON_MDINxxSS_GRND(col, 6)} #end #macro CON_MDIN07SS(col) object{CON_MDINxxSS_GRND(col, 7)} #end #macro CON_MDIN08SS(col) object{CON_MDINxxSS_GRND(col, 8)} #end