Index: kmz_2_tri.php
===================================================================
--- kmz_2_tri.php	(revision 1110)
+++ kmz_2_tri.php	(revision 1111)
@@ -28,7 +28,7 @@
 
 if (empty($force_scale))
     $force_scale=1;
-$force_scale = $force_scale *0.0254; //Sketcup output data in inches, working with meters
+//$force_scale = $force_scale *0.0254; //Sketcup output data in inches, working with meters
 if (empty($verbose))
     $verbose=0;
 
@@ -38,7 +38,9 @@
     die("kmz_2_tri: ERROR: File '$file_name' not found.");
     }
 
-dprint(0,"kmz_2_tri: Converting: ".$file_name);
+dprint(0,"kmz_2_tri: Converting: ".$file_name);
+if ($force_face)
+    dprint(0,"kmz_2_tri: Forcing single face creation.");
 
 $dest_path=dirname($file_name);
 
@@ -62,7 +64,16 @@
     echo "kmz_2_tri: Sorry script can't go further as is.\n";
     $file_name="";
     die(-1);
-    }
+    }
+$units=$dom->getElementsByTagName("unit");
+if ($units->length>=1)
+    {
+    $unit=$units->item(0);
+    $scale = $unit->getAttribute("meter");
+    $force_scale = $force_scale * $scale;
+    echo "Found unit ".$scale." using ".$force_scale." scale factor";
+    }
+
 $out_file=$dest_path."/".filename($file_name).".tri";
 dprint(0,"kmz_2_tri: Output file: ".$out_file);
 $ftri=fopen($out_file,"w");
@@ -131,17 +142,21 @@
 function export_mesh($mesh,$matrix,$from_node)
     {
     global $vxyz,$vxyz_offset,$vnxyz,$vnxyz_offset,$uv_array,$uv_offset,$has_uv;
-    global $faces_indexes,$interleave;
+    global $faces_indexes,$interleave;
+    global $force_face;
     $nverts=0;
     $triangles=find("triangles",$mesh);
 	$skip=0;
     foreach($triangles as $triangle)
-        {
-//    	if ($skip)
-//    		{
-//    		$skip=0;
-//    		continue;
-//    		}
+        {
+        if ($force_face)
+            if ($skip)
+                {
+                $skip=0;
+                //dprint(0,"Skipping faces");
+                continue;
+                }
+                
         $texture = texture($triangle,$from_node);
         $input_vectors=find("input",$triangle);
         $interleave=interleave($input_vectors);
@@ -756,4 +771,4 @@
         }
     return TRUE;
     }
-?>
\ No newline at end of file
+?>