Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DMDesign
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Amanda Ghassaei
DMDesign
Commits
917c99ad
Commit
917c99ad
authored
10 years ago
by
Amanda Ghassaei
Browse files
Options
Downloads
Patches
Plain Diff
done refactoring cell classes
parent
0d40549d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
js/fea/DmaCellOcta.js
+4
-4
4 additions, 4 deletions
js/fea/DmaCellOcta.js
js/fea/DmaCellTetra.js
+4
-19
4 additions, 19 deletions
js/fea/DmaCellTetra.js
with
8 additions
and
23 deletions
js/fea/DmaCellOcta.js
+
4
−
4
View file @
917c99ad
...
...
@@ -76,10 +76,6 @@ DMAFreeFormOctaCell.prototype._doMeshTransformations = function(mesh){
mesh
.
rotation
.
set
(
eulerRot
.
x
,
eulerRot
.
y
,
eulerRot
.
z
);
};
DMAFreeFormOctaCell
.
prototype
.
getType
=
function
(){
return
"
octa
"
;
};
DMAFreeFormOctaCell
.
prototype
.
calcHighlighterPosition
=
function
(
face
){
var
direction
=
face
.
normal
.
clone
();
direction
.
applyQuaternion
(
this
.
cellMesh
.
quaternion
);
...
...
@@ -93,6 +89,10 @@ DMAFreeFormOctaCell.prototype.calcHighlighterPosition = function(face){
return
{
index
:
_
.
clone
(
this
.
indices
),
direction
:
direction
,
position
:
position
};
};
DMAFreeFormOctaCell
.
prototype
.
getType
=
function
(){
return
"
octa
"
;
};
DMAFreeFormOctaCell
.
prototype
.
zScale
=
function
(
scale
){
if
(
!
scale
)
scale
=
dmaGlobals
.
lattice
.
get
(
"
scale
"
);
return
2
*
scale
/
Math
.
sqrt
(
6
);
...
...
This diff is collapsed.
Click to expand it.
js/fea/DmaCellTetra.js
+
4
−
19
View file @
917c99ad
...
...
@@ -43,21 +43,6 @@ DMATetraEdgeCell.prototype = Object.create(DMATetraFaceCell.prototype);
DMATetraEdgeCell
.
prototype
.
_doMeshTransformations
=
function
(){};
DMATetraEdgeCell
.
prototype
.
calcHighlighterPosition
=
function
(
face
){
//todo finish this
var
direction
=
face
.
normal
;
if
(
face
.
normal
.
z
<
0.99
)
direction
=
null
;
//only highlight horizontal faces
var
index
=
_
.
clone
(
this
.
indices
);
index
.
z
=
Math
.
floor
(
index
.
z
/
2
);
index
.
x
=
Math
.
floor
(
index
.
x
/
3
);
index
.
y
=
Math
.
floor
(
index
.
y
/
2
);
var
position
=
dmaGlobals
.
lattice
.
getInvCellPositionForIndex
(
index
);
position
.
z
+=
dmaGlobals
.
lattice
.
zScale
();
return
{
index
:
_
.
clone
(
this
.
indices
),
direction
:
direction
,
position
:
position
};
};
///////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////FREEFORM CONNECTED/////////////////////////////////////////////////////
...
...
@@ -77,10 +62,6 @@ DMAFreeFormTetraCell.prototype._buildCellMesh = function(){//abstract mesh repre
return
this
.
_superBuildCellMesh
(
unitCellGeo2
);
};
DMAFreeFormTetraCell
.
prototype
.
getType
=
function
(){
return
"
tetra
"
;
};
DMAFreeFormTetraCell
.
prototype
.
_doMeshTransformations
=
function
(
mesh
){
var
direction
=
this
.
parentDirection
.
clone
();
var
zAxis
=
new
THREE
.
Vector3
(
0
,
0
,
1
);
...
...
@@ -112,6 +93,10 @@ DMAFreeFormTetraCell.prototype.calcHighlighterPosition = function(face){
return
{
index
:
_
.
clone
(
this
.
indices
),
direction
:
direction
,
position
:
position
};
};
DMAFreeFormTetraCell
.
prototype
.
getType
=
function
(){
return
"
tetra
"
;
};
DMAFreeFormTetraCell
.
prototype
.
zScale
=
function
(
scale
){
if
(
!
scale
)
scale
=
dmaGlobals
.
lattice
.
get
(
"
scale
"
);
return
2
*
scale
/
Math
.
sqrt
(
24
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment