Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Amanda Ghassaei
DMDesign
Commits
edac1271
Commit
edac1271
authored
Aug 10, 2015
by
Amanda Ghassaei
Browse files
material properties from sim nav
parent
31331ef2
Changes
5
Hide whitespace changes
Inline
Side-by-side
js/main.js
View file @
edac1271
...
...
@@ -109,6 +109,7 @@ require.config({
partMenu
:
'
menus/PartMenuView
'
,
scriptMenu
:
'
menus/ScriptMenuView
'
,
materialMenu
:
'
menus/MaterialMenuView
'
,
materialPropertiesMenu
:
'
menus/MaterialPropertiesMenuView
'
,
optimizeMenu
:
'
menus/OptimizationMenuView
'
,
assemblerMenu
:
'
menus/AssemblerMenuView
'
,
camMenu
:
'
menus/CamMenuView
'
,
...
...
js/menus/MaterialMenuView.js
View file @
edac1271
...
...
@@ -63,7 +63,7 @@ define(['jquery', 'underscore', 'menuParent', 'plist', 'lattice', 'globals', 'ma
},
_makeTemplateJSON
:
function
(){
return
_
.
extend
(
lattice
.
toJSON
(),
this
.
model
.
toJSON
(),
plist
,
globals
,
{
materials
:
materials
.
list
,
compositeMaterialsKeys
:
materials
.
getCompositeKeys
()});
return
_
.
extend
(
lattice
.
toJSON
(),
this
.
model
.
toJSON
(),
plist
,
globals
,
{
inSimMode
:
false
,
materials
:
materials
.
list
,
compositeMaterialsKeys
:
materials
.
getCompositeKeys
()});
},
template
:
_
.
template
(
template
)
...
...
js/menus/MaterialPropertiesMenuView.js
0 → 100644
View file @
edac1271
/**
* Created by aghassaei on 8/10/15.
*/
define
([
'
materialMenu
'
],
function
(
MaterialMenuView
){
return
MaterialMenuView
.
extend
({
_makeTemplateJSON
:
function
(){
var
data
=
MaterialMenuView
.
prototype
.
_makeTemplateJSON
.
call
(
this
);
data
.
inSimMode
=
true
;
return
data
;
}
});
});
\ No newline at end of file
js/menus/templates/MaterialMenuView.html
View file @
edac1271
Material Class:
<div
class=
"btn-group"
>
<button
data-toggle=
"dropdown"
class=
"btn dropdown-toggle"
type=
"button"
><
%=
allMaterialClasses
[
materialClass
]
%
><span
class=
"caret"
></span></button>
<ul
role=
"menu"
class=
"dropdown-menu"
>
<
%
_.each
(
_.keys
(
allMaterialClasses
),
function
(
key
){
%
>
<li><a
class=
"appState dropdownSelector"
data-property=
"materialClass"
data-value=
"<%= key %>"
href=
"#"
><
%=
allMaterialClasses
[
key
]
%
></a></li>
<
%
});
%
>
</ul>
</div><br/><br/>
<
%
if
(!
inSimMode
){
%
>
Material Class:
<div
class=
"btn-group"
>
<button
data-toggle=
"dropdown"
class=
"btn dropdown-toggle"
type=
"button"
><
%=
allMaterialClasses
[
materialClass
]
%
><span
class=
"caret"
></span></button>
<ul
role=
"menu"
class=
"dropdown-menu"
>
<
%
_.each
(
_.keys
(
allMaterialClasses
),
function
(
key
){
%
>
<li><a
class=
"appState dropdownSelector"
data-property=
"materialClass"
data-value=
"<%= key %>"
href=
"#"
><
%=
allMaterialClasses
[
key
]
%
></a></li>
<
%
});
%
>
</ul>
</div><br/><br/>
<
%
}
%
>
<
%
if
(
allMaterialTypes
[
cellType
][
connectionType
]){
%
>
Materials:
<br/>
<
%
_.each
(
_.keys
(
allMaterials
[
materialClass
]),
function
(
key
){
%
>
...
...
@@ -33,23 +35,25 @@ Material Class:
Use realistic color scheme
</label><br/>
<a
id=
"newElementaryMaterial"
href=
"#"
class=
"btn btn-block btn-lg btn-default"
>
+ Create New Material Definition
</a>
<
%
}
%
><br/>
Composite Materials:
<br/>
<
%
if
((cellType =
=
"
octa
"
&&
connectionType
!=
"
vertex
")
||
cellType =
=
"
tetra
"){
%
>
not available for this lattice type
<
%
}
else
{
%
>
<
%
_.each
(
compositeMaterialsKeys
,
function
(
key
){
%
>
<label
class=
"radio colorSwatches"
>
<input
type=
"radio"
<%
if
(key =
=
materialType
){
%
>
checked
<
%}%
>
name="materialType" value="
<
%=
key
%
>
" data-toggle="radio" class="custom-radio appState">
<span
class=
"icons"
><span
class=
"icon-unchecked"
></span><span
class=
"icon-checked"
></span></span>
<div
class=
"materialColorSwatch"
>
<div
style=
"background-color:<% if(realisticColorScheme){ %><%= materials[key].color %><% }else{ %><%= materials[key].altColor %><% } %>"
></div>
<span><span
class=
"materialListTitle"
><
%=
materials
[
key
].
name
%
></span><a
data-id=
"<%= key %>"
class=
"editComposite"
>
Edit...
</a></span></div>
</label>
<
%
});
%
><br/>
<
%
if
(
materialType.substr
(0,5
) =
=
"
super
")
{
%
>
Offset (xyz):
<input
data-property=
"superCellIndex"
data-key=
"x"
value=
"<%= superCellIndex.x %>"
placeholder=
"X"
class=
"form-control intInput appState"
type=
"text"
>
<input
data-property=
"superCellIndex"
data-key=
"y"
value=
"<%= superCellIndex.y %>"
placeholder=
"Y"
class=
"form-control intInput appState"
type=
"text"
>
<input
data-property=
"superCellIndex"
data-key=
"z"
value=
"<%= superCellIndex.z %>"
placeholder=
"Z"
class=
"form-control intInput appState"
type=
"text"
><br/><br/>
<
%
if
(!
inSimMode
){
%
>
Composite Materials:
<br/>
<
%
if
((cellType =
=
"
octa
"
&&
connectionType
!=
"
vertex
")
||
cellType =
=
"
tetra
"){
%
>
not available for this lattice type
<
%
}
else
{
%
>
<
%
_.each
(
compositeMaterialsKeys
,
function
(
key
){
%
>
<label
class=
"radio colorSwatches"
>
<input
type=
"radio"
<%
if
(key =
=
materialType
){
%
>
checked
<
%}%
>
name="materialType" value="
<
%=
key
%
>
" data-toggle="radio" class="custom-radio appState">
<span
class=
"icons"
><span
class=
"icon-unchecked"
></span><span
class=
"icon-checked"
></span></span>
<div
class=
"materialColorSwatch"
>
<div
style=
"background-color:<% if(realisticColorScheme){ %><%= materials[key].color %><% }else{ %><%= materials[key].altColor %><% } %>"
></div>
<span><span
class=
"materialListTitle"
><
%=
materials
[
key
].
name
%
></span><a
data-id=
"<%= key %>"
class=
"editComposite"
>
Edit...
</a></span></div>
</label>
<
%
});
%
><br/>
<
%
if
(
materialType.substr
(0,5
) =
=
"
super
")
{
%
>
Offset (xyz):
<input
data-property=
"superCellIndex"
data-key=
"x"
value=
"<%= superCellIndex.x %>"
placeholder=
"X"
class=
"form-control intInput appState"
type=
"text"
>
<input
data-property=
"superCellIndex"
data-key=
"y"
value=
"<%= superCellIndex.y %>"
placeholder=
"Y"
class=
"form-control intInput appState"
type=
"text"
>
<input
data-property=
"superCellIndex"
data-key=
"z"
value=
"<%= superCellIndex.z %>"
placeholder=
"Z"
class=
"form-control intInput appState"
type=
"text"
><br/><br/>
<
%
}
%
>
<a
id=
"navToCompositeMenu"
href=
"#"
class=
"btn btn-block btn-lg btn-default"
>
+ Create New Composite Material
</a><br/>
<a
id=
"compositeFromLattice"
href=
"#"
class=
"btn btn-block btn-lg btn-default"
>
New Composite From Current Assembly
</a><br/>
<
%
}
%
>
<a
id=
"navToCompositeMenu"
href=
"#"
class=
"btn btn-block btn-lg btn-default"
>
+ Create New Composite Material
</a><br/>
<a
id=
"compositeFromLattice"
href=
"#"
class=
"btn btn-block btn-lg btn-default"
>
New Composite From Current Assembly
</a><br/>
<
%
}
%
>
\ No newline at end of file
js/plists/PList.js
View file @
edac1271
...
...
@@ -9,18 +9,20 @@ define(['three'], function(THREE){
navDesign
:{
lattice
:
"
Lattice
"
,
//sketch:"Sketch",
material
:
"
Material
"
,
material
:
"
Material
s
"
,
import
:
"
Import
"
,
part
:
"
Part
"
,
script
:
"
Script
"
},
electronicNavSim
:{
eSetup
:
"
Connectivity
"
,
materialProperties
:
"
Materials
"
,
eStatic
:
"
Statics
"
,
eDynamic
:
"
Dynamics
"
},
mechanicalNavSim
:{
mSetup
:
"
Setup
"
,
materialProperties
:
"
Materials
"
,
mStatic
:
"
Statics
"
,
mDynamic
:
"
Dynamics
"
},
...
...
Write
Preview
Supports
Markdown
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