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
b21d3158
Commit
b21d3158
authored
10 years ago
by
Amanda Ghassaei
Browse files
Options
Downloads
Patches
Plain Diff
low poly part
parent
a916e0c3
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
assets/stls/parts/edgeVoxPartLowPoly.stl
+0
-0
0 additions, 0 deletions
assets/stls/parts/edgeVoxPartLowPoly.stl
js/fea/DmaCell.js
+3
-0
3 additions, 0 deletions
js/fea/DmaCell.js
js/fea/DmaCellOcta.js
+16
-1
16 additions, 1 deletion
js/fea/DmaCellOcta.js
js/fea/DmaPart.js
+30
-0
30 additions, 0 deletions
js/fea/DmaPart.js
with
49 additions
and
1 deletion
assets/stls/parts/edgeVoxPartLowPoly.stl
+
0
−
0
View file @
b21d3158
No preview for this file type
This diff is collapsed.
Click to expand it.
js/fea/DmaCell.js
+
3
−
0
View file @
b21d3158
...
...
@@ -167,6 +167,9 @@ DMACell.prototype._initParts = function(){
return
[];
//override in subclasses
};
DMACell
.
prototype
.
changePartType
=
function
(){
//override in subclasses
};
DMACell
.
prototype
.
removePart
=
function
(
index
){
this
.
parts
[
index
].
destroy
();
this
.
parts
[
index
]
=
null
;
...
...
This diff is collapsed.
Click to expand it.
js/fea/DmaCellOcta.js
+
16
−
1
View file @
b21d3158
...
...
@@ -156,7 +156,22 @@ function DMARotatedEdgeCell(indices, scale, cellMode, partType){
DMARotatedEdgeCell
.
prototype
=
Object
.
create
(
DMACell
.
prototype
);
DMARotatedEdgeCell
.
prototype
.
_initParts
=
function
(){
return
[
new
DMAEdgeVoxPart
(
0
,
this
)];
return
this
.
changePartType
(
dmaGlobals
.
lattice
.
get
(
"
partType
"
));
};
DMARotatedEdgeCell
.
prototype
.
changePartType
=
function
(
type
){
var
newParts
=
[];
if
(
type
==
"
vox
"
){
newParts
.
push
(
new
DMAEdgeVoxPart
(
0
,
this
));
}
else
if
(
type
==
"
voxLowPoly
"
){
newParts
.
push
(
new
DMAEdgeVoxPartLowPoly
(
0
,
this
));
}
else
{
console
.
warn
(
"
part type not recognized
"
);
return
;
}
if
(
!
this
.
parts
)
return
newParts
;
this
.
destroyParts
();
this
.
parts
=
newParts
;
};
DMARotatedEdgeCell
.
prototype
.
_doMeshTransformations
=
function
(
mesh
){
...
...
This diff is collapsed.
Click to expand it.
js/fea/DmaPart.js
+
30
−
0
View file @
b21d3158
...
...
@@ -180,6 +180,36 @@ var partMaterial = new THREE.MeshLambertMaterial({ color:0xffffff, shading: THRE
})();
(
function
()
{
var
unitPartGeo
;
//import part geometry
var
loader
=
new
THREE
.
STLLoader
();
loader
.
load
(
"
assets/stls/parts/edgeVoxPartLowPoly.stl
"
,
function
(
geometry
){
unitPartGeo
=
geometry
;
unitPartGeo
.
computeBoundingBox
();
var
unitScale
=
0.706
/
unitPartGeo
.
boundingBox
.
max
.
y
;
unitPartGeo
.
applyMatrix
(
new
THREE
.
Matrix4
().
makeScale
(
unitScale
,
unitScale
,
unitScale
));
});
function
DMAEdgeVoxPartLowPoly
(
type
,
parent
){
DMAPart
.
call
(
this
,
type
,
parent
);
}
DMAEdgeVoxPartLowPoly
.
prototype
=
Object
.
create
(
DMAPart
.
prototype
);
DMAEdgeVoxPartLowPoly
.
prototype
.
_makeMeshForType
=
function
(){
var
mesh
=
new
THREE
.
Mesh
(
unitPartGeo
,
partMaterial
);
mesh
.
myPart
=
this
;
//need a ref back to this part
return
mesh
;
};
self
.
DMAEdgeVoxPartLowPoly
=
DMAEdgeVoxPartLowPoly
;
})();
(
function
()
{
var
unitPartGeo
;
...
...
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