1 / 19

eagle3d and povray

Creating your own 3D PCB using PovRay and Eagle3D

zhenning
Télécharger la présentation

eagle3d and povray

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Eagle 3D And POV ray

  2. Create a POV-Ray file • EAGLE -> ULP -> Eagle3d -> 3d50.ulp

  3. 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"

  4. Click file.pov -> Run

  5. Add a line in 3dusrpac.dat • Replace EAGLEPACKAGE with DIODE_LED_DOUBLE_7SEG using existing package “HDSP-R”. • Now the line should read :

  6. Add your macro in user.inc • Open the file povray/user.inc and add these lines just before the last #end :

  7. 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

  8. 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) :

  9. Adding new parts result

  10. Adding Animation • Display -> New Layer -> 230 , Eagle3DAnimation • Add at least 3 control point, V1, V2, and V3 • Add at least another 3 animation points

  11. Additional modification • #declare global_anim = off; • #local global_anim_showcampath = no; • #declare global_anim = on; • #local global_anim_showcampath = off;

  12. Open generated file folder • Render.pov • Render.ini • Render.ini generated

  13. To make things smoother • Change • Cyclic_Animation=on • Add the following the the .ini file • Antialias= on • Antialias_Threshold = 0.1 • Antialias_Depth = 2

  14. Linking .INI with .pov • INI -> Name -> browse -> render.ini

  15. animation result

  16. ENd • Reference: • www.societyofrobots.com/electronics_Eagle3D_tutorial.shtml • felixchenier.com/doku.php?id=pcb:eagle3dnewpart

  17. 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

More Related