kopia lustrzana https://github.com/OpenBuilds/OpenBuilds-CONTROL
Improve Memory Handling
rodzic
a10e3d8461
commit
f2b21268d3
|
@ -272,10 +272,10 @@
|
|||
<ul class="ribbon-dropdown grblmode" data-role="dropdown" data-duration="100">
|
||||
<li><a href="#" onclick="populateSurfaceToolForm();"><i class="fas fa-exchange-alt"></i> Surfacing / Flattening Wizard</a></li>
|
||||
<li><a href="#" onclick="jogWidget();"><i class="fas fa-mobile-alt"></i> Mobile Jog Widget</a></li>
|
||||
<!--li class="divider fg-lightGray"></li>
|
||||
<li class="divider fg-lightGray"></li>
|
||||
<li class="disabled grblCalibrationMenu" onclick="xstepscalibrate();"><a href="#"><i class="fas fa-wrench fa-fw"></i> Calibrate X-Axes Steps/mm</a></li>
|
||||
<li class="disabled grblCalibrationMenu" onclick="ystepscalibrate();"><a href="#"><i class="fas fa-wrench fa-fw"></i> Calibrate Y-Axes Steps/mm</a></li>
|
||||
<li class="disabled grblCalibrationMenu" onclick="zstepscalibrate();"><a href="#"><i class="fas fa-wrench fa-fw"></i> Calibrate Z-Axes Steps/mm</a></li-->
|
||||
<li class="disabled grblCalibrationMenu" onclick="zstepscalibrate();"><a href="#"><i class="fas fa-wrench fa-fw"></i> Calibrate Z-Axes Steps/mm</a></li>
|
||||
<li class="divider fg-lightGray"></li>
|
||||
<li onclick="keyboardShortcutsEditor();"><a href="#"><i class="far fa-edit fa-fw"></i> Customise Shortcut Key Assignments</a></li>
|
||||
</ul>
|
||||
|
|
|
@ -15,6 +15,15 @@ self.addEventListener('message', function(e) {
|
|||
// Updated by PvdW in 2017 - Parse GCODE to find starting temperatures (preheat machine)
|
||||
// Updated by PvdW in 2018 - Webworker Version
|
||||
|
||||
|
||||
var colorG0 = 0x00cc00;
|
||||
var colorG1 = 0xcc0000;
|
||||
var colorG2 = 0x0000cc;
|
||||
var materialg0;
|
||||
var materialg1;
|
||||
var materialg2;
|
||||
var materialg3;
|
||||
|
||||
var smaxvalue = 0;
|
||||
var lastLine = {
|
||||
x: 0,
|
||||
|
@ -89,6 +98,24 @@ function findmaxs(gcode) {
|
|||
}
|
||||
|
||||
function openGCodeFromText(gcode) {
|
||||
|
||||
materialg0 = new THREE.LineBasicMaterial({
|
||||
color: color = new THREE.Color(colorG0),
|
||||
opacity: 0.5,
|
||||
transparent: true
|
||||
});
|
||||
materialg1 = new THREE.LineBasicMaterial({
|
||||
color: color = new THREE.Color(colorG0),
|
||||
opacity: 0.5,
|
||||
transparent: true
|
||||
});
|
||||
materialg2 = new THREE.LineBasicMaterial({
|
||||
color: color = new THREE.Color(colorG0),
|
||||
opacity: 0.5,
|
||||
transparent: true
|
||||
});
|
||||
|
||||
|
||||
smaxvalue = findmaxs(gcode);
|
||||
var object2 = new THREE.Group();
|
||||
// object = new THREE.Group();
|
||||
|
@ -750,20 +777,18 @@ GCodeParser = function(handlers, modecmdhandlers) {
|
|||
|
||||
if (p2.extruding) {
|
||||
// color = 0xff00ff;
|
||||
var material = materialg1
|
||||
} else if (p2.g0) {
|
||||
// color = 0x00ff00;
|
||||
var material = materialg0
|
||||
} else if (p2.g2) {
|
||||
//color = 0x999900;
|
||||
var material = materialg2
|
||||
} else if (p2.arc) {
|
||||
// color = 0x0033ff;
|
||||
var material = materialg2
|
||||
}
|
||||
|
||||
var material = new THREE.LineBasicMaterial({
|
||||
color: color,
|
||||
opacity: 0.5,
|
||||
transparent: true
|
||||
});
|
||||
|
||||
var geometry = new THREE.Geometry();
|
||||
geometry.vertices.push(
|
||||
new THREE.Vector3(p1.x, p1.y, p1.z),
|
||||
|
@ -843,7 +868,7 @@ GCodeParser = function(handlers, modecmdhandlers) {
|
|||
|
||||
// console.log("calculating distance. dist:", dist, "totalDist:", this.totalDist, "feedrate:", args.feedrate, "timeMinsToExecute:", timeMinutes, "totalTime:", this.totalTime, "p1:", p1, "p2:", p2, "args:", args);
|
||||
|
||||
}
|
||||
} // End of AddSegment
|
||||
this.totalDist = 0;
|
||||
this.totalTime = 0;
|
||||
|
||||
|
|
16
index.js
16
index.js
|
@ -57,6 +57,13 @@ const electron = require('electron');
|
|||
const electronApp = electron.app;
|
||||
if (isElectron()) {
|
||||
console.log("Local User Data: " + electronApp.getPath('userData'))
|
||||
electronApp.commandLine.appendSwitch('ignore-gpu-blacklist', 'true')
|
||||
electronApp.commandLine.appendSwitch('enable-gpu-rasterization', 'true')
|
||||
electronApp.commandLine.appendSwitch('enable-zero-copy', 'true')
|
||||
electronApp.commandLine.appendSwitch('disable-software-rasterizer', 'true')
|
||||
electronApp.commandLine.appendSwitch('enable-native-gpu-memory-buffers', 'true')
|
||||
electronApp.commandLine.appendSwitch('js-flags', '--max-old-space-size=8192')
|
||||
console.log('Command Line Arguments for Electron: Set OK')
|
||||
}
|
||||
const BrowserWindow = electron.BrowserWindow;
|
||||
const Tray = electron.Tray;
|
||||
|
@ -2328,15 +2335,6 @@ if (isElectron()) {
|
|||
})
|
||||
}
|
||||
|
||||
if (!process.platform == 'darwin') {
|
||||
electronApp.commandLine.appendSwitch('ignore-gpu-blacklist', 'true')
|
||||
electronApp.commandLine.appendSwitch('enable-gpu-rasterization', 'true')
|
||||
electronApp.commandLine.appendSwitch('enable-zero-copy', 'true')
|
||||
electronApp.commandLine.appendSwitch('disable-software-rasterizer', 'true')
|
||||
electronApp.commandLine.appendSwitch('enable-native-gpu-memory-buffers', 'true')
|
||||
}
|
||||
|
||||
|
||||
// This method will be called when Electron has finished
|
||||
// initialization and is ready to create browser windows.
|
||||
// Some APIs can only be used after this event occurs.
|
||||
|
|
Ładowanie…
Reference in New Issue