Convert POV file into Eagle3D .inc file
- In the new POV file that was created by the plug-in now needs to be saved as a *.inc in the same directory as Eagle3D component include files this is usually called EAgle3D\pov
- Next we need to delete all the information not needed and will cause conflicts with Eagle3D.
1: // Persistence Of Vision raytracer version 3.5 (or higher) file.
2: // Exported from Sketchup 6.4.112 (en-US) through SU2POV 3.2. by D. Bur.
3: // 04/03/2009, 16:25
4: //-------------------------------------------
5:6:7: // Pov-Ray includes
8: #include "colors.inc"
9: #include "glass.inc"
10: #include "glass_old.inc"
11: #include "metals.inc"
12: #include "woods.inc"
13: #include "stones.inc"
14: #include "skies.inc"
15: #include "stars.inc"
16: #include "finish.inc"
17: #include "rad_def.inc"
18: #include "textures.inc"
19: #include "golds.inc"
20: #include "sunpos.inc"
21: #include "math.inc"
22: #include "transforms.inc"
23: //-------------------------------------------
24:25:26: // Declare section
27: //Gamma
28: #declare GAMMA=2;29: //Default finish
30: #default { texture { finish { ambient 0.1 diffuse 0.7 brilliance 0 roughness 0.005 } } }
31: // Finishes
32: #declare Dull = finish {specular 0.5 roughness 0.2}33: #declare Shiny = finish {specular 1 roughness 0.0003}34: #declare Glossy = finish {specular 1 roughness 0.0003 reflection 0.1}35: #declare Phong_Glossy = finish {phong 10 phong_size 300 reflection 0.1}36: #declare Phong_Dull = finish {phong 0.5 phong_size 1}37: #declare Luminous = finish {ambient 0 diffuse 20}38: #declare Mirror = finish {ambient 0 diffuse 0 reflection 0.97}39: // Lights colors
40: #declare Incandescence = rgb <1, 0.9, 0.6>;41: #declare Halogen = rgb <1, 0.98, 0.85>;42: #declare Sodium = rgb <1, 0.6, 0.2>;43: #declare Neon = rgb <0.9, 0.95, 1>;44: #declare Mercury = rgb <0.92, 1, 0.92>;45:46: #declare Lightbulb = sphere {47: <0,0,0>,1.548: scale <1,1.3,1>49: texture { pigment {color rgb <1, 1, 0.5>}}50: finish { Luminous }51: }52:53: //-------------------------------------------
54:55:56: //Radiosity settings
57: global_settings {58: radiosity { Rad_Settings(Radiosity_Final, off, on) }59: assumed_gamma GAMMA60: radiosity { gray_threshold 0.8 }61: }62: //-------------------------------------------
63:64:65: // Gradient Background
66: sky_sphere {67: pigment {68: gradient y69: color_map {70: [(1-cos(radians(0)))/2 color White]71: [(1-cos(radians(50)))/2 color rgb <0.741176470588235,0.819607843137255,0.815686274509804>]72: }73: scale 174: translate -175: }76: }77: //-------------------------------------------
78:79:80: //-------------------------------------------
81:82:83: //-------------------------------------------
84:85:86: // Camera
87: camera {88: perspective89: location <2.25145468567195,1.60043897233161,-1.06394822934727>90: look_at <-0.466904134380124,-0.965594533672687,1.31022929677542>91: right <1.3333,0,0>92: up <-0.436428953203423,0.815008198675065,0.381171096619603>93: angle 63.798522525537794: }95: //-------------------------------------------
96:97:98: //------------------------------------------- - Copy and paste the following code into the very beginning of the file. replace ‘inc_MRF24J40MA’ with the name of your component, e.g. inc_YOUR_COMPONENT.
#ifndef(inc_MRF24J40MA) #declare inc_MRF24J40MA=true; #ifndef(inc_testmode) #declare inc_testmode=true; #include "tools.inc" #undef inc_testmode #end
- Now scroll down until you see the start of the object definition
1:2: // LEVEL 0 #<Sketchup::ComponentDefinition:0x3e508c0> MRF24J40MA
3: #declare MRFceJeaMA = union {4: mesh2 {5: vertex_vectors {6: 4,7: <7.000109088,4.98688000008518e-006,1.35>,8: <7.000109088,0.32000498688,1>, - insert the component macro declare statement (line2 below) into the file. The macro name needs to be the name of your component (in this case ‘MRF24J40MA’)
1: // LEVEL 0 #<Sketchup::ComponentDefinition:0x3e4f8b8> MRF24J40MA
2: #macro MRF24J40MA()3:4: #declare MRFceJeaMA = union { - Scroll to the very end of the file and delete lines 3,4 and 8 as shown below
1: //-------------------------------------------
2:3: #declare MODEL = union {4: } // End of MODEL object declare
5: //-------------------------------------------
6:7:8: object { MODEL }
9: //-------------------------------------------
10:11:12: #object {MRFceJeaMA
13: matrix < 0.1,0.0,0.0,14: 0.0,0.1,0.0,15: 0.0,0.0,0.1,16: 0.0,0.0,0.0>17: }18: //-------------------------------------------
19:20:21: //-------------------------------------------
22:23: - Finally insert all of the following to the very end of the file. Replace MR24J40MA() with your component macro name.
#end //end of macro /********************************************************************** Testing **********************************************************************/ #ifndef(inc_testmode) //Size of the Grid Plane (+/- span) #local XYZ_span=20; //Orientation axes cylinder{<-XYZ_span,0,0><XYZ_span,0,0>0.1 pigment{Blue}} //X cylinder{<0,-XYZ_span,0><0,XYZ_span,0>0.1 pigment{Red}} //Y cylinder{<0,0,-XYZ_span><0,0,XYZ_span>0.1 pigment{Yellow}} //Z // Useful GRIDS: #local XYZ_step= 1 ; // axis increment #local XYZ_cnt = 0; // loop counter #local xyz_thick = 0.05; // grid line thickness // GRID PLANES: Remove comment begin/end to activate & select PLANES: #while (XYZ_cnt <= XYZ_span) cylinder{<-XYZ_span,0,XYZ_cnt><XYZ_span,0,XYZ_cnt>xyz_thick pigment{Blue}} // Positive Z-Lines cylinder{<-XYZ_span,0,-XYZ_cnt><XYZ_span,0,-XYZ_cnt>xyz_thick pigment{Blue}} // Negative Z-Lines //cylinder{<0,XYZ_cnt,-XYZ_span><0,XYZ_cnt,XYZ_span>xyz_thick pigment{Red}} // Positive Y-Z Plane Lines //cylinder{<0,-XYZ_cnt,-XYZ_span><0,-XYZ_cnt,XYZ_span>xyz_thick pigment{Red}} // Negative Y-Z Plane Lines //cylinder{<-XYZ_span,XYZ_cnt,0><XYZ_span,XYZ_cnt,0>xyz_thick pigment{Red}} // Positive Y-X Plane Lines //cylinder{<-XYZ_span,-XYZ_cnt,0><XYZ_span,-XYZ_cnt,0>xyz_thick pigment{Red}} // Negative Y-X Plane Lines cylinder{<XYZ_cnt,0,-XYZ_span><XYZ_cnt,0,XYZ_span>xyz_thick pigment{Yellow}} // Positive X-Lines cylinder{<-XYZ_cnt,0,-XYZ_span><-XYZ_cnt,0,XYZ_span>xyz_thick pigment{Yellow}} // Negative X-Lines #local XYZ_cnt = XYZ_cnt+XYZ_step; #end camera { #local tt = 40; //let's you change the distance easily location <-tt,tt,-tt> //location<0,5,-50> //alternate location look_at <0,0,0> //best to select the approximate centre of the object angle 30 } light_source { <100, 100, -100> White} light_source { <-100, 100, -100> White } light_source { <-100, 100, 100> White } light_source { <100, 100, 100> White } //light_source { <-tt,tt,-tt> White } //light_source { <-tt,tt,-tt> White } //light_source { <-tt,tt,-tt> White } background{Grey} MRF24J40MA() #end #end //End of Macros
- Now test the inc file by rendering the component. This will test to make sure the macro and file are all working. A grid and the actual component will now be rendered.

- UPDATE: You also need to copy any surface map graphic files across to the same directory as the new component file.
If you have successfully converted the file we next need to add it to Eagle3D
| <<Step 1 | Step 3 >> |