Wireframe and metaball Export
Previous 
   Next
  Povanim  for  Blender 
jean-michel soler 2002 - 2004
vide


 
   I
  n
  d
  e
  x


 
Wireframe and metaball export








Voir l'image agrandie.


Voir l'image agrandie

If at least one object mesh owns a material with a Wire option set.



This
following macro  is inserted in the  mesh***.inc  file :

// at least one mesh has a wire material              

#macro WireMesh (NomFichvert,NomFichedge)
        #fopen FichMesh  NomFichvert read
        #read (FichMesh,Parray1)
        #declare Vert_array=array[Parray1+1];
        #declare n=1;
        #while (n<=Parray1)
                #read (FichMesh,Pt1)
                #declare Vert_array[n]=Pt1;
                #declare n=n+1;
        #end
        #fopen Fichedge  NomFichedge read
        #read (Fichedge, Parray2)
        #declare edge_array=array[2*Parray2+1];
        #declare n=1;
        #while (n<=Parray2*2)
                #read (Fichedge,Pt2)
                #declare edge_array[n]=Pt2;
                #declare n=n+1;
        #end
       

        #declare diam=0.50;
        #declare n=1;
        blob{
        threshold 0.00
        #while (n<Parray2*2)
             #declare x0=Vert_array[edge_array[n]+1];
             #declare y0=Vert_array[edge_array[n+1]+1];
             cylinder{x0,y0, diam,1}
             #declare n=n+2;
        #end
        }
#end // end of wireMesh Macro

This  macro needs two  parameters : NomFichvert et NomFichedge .  The mesh/[nomdefichier][nomdobjet]verts.inc file  contents the vertices location data  :

5499,
< 22.71054, -4.40853, 0.91161>,
< 22.24623, 11.09121, 0.64469>,
< 6.82310, 6.79356, -0.74977>,
< 6.58303, -0.14738, -0.54449>,
< 6.38591, 3.50493, -0.26099>,
< 16.95758, 11.94714, 1.10066>,
< 16.95758, -5.32524, 1.49561>,
< 23.09218, 3.73555, 1.27481>,
< 25.42040, -2.16338, -0.60504>,
< 24.89730, 8.84973, -0.65995>,
< 19.79835, 15.31685, -0.67744>,
< 7.40987, 8.89200, -1.64642>,
< 3.72216, 5.43376, -1.67848>,
< 3.46838, 1.26848, -1.63895>,
< 7.12264, -2.86192, -1.54232>,
< 20.32602, -9.98032, -0.55046>,
< 21.86234, 12.34253, -0.91860>,
< 22.56248, -6.33990, -0.84491>,
< 4.26838, -0.56950, -1.81839>,
< 4.80485, 6.86974, -1.99991>,
...

The  mesh/[nomdefichier][nomdobjet]edge.inc  contents edge data  (two numbers which point to the mesh vertices array :

10878,
929,3524,
3524,5498,
3623,5498,
929,3623,
6,3330,
3330,5498,
6,3524,
900,3621,
3621,5498,
900,3330,
1099,3623,
1099,3621,
901,3336,
3336,5497,
3619,5497,
901,3619,
23,2950,
2950,5497,
...




Previous       Next



Blender, apprenez, pratiquez, Créez, Ed. Campus Press, coll. Starter Kit
Blender Starter Kit