Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Amanda Ghassaei
AMOEBA
Commits
4055d44a
Commit
4055d44a
authored
May 27, 2016
by
amandaghassaei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only two electrical connections per voxel
parent
73a5e11c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
98 additions
and
2 deletions
+98
-2
js/materials/DMAMaterial.js
js/materials/DMAMaterial.js
+69
-0
js/plists/MaterialsPlist.js
js/plists/MaterialsPlist.js
+29
-2
No files found.
js/materials/DMAMaterial.js
View file @
4055d44a
...
...
@@ -100,12 +100,79 @@ define(['underscore', 'appState', 'three'], function(_, appState, THREE){
new
THREE
.
Face3
(
5
,
8
,
7
)
];
var
wireStraight
=
new
THREE
.
Geometry
();
// //box vertices
wireStraight
.
vertices
=
[
new
THREE
.
Vector3
(
0.3
,
0.3
,
0.5
),
new
THREE
.
Vector3
(
0.3
,
0.3
,
-
0.5
),
new
THREE
.
Vector3
(
0.3
,
-
0.3
,
0.5
),
new
THREE
.
Vector3
(
0.3
,
-
0.3
,
-
0.5
),
new
THREE
.
Vector3
(
-
0.3
,
0.3
,
0.5
),
new
THREE
.
Vector3
(
-
0.3
,
0.3
,
-
0.5
),
new
THREE
.
Vector3
(
-
0.3
,
-
0.3
,
0.5
),
new
THREE
.
Vector3
(
-
0.3
,
-
0.3
,
-
0.5
)
];
//box
wireStraight
.
faces
=
[
new
THREE
.
Face3
(
1
,
0
,
2
),
new
THREE
.
Face3
(
1
,
2
,
3
),
new
THREE
.
Face3
(
4
,
5
,
6
),
new
THREE
.
Face3
(
6
,
5
,
7
),
new
THREE
.
Face3
(
3
,
2
,
6
),
new
THREE
.
Face3
(
3
,
6
,
7
),
new
THREE
.
Face3
(
0
,
1
,
4
),
new
THREE
.
Face3
(
4
,
1
,
5
),
new
THREE
.
Face3
(
2
,
0
,
4
),
new
THREE
.
Face3
(
2
,
4
,
6
),
new
THREE
.
Face3
(
1
,
3
,
5
),
new
THREE
.
Face3
(
5
,
3
,
7
)
];
var
wireBent
=
new
THREE
.
Geometry
();
// //box vertices
wireBent
.
vertices
=
[
new
THREE
.
Vector3
(
0.5
,
0.3
,
-
0.3
),
new
THREE
.
Vector3
(
0.3
,
0.3
,
-
0.5
),
new
THREE
.
Vector3
(
0.5
,
-
0.3
,
-
0.3
),
new
THREE
.
Vector3
(
0.3
,
-
0.3
,
-
0.5
),
new
THREE
.
Vector3
(
-
0.3
,
0.3
,
0.3
),
new
THREE
.
Vector3
(
-
0.3
,
0.3
,
-
0.5
),
new
THREE
.
Vector3
(
-
0.3
,
-
0.3
,
0.3
),
new
THREE
.
Vector3
(
-
0.3
,
-
0.3
,
-
0.5
),
new
THREE
.
Vector3
(
0.5
,
0.3
,
0.3
),
new
THREE
.
Vector3
(
0.5
,
-
0.3
,
0.3
)
];
//box
wireBent
.
faces
=
[
new
THREE
.
Face3
(
1
,
0
,
2
),
new
THREE
.
Face3
(
1
,
2
,
3
),
new
THREE
.
Face3
(
4
,
5
,
6
),
new
THREE
.
Face3
(
6
,
5
,
7
),
new
THREE
.
Face3
(
3
,
2
,
6
),
new
THREE
.
Face3
(
3
,
6
,
7
),
new
THREE
.
Face3
(
0
,
1
,
4
),
new
THREE
.
Face3
(
4
,
1
,
5
),
new
THREE
.
Face3
(
2
,
0
,
8
),
new
THREE
.
Face3
(
2
,
8
,
9
),
new
THREE
.
Face3
(
1
,
3
,
5
),
new
THREE
.
Face3
(
5
,
3
,
7
),
new
THREE
.
Face3
(
9
,
8
,
4
),
new
THREE
.
Face3
(
9
,
4
,
6
),
new
THREE
.
Face3
(
2
,
9
,
6
),
new
THREE
.
Face3
(
0
,
4
,
8
)
];
torsion1dof
.
computeFaceNormals
();
bending1dof
.
computeFaceNormals
();
bending2dof
.
computeFaceNormals
();
wireStraight
.
computeFaceNormals
();
wireBent
.
computeFaceNormals
();
assignUVs
(
torsion1dof
);
assignUVs
(
bending1dof
);
assignUVs
(
bending2dof
);
assignUVs
(
wireStraight
);
assignUVs
(
wireBent
);
function
assignUVs
(
geometry
){
geometry
.
computeBoundingBox
();
...
...
@@ -147,6 +214,8 @@ define(['underscore', 'appState', 'three'], function(_, appState, THREE){
if
(
json
.
mesh
==
"
torsion1dof
"
)
this
.
mesh
=
torsion1dof
;
else
if
(
json
.
mesh
==
"
bending1dof
"
)
this
.
mesh
=
bending1dof
;
else
if
(
json
.
mesh
==
"
bending2dof
"
)
this
.
mesh
=
bending2dof
;
else
if
(
json
.
mesh
==
"
wireStraight
"
)
this
.
mesh
=
wireStraight
;
else
if
(
json
.
mesh
==
"
wireBent
"
)
this
.
mesh
=
wireBent
;
else
console
.
warn
(
"
no mesh for type
"
+
json
.
mesh
);
}
}
...
...
js/plists/MaterialsPlist.js
View file @
4055d44a
...
...
@@ -87,9 +87,22 @@ define([], function(){
}
},
conductive
:{
name
:
"
Structural
Electronic Routing
"
,
name
:
"
Electronic Routing
(Straight)
"
,
color
:
"
#b5a642
"
,
altColor
:
"
#857B64
"
,
mesh
:
"
wireStraight
"
,
properties
:{
conductive
:
true
,
density
:
8500
,
//kg/m^3
elasMod
:
1000
,
//Gpascals (kg/(s^2*m)/10000000000)
k
:
500
}
},
conductiveBend
:{
name
:
"
Electronic Routing (Bend)
"
,
color
:
"
#b5a642
"
,
altColor
:
"
#857B64
"
,
mesh
:
"
wireBent
"
,
properties
:{
conductive
:
true
,
density
:
8500
,
//kg/m^3
...
...
@@ -98,10 +111,24 @@ define([], function(){
}
},
flexureCond
:
{
name
:
"
Iso-Flexible Electronic Routing
"
,
name
:
"
Iso-Flex Electronic Routing (Straight)
"
,
color
:
"
#b4ac9c
"
,
altColor
:
"
#b4ac9c
"
,
texture
:
"
stripes
"
,
mesh
:
"
wireStraight
"
,
properties
:{
conductive
:
true
,
density
:
3500
,
//kg/m^3
elasMod
:
0.01
,
k
:
30
}
},
flexureCondBend
:
{
name
:
"
Iso-Flex Electronic Routing (Bend)
"
,
color
:
"
#b4ac9c
"
,
altColor
:
"
#b4ac9c
"
,
texture
:
"
stripes
"
,
mesh
:
"
wireBent
"
,
properties
:{
conductive
:
true
,
density
:
3500
,
//kg/m^3
...
...
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