Commit 730a9ff2 authored by amandaghassaei's avatar amandaghassaei
Browse files

eod

parent cd66d0ea
......@@ -30,7 +30,6 @@ define([], function(){
altColor: "#8a2be2",
properties:{
conductive: false,
silicon: false,
density: 3500,//kg/m^3
longitudalK:{x:80,y:80,z:80},
shearK:{xy:80,xz:80,yx:80,yz:80,zx:80,zy:80},
......@@ -46,7 +45,6 @@ define([], function(){
mesh: "bending1dof",
properties:{
conductive: false,
silicon: false,
density: 3500,//kg/m^3
longitudalK:{x:80,y:80,z:80},
shearK:{xy:80,xz:80,yx:80,yz:80,zx:80,zy:80},
......@@ -62,7 +60,6 @@ define([], function(){
mesh: "bending2dof",
properties:{
conductive: false,
silicon: false,
density: 3500,//kg/m^3
longitudalK:{x:80,y:80,z:80},
shearK:{xy:80,xz:80,yx:80,yz:80,zx:80,zy:80},
......@@ -78,7 +75,6 @@ define([], function(){
mesh: "torsion1dof",
properties:{
conductive: false,
silicon: false,
density: 3500,//kg/m^3
longitudalK:{x:80,y:80,z:80},
shearK:{xy:80,xz:80,yx:80,yz:80,zx:80,zy:80},
......@@ -93,7 +89,6 @@ define([], function(){
texture: "cubeTextureShearFlex",
properties:{
conductive: false,
silicon: false,
density: 3500,//kg/m^3
longitudalK:{x:80,y:80,z:80},
shearK:{xy:80,xz:80,yx:80,yz:80,zx:2,zy:80},
......@@ -108,7 +103,6 @@ define([], function(){
texture: "stripes",
properties:{
conductive: false,
silicon: false,
density: 3500,//kg/m^3
longitudalK:{x:10,y:10,z:10},
shearK:{xy:10,xz:10,yx:10,yz:10,zx:10,zy:10},
......@@ -123,12 +117,11 @@ define([], function(){
mesh: "wireStraight",
properties:{
conductive: true,
silicon: false,
conductiveAxes: [
{x:0, y:0, z:1},
{x:0, y:0, z:-1}
],
density: 8500,//kg/m^3
density: 3500,//kg/m^3
longitudalK:{x:80,y:80,z:80},
shearK:{xy:80,xz:80,yx:80,yz:80,zx:80,zy:80},
bendingK:{x:80,y:80,z:80},
......@@ -142,12 +135,11 @@ define([], function(){
mesh: "wireBent",
properties:{
conductive: true,
silicon: false,
conductiveAxes: [
{x:1, y:0, z:0},
{x:0, y:0, z:-1}
],
density: 8500,//kg/m^3
density: 3500,//kg/m^3
longitudalK:{x:80,y:80,z:80},
shearK:{xy:80,xz:80,yx:80,yz:80,zx:80,zy:80},
bendingK:{x:80,y:80,z:80},
......@@ -161,13 +153,12 @@ define([], function(){
mesh: "wireJunction1",
properties:{
conductive: true,
silicon: false,
conductiveAxes: [
{x:1, y:0, z:0},
{x:-1, y:0, z:0},
{x:0, y:0, z:-1}
],
density: 8500,//kg/m^3
density: 3500,//kg/m^3
longitudalK:{x:80,y:80,z:80},
shearK:{xy:80,xz:80,yx:80,yz:80,zx:80,zy:80},
bendingK:{x:80,y:80,z:80},
......@@ -181,13 +172,12 @@ define([], function(){
mesh: "wireJunction2",
properties:{
conductive: true,
silicon: false,
conductiveAxes: [
{x:1, y:0, z:0},
{x:0, y:1, z:0},
{x:0, y:0, z:-1}
],
density: 8500,//kg/m^3
density: 3500,//kg/m^3
longitudalK:{x:80,y:80,z:80},
shearK:{xy:80,xz:80,yx:80,yz:80,zx:80,zy:80},
bendingK:{x:80,y:80,z:80},
......@@ -202,7 +192,6 @@ define([], function(){
mesh: "wireStraight",
properties:{
conductive: true,
silicon: false,
conductiveAxes: [
{x:0, y:0, z:1},
{x:0, y:0, z:-1}
......@@ -222,7 +211,6 @@ define([], function(){
mesh: "wireBent",
properties:{
conductive: true,
silicon: false,
conductiveAxes: [
{x:1, y:0, z:0},
{x:0, y:0, z:-1}
......@@ -242,17 +230,16 @@ define([], function(){
mesh: "wireJunction1",
properties:{
conductive: true,
silicon: false,
conductiveAxes: [
{x:1, y:0, z:0},
{x:-1, y:0, z:0},
{x:0, y:0, z:-1}
],
density: 8500,//kg/m^3
longitudalK:{x:80,y:80,z:80},
shearK:{xy:80,xz:80,yx:80,yz:80,zx:80,zy:80},
bendingK:{x:80,y:80,z:80},
torsionK:{x:80,y:80,z:80}
density: 3500,//kg/m^3
longitudalK:{x:30,y:30,z:30},
shearK:{xy:30,xz:30,yx:30,yz:30,zx:30,zy:30},
bendingK:{x:30,y:30,z:30},
torsionK:{x:30,y:30,z:30}
}
},
flexureCondJunction2:{
......@@ -263,17 +250,16 @@ define([], function(){
mesh: "wireJunction2",
properties:{
conductive: true,
silicon: false,
conductiveAxes: [
{x:1, y:0, z:0},
{x:0, y:1, z:0},
{x:0, y:0, z:-1}
],
density: 8500,//kg/m^3
longitudalK:{x:80,y:80,z:80},
shearK:{xy:80,xz:80,yx:80,yz:80,zx:80,zy:80},
bendingK:{x:80,y:80,z:80},
torsionK:{x:80,y:80,z:80}
density: 3500,//kg/m^3
longitudalK:{x:30,y:30,z:30},
shearK:{xy:30,xz:30,yx:30,yz:30,zx:30,zy:30},
bendingK:{x:30,y:30,z:30},
torsionK:{x:30,y:30,z:30}
}
},
actuatorLinear1DOF: {
......@@ -283,8 +269,12 @@ define([], function(){
texture: "cubeTexture",
properties:{
conductive: false,
silicon: false,
density: 6500,//kg/m^3
actuator: true,
conductiveAxes: [
{x:1, y:0, z:0},
{x:-1, y:0, z:0}
],
density: 3500,//kg/m^3
longitudalK:{x:80,y:80,z:80},
shearK:{xy:80,xz:80,yx:80,yz:80,zx:80,zy:80},
bendingK:{x:80,y:80,z:80},
......@@ -298,8 +288,12 @@ define([], function(){
mesh: "bending1dof",
properties:{
conductive: false,
silicon: false,
density: 6500,//kg/m^3
actuator: true,
conductiveAxes: [
{x:1, y:0, z:0},
{x:-1, y:0, z:0}
],
density: 3500,//kg/m^3
longitudalK:{x:80,y:80,z:80},
shearK:{xy:80,xz:80,yx:80,yz:80,zx:80,zy:80},
bendingK:{x:80,y:80,z:80},
......@@ -313,8 +307,12 @@ define([], function(){
mesh: "torsion1dof",
properties:{
conductive: false,
silicon: false,
density: 6500,//kg/m^3
actuator: true,
conductiveAxes: [
{x:0, y:0, z:1},
{x:0, y:0, z:-1}
],
density: 3500,//kg/m^3
longitudalK:{x:80,y:80,z:80},
shearK:{xy:80,xz:80,yx:80,yz:80,zx:80,zy:80},
bendingK:{x:80,y:80,z:80},
......@@ -328,8 +326,12 @@ define([], function(){
texture: "cubeTextureShear",
properties:{
conductive: false,
silicon: false,
density: 6500,//kg/m^3
actuator: true,
conductiveAxes: [
{x:0, y:0, z:1},
{x:0, y:0, z:-1}
],
density: 3500,//kg/m^3
longitudalK:{x:80,y:80,z:80},
shearK:{xy:80,xz:80,yx:80,yz:80,zx:80,zy:80},
bendingK:{x:80,y:80,z:80},
......@@ -348,7 +350,7 @@ define([], function(){
{x:1, y:0, z:0},
{x:-1, y:0, z:0}
],
density: 6500,//kg/m^3
density: 3500,//kg/m^3
longitudalK:{x:80,y:80,z:80},
shearK:{xy:80,xz:80,yx:80,yz:80,zx:80,zy:80},
bendingK:{x:80,y:80,z:80},
......
......@@ -159,7 +159,7 @@ define(["underscore", "cell", "lattice", "plist", "three"],
};
DMACell.prototype.isAcutator = function(){
return this.getMaterialID() == "actuator";
return this.getMaterial().properties.actuator;
};
DMACell.prototype.isSignalGenerator = function(){
......@@ -252,18 +252,20 @@ define(["underscore", "cell", "lattice", "plist", "three"],
var axes = this.getMaterial().properties.conductiveAxes;
if (!neighborAxes || !axes) return false;
var offset = neighbor.getIndex().sub(this.getIndex());
var canConnect = false;
var self = this;
_.each(neighborAxes, function(neighborAxis){
var neighborVector = new THREE.Vector3(neighborAxis.x, neighborAxis.y, neighborAxis.z);
neighborVector.applyQuaternion(neighbor.getOrientation());
_.each(axes, function(axis, index){
var vector = new THREE.Vector3(axis.x, axis.y, axis.z);
vector.applyQuaternion(self.getOrientation());
if (vector.dot(neighborVector) < -0.9) {
canConnect = true;
}
});
if (offset.clone().dot(neighborVector) < -0.9) {
_.each(axes, function (axis) {
var vector = new THREE.Vector3(axis.x, axis.y, axis.z);
vector.applyQuaternion(self.getOrientation());
if (vector.dot(neighborVector) < -0.9) canConnect = true;
});
}
});
return canConnect;
};
......
This diff is collapsed.
......@@ -18,6 +18,15 @@ define(['underscore'], function(_){
return this.signals.length > 1;
};
EMWire.prototype.setPolarity = function(polarity){
this.polarity = polarity;
};
EMWire.prototype.getPolarity = function(){
if (this.polarity != 0 && this.polarity != 1) console.warn("invalid polarity");
return this.polarity;
};
EMWire.prototype.getSignal = function(){
return this.signals[0];
};
......
Markdown is supported
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