eagle3d and povray
E N D
Presentation Transcript
Create a POV-Ray file • EAGLE -> ULP -> Eagle3d -> 3d50.ulp
Adding Lib Directory to POV ray • POV-Ray -> Open -> POV-Ray.ini file. • Add the following line to the base of the file:Library_Path="C:\Program Files\Eagle3D\ulp\Eagle3D\povray"
Add a line in 3dusrpac.dat • Replace EAGLEPACKAGE with DIODE_LED_DOUBLE_7SEG using existing package “HDSP-R”. • Now the line should read :
Add your macro in user.inc • Open the file povray/user.inc and add these lines just before the last #end :
Code your macro • Eagle and Povray coordinates • Here is the code to draw a double 7-segments display : • #macro DIODE_LED_DOUBLE_7SEG(value) • //First, we make a leg. We will use this object many times, so we define it once here as a local definition. #local leg = object{ cylinder {<0,-3,0>,<0,1,0>,0.25 texture{col_silver}}} //Then we make a corner (the corners support the part) #local corner = object{ box {<0,0,0><2.5,1,2.5> pigment{White}}} union{ //Now, we put all legs in place object{ leg translate<-10.16,0,7.935>} object{ leg translate< -7.62,0,7.935>} object{ leg translate< -5.08,0,7.935>} object{ leg translate< -2.54,0,7.935>} object{ leg translate< 0,0,7.935>} object{ leg translate< 2.54,0,7.935>} object{ leg translate< 5.08,0,7.935>} object{ leg translate< 7.62,0,7.935>} object{ leg translate< 10.16,0,7.935>} object{ leg translate<-10.16,0,-7.935>} object{ leg translate< -7.62,0,-7.935>} object{ leg translate< -5.08,0,-7.935>} object{ leg translate< -2.54,0,-7.935>} object{ leg translate< 0,0,-7.935>} object{ leg translate< 2.54,0,-7.935>} object{ leg translate< 5.08,0,-7.935>} object{ leg translate< 7.62,0,-7.935>} object{ leg translate< 10.16,0,-7.935>} //Then we make the box box {<-12.5,1,-9.5>,<12.5,8,9.5> pigment{White}} //We put the four corners in place object{ corner translate<-12.5,0,-9.5>} object{ corner rotate<0,90,0> translate<-12.5,0,9.5>} object{ corner rotate<0,180,0> translate<12.5,0,9.5>} object{ corner rotate<0,270,0> translate<12.5,0,-9.5>} //Finally we put the top, that will include the 7-segments image. box {<-12.5,8,-9.5>,<12.5,8.1,9.5> pigment{image_map{"tex_double_7seg.png" once} rotate<90,0,0> scale<25,0,19> //Since we built it from the lower front left corner, we translate all the object to put the center at <0,0,0> translate<-12.5,0,-9.5>}} } #end
To use this macro, you will need this texture (named tex_double_7seg.png) in your povray directory : • Here's the final result, on a board I made (click on the image to get full size) :
Adding Animation • Display -> New Layer -> 230 , Eagle3DAnimation • Add at least 3 control point, V1, V2, and V3 • Add at least another 3 animation points
Additional modification • #declare global_anim = off; • #local global_anim_showcampath = no; • #declare global_anim = on; • #local global_anim_showcampath = off;
Open generated file folder • Render.pov • Render.ini • Render.ini generated
To make things smoother • Change • Cyclic_Animation=on • Add the following the the .ini file • Antialias= on • Antialias_Threshold = 0.1 • Antialias_Depth = 2
Linking .INI with .pov • INI -> Name -> browse -> render.ini
ENd • Reference: • www.societyofrobots.com/electronics_Eagle3D_tutorial.shtml • felixchenier.com/doku.php?id=pcb:eagle3dnewpart
Settings.ini • ; Change the following lines in the file. Pov: • , # Declare_global_anim = on; • ; # Local global_anim_showcampath = off; • Antialias = on • Antialias_Threshold = 0.1 • Antialias_Depth = 2 • , Set the height and width for images (as nuetra criterion), for example: • Height = 480 • Width = 640 • ; Image File Format • Output_File_Type = N • , N to PNG • , S for system file formats (Windows BMP, Mac PICT ...) • ; C Targa (RLE) compressed • ; T uncompressed Targa • , P for Unix PPM • ; File. Pov home • ;Input_File_Name = c: \ program files \ Eagle3D \ imgpov \ miejemp • ; File destination. The extension is determined by Output_File_Type • ;Output_file_name = c: \ program files \ Eagle3D \ animations \ miejemp • ; Frame Home • Initial_Frame = 1 • ; Final frame - to determine the desired number • Final_Frame = 60 • ; The clock starts with zero initial value • Initial_Clock = 0 • ; The clock ends with a value of 1 • Final_Clock = 1 • ; Animation cyclic • Cyclic_Animation = off • ; Pause when completed