Skip to content

Commit 48001ee

Browse files
v1.0.386
1 parent 469a8bb commit 48001ee

File tree

5 files changed

+111
-119
lines changed

5 files changed

+111
-119
lines changed

CHANGELOG.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
v1.0.386
2+
- Implemented Click-on Handlers for A-Axis DRO Entry (Bug #374)
3+
- Added direction (Along X or Y) support to Surfacing Wizard (Feature request #375)
4+
- Removed retired machines from profiles list (Issue #380)
15
v1.0.385
26
- Disable laser mode if set on machine profile, when activating Scribe toolhead
37
- Updated Grbl Settings defaults for ACRO A1
@@ -15,8 +19,8 @@ v1.0.382:
1519
- Updated Theme
1620
- Updated SSL Certificates
1721
v1.0.381:
18-
- Added additional board support to Flashing tools
1922
- Fixed linebreak on realtime feedrate indicator
23+
- Added additional board support to Flashing tools
2024
- Updated esptool for Windows, Mac and Linux
2125
- Improved USB ID Descriptions handling
2226
- Added more grblHAL settings descriptions

app/js/grbl-settings.js

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -297,33 +297,7 @@ function grblPopulate() {
297297
</ul>
298298
</li>
299299
<li><a href="#" onclick="selectMachine('minimill');"><img
300-
src="img/mch/minimill.png" width="16px" /> OpenBuilds MiniMill</a></li>
301-
<li>
302-
<a href="#" class="dropdown-toggle"><img src="img/mch/sphinx55.png"
303-
width="16px" /> OpenBuilds Sphinx</a>
304-
<ul class="ribbon-dropdown" data-role="dropdown">
305-
<li onclick="selectMachine('sphinx55');"><a href="#"><img
306-
src="img/mch/sphinx55.png" width="16px" /> OpenBuilds Sphinx
307-
55</a></li>
308-
<li onclick="selectMachine('sphinx1050');"><a href="#"><img
309-
src="img/mch/sphinx1050.png" width="16px" /> OpenBuilds
310-
Sphinx 1050</a></li>
311-
</ul>
312-
</li>
313-
<li>
314-
<a href="#" class="dropdown-toggle"><img
315-
src="img/mch/workbee1010.png" width="16px" /> OpenBuilds WorkBee</a>
316-
<ul class="ribbon-dropdown" data-role="dropdown">
317-
<li onclick="selectMachine('workbee1010');"><a href="#"><img
318-
src="img/mch/workbee1010.png" width="16px" /> OpenBuilds
319-
WorkBee 1010</a></li>
320-
<li onclick="selectMachine('workbee1050');"><a href="#"><img
321-
src="img/mch/workbee1050.png" width="16px" /> OpenBuilds
322-
WorkBee 1050</a></li>
323-
<li onclick="selectMachine('workbee1510');"><a href="#"><img
324-
src="img/mch/workbee1510.png" width="16px" /> OpenBuilds
325-
WorkBee 1510</a></li>
326-
</ul>
300+
src="img/mch/minimill.png" width="16px" /> OpenBuilds MiniMill</a>
327301
</li>
328302
</ul>
329303
</li>

app/js/jog.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,41 @@ $(document).ready(function() {
293293
});
294294

295295

296+
// A Axis DRO entry
297+
$("#aPosDro").click(function() {
298+
$("#aPos").hide()
299+
$("#aPosDro").addClass("drop-shadow");
300+
$("#aPosInput").show().focus().val(laststatus.machine.position.work.a)
301+
document.getElementById("aPosInput").select();
302+
});
303+
304+
$("#aPosInput").blur(function() {
305+
$("#aPos").show()
306+
$("#aPosDro").removeClass("drop-shadow");
307+
$("#aPosInput").hide()
308+
});
309+
310+
$('#aPosInput').on('keypress', function(e) {
311+
if (e.which === 13) {
312+
//Disable textbox to prevent multiple submit
313+
$(this).attr("disabled", "disabled");
314+
$("#aPos").show()
315+
$("#aPosInput").hide()
316+
//Enable the textbox again if needed.
317+
$(this).removeAttr("disabled");
318+
319+
if (e.shiftKey) {
320+
sendGcode("G21\nG10 P0 L20 A" + $("#aPosInput").val());
321+
} else {
322+
sendGcode("$J=G90 G21 A" + $("#aPosInput").val() + " F" + jogRateA);
323+
}
324+
325+
}
326+
});
327+
328+
// End A-Axis DRO Entry
329+
330+
296331
$('#dist01').on('click', function(ev) {
297332
if (unit == "mm") {
298333
jogdistXYZ = 0.1;

app/wizards/surfacing/surfacing.js

Lines changed: 69 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ var surfacingWizardTemplate = `
4545
</div>
4646
</div>
4747
48+
<div class="row mb-2 pb-2 border-bottom bd-gray">
49+
<label class="cell-sm-6">Surface Direction</label>
50+
<div class="cell-sm-6">
51+
<select id="surfaceDirection" data-role="input" data-clear-button="false">
52+
<option value="X" selected>Along X-Axis</option>
53+
<option value="Y">Along Y-Axis</option>
54+
</select>
55+
</div>
56+
</div>
57+
4858
<div class="row mb-2">
4959
<label class="cell-sm-6">Cut Depth per Pass</label>
5060
<div class="cell-sm-6">
@@ -171,8 +181,7 @@ function populateSurfaceToolForm() {
171181
var $radios = $("input:radio[name=surfaceType]");
172182
$radios.filter("[value=" + data.surfaceType + "]").prop("checked", true);
173183
//Metro.dialog.open("#surfacingDialog");
174-
175-
184+
$('#surfaceDirection').val(data.surfaceDirection); // Restore surface direction
176185

177186
}
178187

@@ -188,24 +197,45 @@ function createSurfaceGcode() {
188197
surfaceType: $("input[name='surfaceType']:checked").val(),
189198
surfaceRPM: $('#surfaceRPM').val(),
190199
surfaceCoolant: $('#surfaceCoolant').val(),
191-
surfaceFraming: $('#surfaceFraming').val()
200+
surfaceFraming: $('#surfaceFraming').val(),
201+
surfaceDirection: $('#surfaceDirection').val() // New dropdown value
192202
};
203+
193204
console.log(data);
194205

195206
if (data.surfaceFinalDepth > data.surfaceDepth) {
196-
console.log("multipass")
207+
console.log("multipass");
197208
} else if (data.surfaceFinalDepth == data.surfaceDepth || data.surfaceFinalDepth < data.surfaceDepth) {
198-
console.log("singlepass")
199-
data.surfaceFinalDepth = data.surfaceDepth
209+
console.log("singlepass");
210+
data.surfaceFinalDepth = data.surfaceDepth;
200211
}
201212

202213
localStorage.setItem("lastSurfacingTool", JSON.stringify(data));
203214

204-
var startpointX = 0 + data.surfaceDiameter / 2;
205-
var endpointX = data.surfaceX - data.surfaceDiameter / 2;
206-
207-
var startpointY = 0 + data.surfaceDiameter / 2;
208-
var endpointY = data.surfaceY - data.surfaceDiameter / 2;
215+
var startpoint, endpoint, primaryAxis, secondaryAxis;
216+
if (data.surfaceDirection === "X") {
217+
primaryAxis = "X";
218+
secondaryAxis = "Y";
219+
startpoint = {
220+
primary: 0 + data.surfaceDiameter / 2,
221+
secondary: 0 + data.surfaceDiameter / 2
222+
};
223+
endpoint = {
224+
primary: data.surfaceX - data.surfaceDiameter / 2,
225+
secondary: data.surfaceY - data.surfaceDiameter / 2
226+
};
227+
} else {
228+
primaryAxis = "Y";
229+
secondaryAxis = "X";
230+
startpoint = {
231+
primary: 0 + data.surfaceDiameter / 2,
232+
secondary: 0 + data.surfaceDiameter / 2
233+
};
234+
endpoint = {
235+
primary: data.surfaceY - data.surfaceDiameter / 2,
236+
secondary: data.surfaceX - data.surfaceDiameter / 2
237+
};
238+
}
209239

210240
var lineOver = data.surfaceDiameter * (data.surfaceStepover / 100);
211241

@@ -219,130 +249,79 @@ function createSurfaceGcode() {
219249
`%, Feedrate: ` +
220250
data.surfaceFeedrate +
221251
`mm/min
222-
; X: ` +
223-
data.surfaceX +
224-
`, Y: ` +
225-
data.surfaceY +
252+
; ` + primaryAxis + `: ` +
253+
(primaryAxis === "X" ? data.surfaceX : data.surfaceY) +
254+
`, ` + secondaryAxis + `: ` +
255+
(secondaryAxis === "X" ? data.surfaceX : data.surfaceY) +
226256
`, Z: ` +
227257
data.surfaceDepth +
228258
`
229259
G54; Work Coordinates
230260
G21; mm-mode
231261
G90; Absolute Positioning
232262
M3 S` + data.surfaceRPM + `; Spindle On
233-
`
263+
`;
234264

235265
if (data.surfaceCoolant == "enabled") {
236266
gcode += `M8 ; Coolant On
237-
`
267+
`;
238268
}
239269

240270
gcode += `G4 P1.8; Wait for spindle to come up to speed
241271
G0 Z10 ; Move to Safe Height
242-
G0 X0 Y0; Move to origin position
272+
G0 ` + primaryAxis + `0 ` + secondaryAxis + `0; Move to origin position
243273
G1 F` +
244274
data.surfaceFeedrate + ` ; Set feedrate\n`;
245275

246276
// MULTIPASS
247277
for (q = data.surfaceDepth; q < data.surfaceFinalDepth + data.surfaceDepth; q += data.surfaceDepth) {
248-
if (q > data.surfaceFinalDepth) {
249-
var zval = -data.surfaceFinalDepth;
250-
} else {
251-
var zval = -q
252-
}
253-
console.log(q, zval)
278+
var zval = q > data.surfaceFinalDepth ? -data.surfaceFinalDepth : -q;
279+
console.log(q, zval);
254280

255-
var reverse = false;
281+
gcode += `\nG0 ` + primaryAxis + startpoint.primary.toFixed(4) + ` ` + secondaryAxis + startpoint.secondary.toFixed(4) + ` Z10 ; Move to start Position
282+
`;
283+
gcode += `G1 ` + primaryAxis + startpoint.primary.toFixed(4) + ` ` + secondaryAxis + startpoint.secondary.toFixed(4) + ` Z` + zval + `; Plunge\n`;
256284

257-
if (!reverse) {
258-
gcode +=
259-
`\nG0 X` +
260-
startpointX.toFixed(4) +
261-
` Y` +
262-
startpointY.toFixed(4) +
263-
` Z10 ; Move to start Position
264-
G1 X` +
265-
startpointX.toFixed(4) +
266-
` Y` +
267-
startpointY.toFixed(4) +
268-
` Z` +
269-
zval +
270-
`; Plunge\n`;
271-
} else {
272-
gcode +=
273-
`\nG0 X` +
274-
endpointX.toFixed(4) +
275-
` Y` +
276-
startpointY.toFixed(4) +
277-
` Z10 ; Move to start Position
278-
G1 X` +
279-
endpointX.toFixed(4) +
280-
` Y` +
281-
startpointY.toFixed(4) +
282-
` Z` +
283-
zval +
284-
`Plunge \n`;
285-
}
285+
var reverse = false;
286286

287-
for (i = startpointY; i.toFixed(4) < endpointY; i += lineOver) {
287+
for (i = startpoint.secondary; i.toFixed(4) < endpoint.secondary; i += lineOver) {
288288
if (!reverse) {
289-
gcode += `G1 Y` + i.toFixed(4) + `\n`;
290-
gcode += `G1 X` + startpointX.toFixed(4) + ` Y` + i.toFixed(4) + ` Z` + zval + `\n`;
291-
gcode += `G1 X` + endpointX.toFixed(4) + ` Y` + i.toFixed(4) + ` Z` + zval + `\n`;
289+
gcode += `G1 ` + secondaryAxis + i.toFixed(4) + `\n`;
290+
gcode += `G1 ` + primaryAxis + startpoint.primary.toFixed(4) + ` ` + secondaryAxis + i.toFixed(4) + ` Z` + zval + `\n`;
291+
gcode += `G1 ` + primaryAxis + endpoint.primary.toFixed(4) + ` ` + secondaryAxis + i.toFixed(4) + ` Z` + zval + `\n`;
292292
reverse = true;
293293
} else {
294-
gcode += `G1 Y` + i.toFixed(4) + `\n`;
295-
gcode += `G1 X` + endpointX.toFixed(4) + ` Y` + i.toFixed(4) + ` Z` + zval + `\n`;
296-
gcode += `G1 X` + startpointX.toFixed(4) + ` Y` + i.toFixed(4) + ` Z` + zval + `\n`;
294+
gcode += `G1 ` + secondaryAxis + i.toFixed(4) + `\n`;
295+
gcode += `G1 ` + primaryAxis + endpoint.primary.toFixed(4) + ` ` + secondaryAxis + i.toFixed(4) + ` Z` + zval + `\n`;
296+
gcode += `G1 ` + primaryAxis + startpoint.primary.toFixed(4) + ` ` + secondaryAxis + i.toFixed(4) + ` Z` + zval + `\n`;
297297
reverse = false;
298298
}
299299
}
300300

301-
if (!reverse) {
302-
gcode += `G1 Y` + endpointY.toFixed(4) + `\n`;
303-
gcode += `G1 X` + startpointX.toFixed(4) + ` Y` + endpointY.toFixed(4) + ` Z` + zval + `\n`;
304-
gcode += `G1 X` + endpointX.toFixed(4) + ` Y` + endpointY.toFixed(4) + ` Z` + zval + `\n`;
305-
reverse = true;
306-
} else {
307-
gcode += `G1 Y` + endpointY.toFixed(4) + `\n`;
308-
gcode += `G1 X` + endpointX.toFixed(4) + ` Y` + endpointY.toFixed(4) + ` Z` + zval + `\n`;
309-
gcode += `G1 X` + startpointX.toFixed(4) + ` Y` + endpointY.toFixed(4) + ` Z` + zval + `\n`;
310-
reverse = false;
311-
}
312-
313301
gcode += `G0 Z10; Pass complete, lifting to Z Safe height\n`;
314302

315303
// Framing Pass
316304
if (data.surfaceFraming == "enabled") {
317305
gcode += `; Framing pass\n`;
318-
gcode += `G0 X` + startpointX.toFixed(4) + ` Y` + startpointY.toFixed(4) + ` Z10\n`; // position at start point
306+
gcode += `G0 ` + primaryAxis + startpoint.primary.toFixed(4) + ` ` + secondaryAxis + startpoint.secondary.toFixed(4) + ` Z10\n`; // position at start point
319307
gcode += `G1 Z` + zval + `\n`; // plunge
320-
gcode += `G1 X` + startpointX.toFixed(4) + ` Y` + endpointY.toFixed(4) + ` Z` + zval + `\n`; // Cut side
308+
gcode += `G1 ` + primaryAxis + startpoint.primary.toFixed(4) + ` ` + secondaryAxis + endpoint.secondary.toFixed(4) + ` Z` + zval + `\n`; // Cut side
321309
gcode += `G0 Z10\n`;
322-
gcode += `G0 X` + endpointX.toFixed(4) + ` Y` + endpointY.toFixed(4) + `\n`; // position at start point
310+
gcode += `G0 ` + primaryAxis + endpoint.primary.toFixed(4) + ` ` + secondaryAxis + endpoint.secondary.toFixed(4) + `\n`; // position at start point
323311
gcode += `G1 Z` + zval + `\n`; // plunge
324-
gcode += `G1 X` + endpointX.toFixed(4) + ` Y` + startpointY.toFixed(4) + ` Z` + zval + `\n`; // Cut side
312+
gcode += `G1 ` + primaryAxis + endpoint.primary.toFixed(4) + ` ` + secondaryAxis + startpoint.secondary.toFixed(4) + ` Z` + zval + `\n`; // Cut side
325313
gcode += `G0 Z10\n`;
326-
gcode += `G0 X0 Y0\n`;
314+
gcode += `G0 ` + primaryAxis + `0 ` + secondaryAxis + `0\n`;
327315
}
328-
329316
}
330-
// END MULTIPASS
331-
332-
333-
334317

335318
gcode += `M5 S0\n`;
336319

337320
if (data.surfaceCoolant == "enabled") {
338-
gcode += `M9 ; Coolant Off`
321+
gcode += `M9 ; Coolant Off`;
339322
}
340323

341324
editor.session.setValue(gcode);
342-
parseGcodeInWebWorker(gcode)
343-
printLog("<span class='fg-red'>[ Surfacing / Flattening Wizard ] </span><span class='fg-green'>GCODE Loaded</span>")
344-
345-
// console.log(gcode);
346-
//
347-
// $("#gcode").html(gcode.replace(/(?:\r\n|\r|\n)/g, "<br>"));
325+
parseGcodeInWebWorker(gcode);
326+
printLog("<span class='fg-red'>[ Surfacing / Flattening Wizard ] </span><span class='fg-green'>GCODE Loaded</span>");
348327
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "OpenBuildsCONTROL",
3-
"version": "1.0.385",
3+
"version": "1.0.386",
44
"license": "AGPL-3.0",
55
"description": "OpenBuildsCONTROL CNC Machine Host Software",
66
"author": "github.com/openbuilds <support@openbuilds.com>",

0 commit comments

Comments
 (0)