I share your inconsolable sadness.";
exit;
}
fwrite($fp, "
KOKOMPE Project 3D Viewer
Massachusetts Institute of Technology
KOKOMPE Spinny-Viewer
KOKOMPE Viewer
");
fclose($fp);
}
//===========================================
// BEGIN LOGIC
// (what happens when buttons pressed)
//===========================================
// SAVE TEXT BOX
switch ($do) {
case "SAVE FILE":
file_put_contents($dot_cad, $cad_savecontent);
break;
case "SAVE & RENDER":
file_put_contents($dot_cad, $cad_savecontent);
$math_string = python_to_math ($dot_cad);
file_put_contents($dot_math, $math_string);
$postfix = shell_exec("infix_to_postfix < $dot_math");
file_put_contents($dot_postfix, $postfix);
$rendres = $_POST['rendres'];
$rendlevl = $_POST['rendlevl'];
$rendboxl = $_POST['rendboxl'];
$rendboxhl = $rendboxl/2;
shell_exec("math_string_to_stl -$rendboxhl $rendboxhl -$rendboxhl $rendboxhl -$rendboxhl $rendboxhl $rendres $rendlevl < $dot_postfix > $dot_stl");
make_jnlp( $model );
break;
}
// LOAD CAD FILE INTO TEXT BOX (do always)
$cad_loadcontent = htmlspecialchars(file_get_contents($dot_cad));
?>