Commit f6c3decd authored by amandaghassaei's avatar amandaghassaei
Browse files

small changes

parent 9bebc352
......@@ -406,6 +406,7 @@
<li><a id="navPattern" href="#">Pattern</a></li>
<li><a id="navSimulation" href="#">Simulation</a></li>
<li><a id="about" class="menuHoverControls" target="_blank" href="#">About</a></li>
<li><a id="tips" class="menuHoverControls" target="_blank" href="#">File Import Tips</a></li>
</ul>
</div><!-- /.navbar-collapse -->
......@@ -532,6 +533,17 @@
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div class="modal fade" id="tipsModal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-body">
<p><b>File Import Tips</b><br/><br/>
....
</p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div class="modal fade" id="exportSTLModal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-med">
<div class="modal-content">
......
......@@ -17,6 +17,9 @@ function initControls(globals){
setLink("#about", function(){
$('#aboutModal').modal('show');
});
setLink("#tips", function(){
$('#tipsModal').modal('show');
});
setLink("#exportSTL", function(){
$('#exportSTLModal').modal('show');
......@@ -112,7 +115,11 @@ function initControls(globals){
parseTXTjson(json);
});
} else globals.pattern.loadSVG("assets/" + url);
} else {
globals.filename = name;
globals.extension = extension;
globals.pattern.loadSVG("assets/" + url);
}
}
});
......
......@@ -47,8 +47,10 @@ function initGlobals(){
//import pattern settings
vertTol: 3,//vertex merge tolerance
//save stl settings
filename: null,
extension: null
extension: null,
doublesidedSTL: false
};
......
......@@ -4,11 +4,16 @@
function saveSTL(){
var geo = globals.model.getGeometry();
var geo = globals.model.getGeometry().clone();
if (geo.vertices.length == 0) {
globals.warn("No geometry to save.");
return;
}
if (!globals.doublesidedSTL){
for (var i=0;i<geo.faces.length/2;i++){
geo.faces.pop();
}
}
var data = [];
data.push({geo: geo, offset:new THREE.Vector3(0,0,0), orientation:new THREE.Quaternion(0,0,0,1)});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment