<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -290,11 +290,8 @@ end
 
 
 parts.each do |part|
-part = `git rev-parse HEAD`+part	
-`rm -f ./#{part}.rt `
-`rm -f ./#{part}.rt.pix `
-`rm -f ./#{part}.rt.log`
-`rm -f ./#{part}.png`
+
+part_with_git_hash = &quot;#{`git rev-parse HEAD`.chomp}_#{part}&quot;	#give the STL output a uniq ID based on git repo hash
 
 
 `cat &lt;&lt;EOF | mged -c #{DB}
@@ -302,18 +299,20 @@ B #{part}
 ae 135 -35 180
 set perspective 20
 zoom .30
-saveview #{part}.rt
+saveview ./temp/#{part}.rt
 EOF`
 	
-`./#{part}.rt -s1024`
-`pix-png -s1024 &lt; #{part}.rt.pix &gt; #{part}.png` #generate a png from the rt file
-`open ./#{part}.png` # open the png in preview.app
+`./temp/#{part}.rt -s1024`
+`mv #{part}.rt.pix ./temp/#{part}.rt.pix`
+`pix-png -s1024 &lt; ./temp/#{part}.rt.pix &gt; ./temp/#{part_with_git_hash}.png` #generate a png from the rt file
+`open ./temp/#{part_with_git_hash}.png` # open the png in preview.app
+
 
 # `g-stl -a 0.005 -D 0.005 -o #{part}.stl #{DB} #{part}` #this outputs the stl file for the part
 # `g-stl -a 0.01 -D 0.01 -o #{part}.stl #{DB} #{part}` #this outputs the stl file for the part
 # `g-stl -a #{tolerance_distance} -D #{tolerance_distance} -o #{part}.stl #{DB} #{part}` #this outputs the stl file for the part
 
-`g-stl -a #{tolerance_distance} -D #{tolerance_distance} -o #{part}.stl #{DB} #{part}` #this outputs the stl file for the part
+`g-stl -a #{tolerance_distance} -D #{tolerance_distance} -o ./parts/#{part_with_git_hash}.stl #{DB} #{part}` #this outputs the stl file for the part
 
 # `g-stl -o #{part}.stl #{DB} #{part}` #this outputs the stl file for the part
 </diff>
      <filename>mged_controller.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>cd689cdc1e5df505769df40b75771f2944a3fadc</id>
    </parent>
  </parents>
  <author>
    <name>mark</name>
    <email>mark@criticalmetrics.com</email>
  </author>
  <url>http://github.com/famulus/decawell/commit/9e48f8e9d712e1f7d1ef64c813484bfed618ba0e</url>
  <id>9e48f8e9d712e1f7d1ef64c813484bfed618ba0e</id>
  <committed-date>2009-08-22T10:45:09-07:00</committed-date>
  <authored-date>2009-08-22T10:45:09-07:00</authored-date>
  <message>moved temp files into temp directory</message>
  <tree>5804641e510d2b2dc6c4ddb78e6aad0c832138ba</tree>
  <committer>
    <name>mark</name>
    <email>mark@criticalmetrics.com</email>
  </committer>
</commit>
