Skip to content
Snippets Groups Projects
Commit 25ab786f authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

k var for dielectric perm

parent edac1271
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,7 @@ define(['jquery', 'underscore', 'menuParent', 'eSimPlist', 'text!eStaticMenuTemp ...@@ -25,7 +25,7 @@ define(['jquery', 'underscore', 'menuParent', 'eSimPlist', 'text!eStaticMenuTemp
_calcCapacitance: function(e){ _calcCapacitance: function(e){
e.preventDefault(); e.preventDefault();
if (this._checkGroupData("voltage")) lattice.calcCapacitance(); if (this._checkGroupData("voltage") && !isNaN(parseFloat(eSim.get("dielectricConst")))) lattice.calcCapacitance();
else console.warn("voltage data missing"); else console.warn("voltage data missing");
}, },
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
*/ */
define(['jquery', 'underscore', 'backbone', 'text!navViewMenuTemplate'], function($, _, Backbone, template){ define(['jquery', 'underscore', 'backbone', 'plist', 'text!navViewMenuTemplate'], function($, _, Backbone, plist, template){
return Backbone.View.extend({ return Backbone.View.extend({
el: "#navViewMenu", el: "#navViewMenu",
events: { events: {
"click a.boolProperty": "_makeSelection", "click a": "_makeSelection",
"click #reset3DView": "_reset3DNavigation" "click #reset3DView": "_reset3DNavigation"
}, },
...@@ -25,8 +25,12 @@ define(['jquery', 'underscore', 'backbone', 'text!navViewMenuTemplate'], functio ...@@ -25,8 +25,12 @@ define(['jquery', 'underscore', 'backbone', 'text!navViewMenuTemplate'], functio
var $target = $(e.target); var $target = $(e.target);
if ($target.prop("tagName") == "SPAN") $target = $target.parent(); if ($target.prop("tagName") == "SPAN") $target = $target.parent();
var property = $target.data("property"); var property = $target.data("property");
var value = $target.data("value");
var owner = this._getPropertyOwner($target); var owner = this._getPropertyOwner($target);
if (owner) owner.set(property, !owner.get(property)); if (owner) {
if (value) owner.set(property, value);
else owner.set(property, !owner.get(property));
}
}, },
_getPropertyOwner: function($target){ _getPropertyOwner: function($target){
...@@ -41,7 +45,7 @@ define(['jquery', 'underscore', 'backbone', 'text!navViewMenuTemplate'], functio ...@@ -41,7 +45,7 @@ define(['jquery', 'underscore', 'backbone', 'text!navViewMenuTemplate'], functio
}, },
render: function(){ render: function(){
this.$el.html(this.template(this.model.toJSON())); this.$el.html(this.template(_.extend(this.model.toJSON(), plist)));
var self = this; var self = this;
_.each($(".boolProperty"), function(item){ _.each($(".boolProperty"), function(item){
......
<% if(conductorGroups && conductorGroups.length > 0){ %> <% if(conductorGroups && conductorGroups.length > 0){ %>
Dielectric Permittivity (k): &nbsp;&nbsp;<input data-property="dielectricPerm" value="<%= dielectricPerm %>" placeholder="k" class="form-control floatInput eSim voltageInput" type="text"><br/>
<label class="radio"> <label class="radio">
<input type="radio" <% if (visibleConductorGroup == -2){ %>checked<% } %> name="visibleConductorGroup" value="-2" data-toggle="radio" class="custom-radio eSim"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span> <input type="radio" <% if (visibleConductorGroup == -2){ %>checked<% } %> name="visibleConductorGroup" value="-2" data-toggle="radio" class="custom-radio eSim"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
Show Everything Show Everything
...@@ -32,6 +33,7 @@ ...@@ -32,6 +33,7 @@
<% }); %> <% }); %>
</ul> </ul>
</div><br/><br/> </div><br/><br/>
<div class="inlineSwatch capacitance"></div>Capacitance:<br/> <div class="inlineSwatch capacitance"></div>Capacitance:<br/>
<div class="inlineSwatch inductance"></div>Inductance:<br/><br/> <div class="inlineSwatch inductance"></div>Inductance:<br/><br/>
<a href="#" id="calcCapacitance" class="btn btn-block btn-lg btn-default"><% if(globalCapacitance){ %>Re-<% } %>Calculate Capacitance</a><br/> <a href="#" id="calcCapacitance" class="btn btn-block btn-lg btn-default"><% if(globalCapacitance){ %>Re-<% } %>Calculate Capacitance</a><br/>
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a class="appState boolProperty" data-property="basePlaneIsVisible" href="#">Sketch Plane</a></li> <li><a class="appState boolProperty" data-property="basePlaneIsVisible" href="#">Sketch Plane</a></li>
<li><a class="appState boolProperty" data-property="highlighterIsVisible" href="#">Hover Tool</a></li> <li><a class="appState boolProperty" data-property="highlighterIsVisible" href="#">Hover Tool</a></li>
<li><a class="appState boolProperty" data-property="axesAreVisible" href="#">Axes</a></li>
<li><a id="reset3DView" href="#">Reset 3D Navigation</a></li>
</ul> </ul>
</li> </li>
<li class="dropdown-submenu"> <li class="dropdown-submenu">
...@@ -22,9 +24,10 @@ ...@@ -22,9 +24,10 @@
</ul> </ul>
</li> </li>
<li class="dropdown-submenu"> <li class="dropdown-submenu">
<a tabindex="-1">3D<span class="pull-right fui-arrow-right"></span></a> <a tabindex="-1">Cells<span class="pull-right fui-arrow-right"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a class="appState boolProperty" data-property="axesAreVisible" href="#">Axes</a></li> <% _.each(allCellModes, function(mode, key){ %>
<li><a id="reset3DView" href="#">Reset 3D Navigation</a></li> <li><a class="appState" data-property="cellMode" data-value="<%= key %>" href="#"><% if (cellMode == key) { %><span class="fui-check"></span><% } %><%= mode %></a></li>
<% }); %>
</ul> </ul>
</li> </li>
\ No newline at end of file
...@@ -16,13 +16,13 @@ define(['three'], function(THREE){ ...@@ -16,13 +16,13 @@ define(['three'], function(THREE){
}, },
electronicNavSim:{ electronicNavSim:{
eSetup:"Connectivity", eSetup:"Connectivity",
materialProperties: "Materials", // materialProperties: "Materials",
eStatic:"Statics", eStatic:"Statics",
eDynamic:"Dynamics" eDynamic:"Dynamics"
}, },
mechanicalNavSim:{ mechanicalNavSim:{
mSetup:"Setup", mSetup:"Setup",
materialProperties: "Materials", // materialProperties: "Materials",
mStatic:"Statics", mStatic:"Statics",
mDynamic:"Dynamics" mDynamic:"Dynamics"
}, },
...@@ -95,6 +95,13 @@ define(['three'], function(THREE){ ...@@ -95,6 +95,13 @@ define(['three'], function(THREE){
kelvin: {face: null} kelvin: {face: null}
}, },
allCellModes:{//supercell, cell, part, node, beam
supercell: "Hierarchical Mode",
cell: "Voxel Mode",
part: "Part Mode",
hide: "Hide Cells"
},
allMaterialTypes:{ allMaterialTypes:{
octa:{ octa:{
face: 'mechanical', face: 'mechanical',
......
...@@ -13,7 +13,8 @@ define(['underscore', 'backbone'], function(_, Backbone){ ...@@ -13,7 +13,8 @@ define(['underscore', 'backbone'], function(_, Backbone){
globalCapacitance: null, globalCapacitance: null,
globalInductance: null, globalInductance: null,
voltageUnits: "1", voltageUnits: "1",
currentUnits: "0.001" currentUnits: "0.001",
dielectricPerm: 1.00
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment