Commit e2e80b96 authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

new stls

parent 486546e5
No preview for this file type
......@@ -60,6 +60,7 @@ define(['underscore', 'appState', 'lattice', 'stlLoader', 'threeModel', 'cam', '
function geometryPreProcess(geometry){//todo do this better
if(geometry === undefined || (geometry.vertices && geometry.vertices.length == 0)) return null;
console.log(json.translation);
if (json.translation) geometry.applyMatrix(new THREE.Matrix4().makeTranslation(json.translation.x, json.translation.y, json.translation.z));
if (json.rotation) {
if (json.rotation.x) geometry.applyMatrix(new THREE.Matrix4().makeRotationX(json.rotation.x));
......@@ -68,7 +69,7 @@ define(['underscore', 'appState', 'lattice', 'stlLoader', 'threeModel', 'cam', '
}
if (json.scale) geometry.applyMatrix(new THREE.Matrix4().makeScale(json.scale, json.scale, json.scale));
geometry.applyMatrix(new THREE.Matrix4().makeTranslation(-21, -0.63, -1.28));//todo get rid of these
// geometry.applyMatrix(new THREE.Matrix4().makeTranslation(-21, -0.63, -1.28));//todo get rid of these
// geometry.applyMatrix(new THREE.Matrix4().makeTranslation(-4, -4.5, 0));
......
......@@ -85,6 +85,7 @@ define(['jquery', 'underscore', 'plist', 'backbone', 'lattice', 'appState', 'tex
var $target = $(e.target);
var newVal = parseFloat($target.val());
if (isNaN(newVal)) {
if (newVal == "") return;
console.warn("value is not float");
return;
}
......@@ -97,6 +98,7 @@ define(['jquery', 'underscore', 'plist', 'backbone', 'lattice', 'appState', 'tex
var $target = $(e.target);
var newVal = parseInt($target.val());
if (isNaN(newVal)) {
if (newVal == "") return;
console.warn("value is NaN");
return;
}
......
......@@ -34,9 +34,9 @@ define(['three'], function(THREE){
relative: false,
camProcesses: ["gcode"],
numMaterials: 2,
translation: {x:-4.0757,y: -4.3432,z: -6.2154},
translation: {x:11.43,y:-61.93,z:-5.06},
rotation: {x:Math.PI/2,y:0,z:0},//Math.PI/2
scale: 20,
scale: 0.7874,
components: {
xAxis: {
name: "X Axis",
......@@ -89,7 +89,7 @@ define(['three'], function(THREE){
substrate: {
name: "Substrate",
rotary: true,
centerOfRotation: {x:4,y:4.5,z:0},//(5.08mm, 5.715mm)
centerOfRotation: {x:9,y:10.5,z:0},//(5.08mm, 5.715mm)
//minBound
//maxBound
parent: null,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment