Permalink
Browse files

Load default STL file and fix geometry error temporarily

  • Loading branch information...
1 parent e9c3ede commit 2acf3f25ceab46e77da9a00896e4baebaa806473 Wilbur Shi committed Aug 4, 2016
Showing with 13 additions and 10 deletions.
  1. +3 −2 js/main.js
  2. +10 −8 js/photonic3d.js
View
@@ -695,7 +695,7 @@ function updateBuildVolumeSettings() {
});
viewer3d.setBuildVolume(settings.get('buildVolume'));
- viewer3d.dropObject(slicer.mesh);
+ slicer.mesh && viewer3d.dropObject(slicer.mesh);
viewer3d.render();
size && updateMeshInfoUI();
@@ -1046,7 +1046,8 @@ var stl = 'stl/StressTest.stl';
//var stl = 'stl/SLAcer.stl';
// File url
-var url = 'http://' + window.location.hostname + window.location.pathname + stl;
+// var url = 'http://' + window.location.hostname + window.location.pathname + stl;
+var url = window.location.href + stl;
// Create http request object
var xmlhttp = new XMLHttpRequest();
View
@@ -17,18 +17,18 @@ function setPrinterCallibrationSettings(printer) {
var buildVolXmm = Math.round(monitorDriverConfig.DLP_X_Res / dotsPermmXYAverage);
var buildVolYmm = Math.round(monitorDriverConfig.DLP_Y_Res / dotsPermmXYAverage);
- // $buildVolumeX.val(buildVolXmm);
- // $buildVolumeY.val(buildVolYmm);
- // updateBuildVolumeSettings();
+ $buildVolumeX.val(buildVolXmm);
+ $buildVolumeY.val(buildVolYmm);
+ updateBuildVolumeSettings();
- // $('#screen-diagonal-unit-in').prop('checked', false);
- // $('#screen-diagonal-unit-mm').prop('checked', true);
- // $screenDiagonalSize.val(diagonalMM);
+ $('#screen-diagonal-unit-in').prop('checked', false);
+ $('#screen-diagonal-unit-mm').prop('checked', true);
+ $screenDiagonalSize.val(diagonalMM);
}
// Initialize values
-function intializeValues() {
+function initializeValues() {
$slicerSpeedYes[0].checked = true;
$slicerSpeedNo[0].checked = false;
updateSlicerSettings();
@@ -40,4 +40,6 @@ function intializeValues() {
});
}
-intializeValues();
+$(window).bind('load', initializeValues);
+// $(document).ready(initializeValues);
+// initializeValues();

0 comments on commit 2acf3f2

Please sign in to comment.