Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Amanda Ghassaei
DMDesign
Commits
f0365904
Commit
f0365904
authored
Aug 21, 2015
by
Amanda Ghassaei
Browse files
sync with will
parent
b45e4965
Changes
3
Hide whitespace changes
Inline
Side-by-side
js/cam/assemblers/Assembler.js
View file @
f0365904
...
...
@@ -69,6 +69,11 @@ 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(-4, -4.5, 0));
// geometry.applyMatrix(new THREE.Matrix4().makeRotationZ(-Math.PI/2));
// geometry.applyMatrix(new THREE.Matrix4().makeTranslation(4.5, -4, 0));
// geometry.applyMatrix(new THREE.Matrix4().makeRotationZ(Math.PI/2));
return
geometry
;
}
...
...
@@ -209,8 +214,8 @@ define(['underscore', 'appState', 'lattice', 'stlLoader', 'threeModel', 'cam', '
_
.
each
(
this
.
stock
,
function
(
stock
){
stock
.
show
();
});
if
(
index
.
z
%
2
!
=
0
)
{
//rotate on odd rows
this
.
components
.
substrate
.
rotateTo
(
new
THREE
.
Vector3
(
0
,
0
,
Math
.
PI
/
2
),
speed
,
callback
);
if
(
index
.
z
%
2
=
=
0
)
{
//rotate on odd rows
this
.
components
.
substrate
.
rotateTo
(
new
THREE
.
Vector3
(
0
,
0
,
-
Math
.
PI
/
2
),
speed
,
callback
);
return
;
}
this
.
components
.
substrate
.
rotateTo
(
new
THREE
.
Vector3
(
0
,
0
,
0
),
speed
,
callback
);
...
...
js/cam/assemblers/AssemblerPost.js
View file @
f0365904
...
...
@@ -121,11 +121,11 @@ define(['underscore', 'appState', 'lattice', 'cam'], function(_, appState, latti
position
.
sub
(
settings
.
originPosition
);
if
(
index
.
z
%
2
!
=
0
){
if
(
index
.
z
%
2
=
=
0
){
//offset for rotation
var
offset
=
self
.
components
.
substrate
.
centerOfRotation
.
clone
().
multiplyScalar
(
settings
.
scale
);
//offset in
mm
var
offset
=
self
.
components
.
substrate
.
centerOfRotation
.
clone
().
multiplyScalar
(
settings
.
scale
);
//offset in
lattice pitch
var
dist
=
position
.
clone
().
sub
(
offset
);
position
=
offset
.
add
(
new
THREE
.
Vector3
(
dist
.
y
,
-
dist
.
x
,
position
.
z
));
position
=
offset
.
add
(
new
THREE
.
Vector3
(
-
dist
.
y
-
3
*
settings
.
scale
,
dist
.
x
-
0.335
,
position
.
z
));
}
var
stock
=
_
.
find
(
self
.
stock
,
function
(
thisStock
){
...
...
js/lattice/latticeSubclasses/GIKLattice.js
View file @
f0365904
...
...
@@ -44,12 +44,12 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre
},
_zIndexRotation
:
function
(
index
){
if
(
index
.
z
%
2
!
=
0
)
return
Math
.
PI
/
2
;
if
(
index
.
z
%
2
=
=
0
)
return
Math
.
PI
/
2
;
return
0
;
},
_zIndexRotationSuperCell
:
function
(
index
){
if
(
index
.
z
%
2
!=
0
)
return
Math
.
PI
/
2
;
//this goes neg if zIndexRotation rules are opp? need to clear this up eventually
if
(
index
.
z
%
2
!=
0
)
return
-
Math
.
PI
/
2
;
//this goes neg if zIndexRotation rules are opp? need to clear this up eventually
return
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