Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AMOEBA
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Amanda Ghassaei
AMOEBA
Commits
730a9ff2
Commit
730a9ff2
authored
Jul 11, 2016
by
amandaghassaei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eod
parent
cd66d0ea
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
184 additions
and
157 deletions
+184
-157
js/plists/MaterialsPlist.js
js/plists/MaterialsPlist.js
+39
-37
js/simulation/function/EM/emSimCell.js
js/simulation/function/EM/emSimCell.js
+10
-8
js/simulation/function/EM/emSimLattice.js
js/simulation/function/EM/emSimLattice.js
+126
-112
js/simulation/function/EM/emWire.js
js/simulation/function/EM/emWire.js
+9
-0
No files found.
js/plists/MaterialsPlist.js
View file @
730a9ff2
...
...
@@ -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
:
8
500
,
//kg/m^3
density
:
3
500
,
//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
:
8
500
,
//kg/m^3
density
:
3
500
,
//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
:
8
500
,
//kg/m^3
density
:
3
500
,
//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
:
8
500
,
//kg/m^3
density
:
3
500
,
//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
:
8
500
,
//kg/m^3
longitudalK
:{
x
:
80
,
y
:
80
,
z
:
8
0
},
shearK
:{
xy
:
80
,
xz
:
80
,
yx
:
80
,
yz
:
80
,
zx
:
80
,
zy
:
8
0
},
bendingK
:{
x
:
80
,
y
:
80
,
z
:
8
0
},
torsionK
:{
x
:
80
,
y
:
80
,
z
:
8
0
}
density
:
3
500
,
//kg/m^3
longitudalK
:{
x
:
30
,
y
:
30
,
z
:
3
0
},
shearK
:{
xy
:
30
,
xz
:
30
,
yx
:
30
,
yz
:
30
,
zx
:
30
,
zy
:
3
0
},
bendingK
:{
x
:
30
,
y
:
30
,
z
:
3
0
},
torsionK
:{
x
:
30
,
y
:
30
,
z
:
3
0
}
}
},
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
:
8
500
,
//kg/m^3
longitudalK
:{
x
:
80
,
y
:
80
,
z
:
8
0
},
shearK
:{
xy
:
80
,
xz
:
80
,
yx
:
80
,
yz
:
80
,
zx
:
80
,
zy
:
8
0
},
bendingK
:{
x
:
80
,
y
:
80
,
z
:
8
0
},
torsionK
:{
x
:
80
,
y
:
80
,
z
:
8
0
}
density
:
3
500
,
//kg/m^3
longitudalK
:{
x
:
30
,
y
:
30
,
z
:
3
0
},
shearK
:{
xy
:
30
,
xz
:
30
,
yx
:
30
,
yz
:
30
,
zx
:
30
,
zy
:
3
0
},
bendingK
:{
x
:
30
,
y
:
30
,
z
:
3
0
},
torsionK
:{
x
:
30
,
y
:
30
,
z
:
3
0
}
}
},
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
:
6
500
,
//kg/m^3
density
:
3
500
,
//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
},
...
...
js/simulation/function/EM/emSimCell.js
View file @
730a9ff2
...
...
@@ -159,7 +159,7 @@ define(["underscore", "cell", "lattice", "plist", "three"],
};
DMACell
.
prototype
.
isAcutator
=
function
(){
return
this
.
getMaterial
ID
()
==
"
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
;
};
...
...
js/simulation/function/EM/emSimLattice.js
View file @
730a9ff2
This diff is collapsed.
Click to expand it.
js/simulation/function/EM/emWire.js
View file @
730a9ff2
...
...
@@ -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
];
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment