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
69130290
Commit
69130290
authored
10 years ago
by
Amanda Ghassaei
Browse files
Options
Downloads
Patches
Plain Diff
filling out physical elements
parent
c0f744ed
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
js/models/dmaBeam.js
+2
-2
2 additions, 2 deletions
js/models/dmaBeam.js
js/models/dmaCell.js
+25
-0
25 additions, 0 deletions
js/models/dmaCell.js
js/models/dmaPart.js
+13
-2
13 additions, 2 deletions
js/models/dmaPart.js
with
40 additions
and
4 deletions
js/models/dmaBeam.js
+
2
−
2
View file @
69130290
...
...
@@ -3,12 +3,12 @@
*
/
//a single beam
//a single beam
, made from two nodes
function
Beam
(
node1
,
node2
)
{
this
.
nodes
=
[
node1
,
node2
];
var
self
=
this
;
_
.
each
(
nodes
,
function
(
node
){
_
.
each
(
nodes
,
function
(
node
){
//give each node a reference to the new beam it is connected to
node
.
addBeam
(
self
);
});
}
...
...
This diff is collapsed.
Click to expand it.
js/models/dmaCell.js
+
25
−
0
View file @
69130290
/**
* Created by aghassaei on 1/14/15.
*/
//a Cell, a unit piece of the lattice
function
Cell
(
nodes
,
config
)
{
this
.
parts
=
this
.
_createParts
(
nodes
,
config
);
};
Cell
.
prototype
.
_createParts
=
function
(
nodes
,
config
){
var
parts
=
[];
for
(
var
i
=
0
;
i
<
nodes
.
length
;
i
++
){
parts
.
push
(
new
Part
(
nodes
[
i
],
config
[
i
]));
}
return
parts
;
};
Cell
.
prototype
.
render
=
function
(
scene
){
};
Cell
.
prototype
.
translate
=
function
(
dx
,
dy
,
dz
){
};
Cell
.
prototype
.
rotate
=
function
(
rx
,
ry
,
rz
){
};
This diff is collapsed.
Click to expand it.
js/models/dmaPart.js
+
13
−
2
View file @
69130290
...
...
@@ -3,9 +3,11 @@
*/
//a part, element with a single material, handled by assembler
function
Part
(
nodes
,
config
)
{
//list of nodes, config tells how nodes are connected
self
.
nodes
=
nodes
;
self
.
beams
=
self
.
_createBeams
(
nodes
,
config
);
this
.
nodes
=
nodes
;
this
.
beams
=
this
.
_createBeams
(
nodes
,
config
);
};
Part
.
prototype
.
_createBeams
=
function
(
nodes
,
config
){
...
...
@@ -25,3 +27,12 @@ Part.prototype.translate = function(dx, dy, dz){
Part
.
prototype
.
rotate
=
function
(
rx
,
ry
,
rz
){
};
//matt's part
function
PartTriangle
(
nodes
){
}
PartTriangle
.
prototype
=
new
Part
(
nodes
,
[[
0
,
1
],[
1
,
2
],[
2
,
0
]]);
\ No newline at end of file
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