kopia lustrzana https://github.com/OpenBuilds/OpenBuilds-CONTROL
rodzic
469a8bb80a
commit
48001eed13
|
|
@ -1,3 +1,7 @@
|
|||
v1.0.386
|
||||
- Implemented Click-on Handlers for A-Axis DRO Entry (Bug #374)
|
||||
- Added direction (Along X or Y) support to Surfacing Wizard (Feature request #375)
|
||||
- Removed retired machines from profiles list (Issue #380)
|
||||
v1.0.385
|
||||
- Disable laser mode if set on machine profile, when activating Scribe toolhead
|
||||
- Updated Grbl Settings defaults for ACRO A1
|
||||
|
|
@ -15,8 +19,8 @@ v1.0.382:
|
|||
- Updated Theme
|
||||
- Updated SSL Certificates
|
||||
v1.0.381:
|
||||
- Added additional board support to Flashing tools
|
||||
- Fixed linebreak on realtime feedrate indicator
|
||||
- Added additional board support to Flashing tools
|
||||
- Updated esptool for Windows, Mac and Linux
|
||||
- Improved USB ID Descriptions handling
|
||||
- Added more grblHAL settings descriptions
|
||||
|
|
|
|||
|
|
@ -297,33 +297,7 @@ function grblPopulate() {
|
|||
</ul>
|
||||
</li>
|
||||
<li><a href="#" onclick="selectMachine('minimill');"><img
|
||||
src="img/mch/minimill.png" width="16px" /> OpenBuilds MiniMill</a></li>
|
||||
<li>
|
||||
<a href="#" class="dropdown-toggle"><img src="img/mch/sphinx55.png"
|
||||
width="16px" /> OpenBuilds Sphinx</a>
|
||||
<ul class="ribbon-dropdown" data-role="dropdown">
|
||||
<li onclick="selectMachine('sphinx55');"><a href="#"><img
|
||||
src="img/mch/sphinx55.png" width="16px" /> OpenBuilds Sphinx
|
||||
55</a></li>
|
||||
<li onclick="selectMachine('sphinx1050');"><a href="#"><img
|
||||
src="img/mch/sphinx1050.png" width="16px" /> OpenBuilds
|
||||
Sphinx 1050</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="dropdown-toggle"><img
|
||||
src="img/mch/workbee1010.png" width="16px" /> OpenBuilds WorkBee</a>
|
||||
<ul class="ribbon-dropdown" data-role="dropdown">
|
||||
<li onclick="selectMachine('workbee1010');"><a href="#"><img
|
||||
src="img/mch/workbee1010.png" width="16px" /> OpenBuilds
|
||||
WorkBee 1010</a></li>
|
||||
<li onclick="selectMachine('workbee1050');"><a href="#"><img
|
||||
src="img/mch/workbee1050.png" width="16px" /> OpenBuilds
|
||||
WorkBee 1050</a></li>
|
||||
<li onclick="selectMachine('workbee1510');"><a href="#"><img
|
||||
src="img/mch/workbee1510.png" width="16px" /> OpenBuilds
|
||||
WorkBee 1510</a></li>
|
||||
</ul>
|
||||
src="img/mch/minimill.png" width="16px" /> OpenBuilds MiniMill</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -293,6 +293,41 @@ $(document).ready(function() {
|
|||
});
|
||||
|
||||
|
||||
// A Axis DRO entry
|
||||
$("#aPosDro").click(function() {
|
||||
$("#aPos").hide()
|
||||
$("#aPosDro").addClass("drop-shadow");
|
||||
$("#aPosInput").show().focus().val(laststatus.machine.position.work.a)
|
||||
document.getElementById("aPosInput").select();
|
||||
});
|
||||
|
||||
$("#aPosInput").blur(function() {
|
||||
$("#aPos").show()
|
||||
$("#aPosDro").removeClass("drop-shadow");
|
||||
$("#aPosInput").hide()
|
||||
});
|
||||
|
||||
$('#aPosInput').on('keypress', function(e) {
|
||||
if (e.which === 13) {
|
||||
//Disable textbox to prevent multiple submit
|
||||
$(this).attr("disabled", "disabled");
|
||||
$("#aPos").show()
|
||||
$("#aPosInput").hide()
|
||||
//Enable the textbox again if needed.
|
||||
$(this).removeAttr("disabled");
|
||||
|
||||
if (e.shiftKey) {
|
||||
sendGcode("G21\nG10 P0 L20 A" + $("#aPosInput").val());
|
||||
} else {
|
||||
sendGcode("$J=G90 G21 A" + $("#aPosInput").val() + " F" + jogRateA);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
// End A-Axis DRO Entry
|
||||
|
||||
|
||||
$('#dist01').on('click', function(ev) {
|
||||
if (unit == "mm") {
|
||||
jogdistXYZ = 0.1;
|
||||
|
|
|
|||
|
|
@ -45,6 +45,16 @@ var surfacingWizardTemplate = `
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-2 pb-2 border-bottom bd-gray">
|
||||
<label class="cell-sm-6">Surface Direction</label>
|
||||
<div class="cell-sm-6">
|
||||
<select id="surfaceDirection" data-role="input" data-clear-button="false">
|
||||
<option value="X" selected>Along X-Axis</option>
|
||||
<option value="Y">Along Y-Axis</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-2">
|
||||
<label class="cell-sm-6">Cut Depth per Pass</label>
|
||||
<div class="cell-sm-6">
|
||||
|
|
@ -171,8 +181,7 @@ function populateSurfaceToolForm() {
|
|||
var $radios = $("input:radio[name=surfaceType]");
|
||||
$radios.filter("[value=" + data.surfaceType + "]").prop("checked", true);
|
||||
//Metro.dialog.open("#surfacingDialog");
|
||||
|
||||
|
||||
$('#surfaceDirection').val(data.surfaceDirection); // Restore surface direction
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -188,24 +197,45 @@ function createSurfaceGcode() {
|
|||
surfaceType: $("input[name='surfaceType']:checked").val(),
|
||||
surfaceRPM: $('#surfaceRPM').val(),
|
||||
surfaceCoolant: $('#surfaceCoolant').val(),
|
||||
surfaceFraming: $('#surfaceFraming').val()
|
||||
surfaceFraming: $('#surfaceFraming').val(),
|
||||
surfaceDirection: $('#surfaceDirection').val() // New dropdown value
|
||||
};
|
||||
|
||||
console.log(data);
|
||||
|
||||
if (data.surfaceFinalDepth > data.surfaceDepth) {
|
||||
console.log("multipass")
|
||||
console.log("multipass");
|
||||
} else if (data.surfaceFinalDepth == data.surfaceDepth || data.surfaceFinalDepth < data.surfaceDepth) {
|
||||
console.log("singlepass")
|
||||
data.surfaceFinalDepth = data.surfaceDepth
|
||||
console.log("singlepass");
|
||||
data.surfaceFinalDepth = data.surfaceDepth;
|
||||
}
|
||||
|
||||
localStorage.setItem("lastSurfacingTool", JSON.stringify(data));
|
||||
|
||||
var startpointX = 0 + data.surfaceDiameter / 2;
|
||||
var endpointX = data.surfaceX - data.surfaceDiameter / 2;
|
||||
|
||||
var startpointY = 0 + data.surfaceDiameter / 2;
|
||||
var endpointY = data.surfaceY - data.surfaceDiameter / 2;
|
||||
var startpoint, endpoint, primaryAxis, secondaryAxis;
|
||||
if (data.surfaceDirection === "X") {
|
||||
primaryAxis = "X";
|
||||
secondaryAxis = "Y";
|
||||
startpoint = {
|
||||
primary: 0 + data.surfaceDiameter / 2,
|
||||
secondary: 0 + data.surfaceDiameter / 2
|
||||
};
|
||||
endpoint = {
|
||||
primary: data.surfaceX - data.surfaceDiameter / 2,
|
||||
secondary: data.surfaceY - data.surfaceDiameter / 2
|
||||
};
|
||||
} else {
|
||||
primaryAxis = "Y";
|
||||
secondaryAxis = "X";
|
||||
startpoint = {
|
||||
primary: 0 + data.surfaceDiameter / 2,
|
||||
secondary: 0 + data.surfaceDiameter / 2
|
||||
};
|
||||
endpoint = {
|
||||
primary: data.surfaceY - data.surfaceDiameter / 2,
|
||||
secondary: data.surfaceX - data.surfaceDiameter / 2
|
||||
};
|
||||
}
|
||||
|
||||
var lineOver = data.surfaceDiameter * (data.surfaceStepover / 100);
|
||||
|
||||
|
|
@ -219,10 +249,10 @@ function createSurfaceGcode() {
|
|||
`%, Feedrate: ` +
|
||||
data.surfaceFeedrate +
|
||||
`mm/min
|
||||
; X: ` +
|
||||
data.surfaceX +
|
||||
`, Y: ` +
|
||||
data.surfaceY +
|
||||
; ` + primaryAxis + `: ` +
|
||||
(primaryAxis === "X" ? data.surfaceX : data.surfaceY) +
|
||||
`, ` + secondaryAxis + `: ` +
|
||||
(secondaryAxis === "X" ? data.surfaceX : data.surfaceY) +
|
||||
`, Z: ` +
|
||||
data.surfaceDepth +
|
||||
`
|
||||
|
|
@ -230,119 +260,68 @@ G54; Work Coordinates
|
|||
G21; mm-mode
|
||||
G90; Absolute Positioning
|
||||
M3 S` + data.surfaceRPM + `; Spindle On
|
||||
`
|
||||
`;
|
||||
|
||||
if (data.surfaceCoolant == "enabled") {
|
||||
gcode += `M8 ; Coolant On
|
||||
`
|
||||
`;
|
||||
}
|
||||
|
||||
gcode += `G4 P1.8; Wait for spindle to come up to speed
|
||||
G0 Z10 ; Move to Safe Height
|
||||
G0 X0 Y0; Move to origin position
|
||||
G0 ` + primaryAxis + `0 ` + secondaryAxis + `0; Move to origin position
|
||||
G1 F` +
|
||||
data.surfaceFeedrate + ` ; Set feedrate\n`;
|
||||
|
||||
// MULTIPASS
|
||||
for (q = data.surfaceDepth; q < data.surfaceFinalDepth + data.surfaceDepth; q += data.surfaceDepth) {
|
||||
if (q > data.surfaceFinalDepth) {
|
||||
var zval = -data.surfaceFinalDepth;
|
||||
} else {
|
||||
var zval = -q
|
||||
}
|
||||
console.log(q, zval)
|
||||
var zval = q > data.surfaceFinalDepth ? -data.surfaceFinalDepth : -q;
|
||||
console.log(q, zval);
|
||||
|
||||
gcode += `\nG0 ` + primaryAxis + startpoint.primary.toFixed(4) + ` ` + secondaryAxis + startpoint.secondary.toFixed(4) + ` Z10 ; Move to start Position
|
||||
`;
|
||||
gcode += `G1 ` + primaryAxis + startpoint.primary.toFixed(4) + ` ` + secondaryAxis + startpoint.secondary.toFixed(4) + ` Z` + zval + `; Plunge\n`;
|
||||
|
||||
var reverse = false;
|
||||
|
||||
if (!reverse) {
|
||||
gcode +=
|
||||
`\nG0 X` +
|
||||
startpointX.toFixed(4) +
|
||||
` Y` +
|
||||
startpointY.toFixed(4) +
|
||||
` Z10 ; Move to start Position
|
||||
G1 X` +
|
||||
startpointX.toFixed(4) +
|
||||
` Y` +
|
||||
startpointY.toFixed(4) +
|
||||
` Z` +
|
||||
zval +
|
||||
`; Plunge\n`;
|
||||
} else {
|
||||
gcode +=
|
||||
`\nG0 X` +
|
||||
endpointX.toFixed(4) +
|
||||
` Y` +
|
||||
startpointY.toFixed(4) +
|
||||
` Z10 ; Move to start Position
|
||||
G1 X` +
|
||||
endpointX.toFixed(4) +
|
||||
` Y` +
|
||||
startpointY.toFixed(4) +
|
||||
` Z` +
|
||||
zval +
|
||||
`Plunge \n`;
|
||||
}
|
||||
|
||||
for (i = startpointY; i.toFixed(4) < endpointY; i += lineOver) {
|
||||
for (i = startpoint.secondary; i.toFixed(4) < endpoint.secondary; i += lineOver) {
|
||||
if (!reverse) {
|
||||
gcode += `G1 Y` + i.toFixed(4) + `\n`;
|
||||
gcode += `G1 X` + startpointX.toFixed(4) + ` Y` + i.toFixed(4) + ` Z` + zval + `\n`;
|
||||
gcode += `G1 X` + endpointX.toFixed(4) + ` Y` + i.toFixed(4) + ` Z` + zval + `\n`;
|
||||
gcode += `G1 ` + secondaryAxis + i.toFixed(4) + `\n`;
|
||||
gcode += `G1 ` + primaryAxis + startpoint.primary.toFixed(4) + ` ` + secondaryAxis + i.toFixed(4) + ` Z` + zval + `\n`;
|
||||
gcode += `G1 ` + primaryAxis + endpoint.primary.toFixed(4) + ` ` + secondaryAxis + i.toFixed(4) + ` Z` + zval + `\n`;
|
||||
reverse = true;
|
||||
} else {
|
||||
gcode += `G1 Y` + i.toFixed(4) + `\n`;
|
||||
gcode += `G1 X` + endpointX.toFixed(4) + ` Y` + i.toFixed(4) + ` Z` + zval + `\n`;
|
||||
gcode += `G1 X` + startpointX.toFixed(4) + ` Y` + i.toFixed(4) + ` Z` + zval + `\n`;
|
||||
gcode += `G1 ` + secondaryAxis + i.toFixed(4) + `\n`;
|
||||
gcode += `G1 ` + primaryAxis + endpoint.primary.toFixed(4) + ` ` + secondaryAxis + i.toFixed(4) + ` Z` + zval + `\n`;
|
||||
gcode += `G1 ` + primaryAxis + startpoint.primary.toFixed(4) + ` ` + secondaryAxis + i.toFixed(4) + ` Z` + zval + `\n`;
|
||||
reverse = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!reverse) {
|
||||
gcode += `G1 Y` + endpointY.toFixed(4) + `\n`;
|
||||
gcode += `G1 X` + startpointX.toFixed(4) + ` Y` + endpointY.toFixed(4) + ` Z` + zval + `\n`;
|
||||
gcode += `G1 X` + endpointX.toFixed(4) + ` Y` + endpointY.toFixed(4) + ` Z` + zval + `\n`;
|
||||
reverse = true;
|
||||
} else {
|
||||
gcode += `G1 Y` + endpointY.toFixed(4) + `\n`;
|
||||
gcode += `G1 X` + endpointX.toFixed(4) + ` Y` + endpointY.toFixed(4) + ` Z` + zval + `\n`;
|
||||
gcode += `G1 X` + startpointX.toFixed(4) + ` Y` + endpointY.toFixed(4) + ` Z` + zval + `\n`;
|
||||
reverse = false;
|
||||
}
|
||||
|
||||
gcode += `G0 Z10; Pass complete, lifting to Z Safe height\n`;
|
||||
|
||||
// Framing Pass
|
||||
if (data.surfaceFraming == "enabled") {
|
||||
gcode += `; Framing pass\n`;
|
||||
gcode += `G0 X` + startpointX.toFixed(4) + ` Y` + startpointY.toFixed(4) + ` Z10\n`; // position at start point
|
||||
gcode += `G0 ` + primaryAxis + startpoint.primary.toFixed(4) + ` ` + secondaryAxis + startpoint.secondary.toFixed(4) + ` Z10\n`; // position at start point
|
||||
gcode += `G1 Z` + zval + `\n`; // plunge
|
||||
gcode += `G1 X` + startpointX.toFixed(4) + ` Y` + endpointY.toFixed(4) + ` Z` + zval + `\n`; // Cut side
|
||||
gcode += `G1 ` + primaryAxis + startpoint.primary.toFixed(4) + ` ` + secondaryAxis + endpoint.secondary.toFixed(4) + ` Z` + zval + `\n`; // Cut side
|
||||
gcode += `G0 Z10\n`;
|
||||
gcode += `G0 X` + endpointX.toFixed(4) + ` Y` + endpointY.toFixed(4) + `\n`; // position at start point
|
||||
gcode += `G0 ` + primaryAxis + endpoint.primary.toFixed(4) + ` ` + secondaryAxis + endpoint.secondary.toFixed(4) + `\n`; // position at start point
|
||||
gcode += `G1 Z` + zval + `\n`; // plunge
|
||||
gcode += `G1 X` + endpointX.toFixed(4) + ` Y` + startpointY.toFixed(4) + ` Z` + zval + `\n`; // Cut side
|
||||
gcode += `G1 ` + primaryAxis + endpoint.primary.toFixed(4) + ` ` + secondaryAxis + startpoint.secondary.toFixed(4) + ` Z` + zval + `\n`; // Cut side
|
||||
gcode += `G0 Z10\n`;
|
||||
gcode += `G0 X0 Y0\n`;
|
||||
gcode += `G0 ` + primaryAxis + `0 ` + secondaryAxis + `0\n`;
|
||||
}
|
||||
|
||||
}
|
||||
// END MULTIPASS
|
||||
|
||||
|
||||
|
||||
|
||||
gcode += `M5 S0\n`;
|
||||
|
||||
if (data.surfaceCoolant == "enabled") {
|
||||
gcode += `M9 ; Coolant Off`
|
||||
gcode += `M9 ; Coolant Off`;
|
||||
}
|
||||
|
||||
editor.session.setValue(gcode);
|
||||
parseGcodeInWebWorker(gcode)
|
||||
printLog("<span class='fg-red'>[ Surfacing / Flattening Wizard ] </span><span class='fg-green'>GCODE Loaded</span>")
|
||||
|
||||
// console.log(gcode);
|
||||
//
|
||||
// $("#gcode").html(gcode.replace(/(?:\r\n|\r|\n)/g, "<br>"));
|
||||
parseGcodeInWebWorker(gcode);
|
||||
printLog("<span class='fg-red'>[ Surfacing / Flattening Wizard ] </span><span class='fg-green'>GCODE Loaded</span>");
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "OpenBuildsCONTROL",
|
||||
"version": "1.0.385",
|
||||
"version": "1.0.386",
|
||||
"license": "AGPL-3.0",
|
||||
"description": "OpenBuildsCONTROL CNC Machine Host Software",
|
||||
"author": "github.com/openbuilds <support@openbuilds.com>",
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue