Modifications

Aller à : navigation, rechercher

Movie2Gcode

1 029 octets ajoutés, 11 mai 2014 à 14:10
vectorisation
le reste des transformations se réalisent en boucle pour chaque image
 
===boucle de traitement===
 
 
===vectorisation===
<code lang=bash>function demon(){ echo "traitement de toutes les images image-$1*.bmp"; for i in image-$1*.bmp; do   if [ -f ${i} ] then echo "_________________________________________________________${i}"; potrace -o ${i%bmp}eps -k 0.6 -t 50 -B-0.25 -e ${i}; #potrace -o ${i%bmp}eps -k 0.43 --tight -M -0.41 -e ${i}; pstoedit -dt -f dxf:-polyaslines ${i%bmp}eps ${i%bmp}dxf; rm ${i%bmp}eps #ecrit le fichier openscad echo "intersection(){translate([-4,0,-5])cube([96,63,10]);scale([15,15,1])linear_extrude(height = 0.15, center = false, convexity = 10) import (file = \"${i%bmp}dxf\");}translate([-4,0,0])cube(0.05);translate([91.95,62.95,0])cube([0.05,0.05,0.14]);" > ${i%bmp}scad; echo "calcul du ${i%bmp}STL"; /home/cedric/soft/openscad/openscad -o ../stl/${i%bmp}stl ${i%bmp}scad; rm ${i%bmp}scad; rm ${i%bmp}dxf; echo "_______________________________________${i%bmp}STL ok"; else echo ${i} existe -----------------pas; fi done }</code>
0
6 691
modifications

Menu de navigation