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
42b70174
Commit
42b70174
authored
Jul 11, 2016
by
amandaghassaei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed shear actuation
parent
37e761e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
js/simulation/function/EM/emSimLattice.js
js/simulation/function/EM/emSimLattice.js
+10
-3
No files found.
js/simulation/function/EM/emSimLattice.js
View file @
42b70174
...
...
@@ -198,8 +198,13 @@ define(['underscore', 'backbone', 'threeModel', 'lattice', 'plist', 'emWire', 'G
if
(
cell
.
getMaterialID
()
==
"
actuatorLinear1DOF
"
)
self
.
wires
[
rgbaIndex
]
=
-
1
;
else
if
(
cell
.
getMaterialID
()
==
"
actuatorBending1DOF
"
)
self
.
wires
[
rgbaIndex
]
=
-
2
;
else
if
(
cell
.
getMaterialID
()
==
"
actuatorTorsion1DOF
"
)
self
.
wires
[
rgbaIndex
]
=
-
3
;
else
if
(
cell
.
getMaterialID
()
==
"
actuatorShear
"
)
self
.
wires
[
rgbaIndex
]
=
-
4
;
else
if
(
cell
.
getMaterialID
()
==
"
actuatorShear
"
)
self
.
wires
[
rgbaIndex
]
=
-
5
;
//todo fix this
else
if
(
cell
.
getMaterialID
()
==
"
actuatorShear
"
)
{
var
vector
=
new
THREE
.
Vector3
(
1
,
0
,
0
);
vector
.
applyQuaternion
(
cell
.
getOrientation
());
if
(
Math
.
abs
(
vector
.
x
)
>
0.9
)
self
.
wires
[
rgbaIndex
]
=
-
4
;
else
if
(
Math
.
abs
(
vector
.
y
)
>
0.9
)
self
.
wires
[
rgbaIndex
]
=
-
5
;
else
if
(
Math
.
abs
(
vector
.
z
)
>
0.9
)
self
.
wires
[
rgbaIndex
]
=
-
6
;
}
//use remaining three spots to indicate axial direction and wire group num
self
.
wires
[
rgbaIndex
+
1
]
=
wireIndices
[
0
];
...
...
@@ -739,7 +744,9 @@ define(['underscore', 'backbone', 'threeModel', 'lattice', 'plist', 'emWire', 'G
}
var
actuatedD
=
[
nominalD
[
0
],
nominalD
[
1
],
nominalD
[
2
]];
if
(
_actuatorType
==
-
1
)
actuatedD
[
neighborAxis
]
*=
1
+
actuation
;
//linear actuator
else
if
(
_actuatorType
==
-
4
)
{
actuatedD
[
1
]
+=
actuatedD
[
neighborAxis
]
*
actuation
;
//shear
else
if
(
_actuatorType
==
-
4
)
actuatedD
[
0
]
+=
actuatedD
[
neighborAxis
]
*
actuation
;
//shear x
else
if
(
_actuatorType
==
-
5
)
actuatedD
[
1
]
+=
actuatedD
[
neighborAxis
]
*
actuation
;
//shear y
else
if
(
_actuatorType
==
-
6
)
actuatedD
[
2
]
+=
actuatedD
[
neighborAxis
]
*
actuation
;
//shear z
//convert translational offsets to correct reference frame
var
halfNominalD
=
this
.
_multiplyVectorScalar
(
actuatedD
,
0.5
);
...
...
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