Skip to content

Commit

Permalink
QOL Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
will1742 committed Jul 22, 2021
1 parent 63b7791 commit 0a85e58
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Haas_Next_Generation/Bechtel VF2HP.cps
31 changes: 18 additions & 13 deletions Haas_Gantry_BIDC/Bechtel SR.cps
Original file line number Diff line number Diff line change
Expand Up @@ -850,21 +850,26 @@ function onOpen() {
var tools = getToolTable();
if (tools.getNumberOfTools() > 0) {
for (var i = 0; i < tools.getNumberOfTools(); ++i) {
// if (tool.number == 1 || tool.number == 2) {
// throw "Tool numbers 1 and 2 are not available."
// }
var tool = tools.getTool(i);
var comment = "T" + toolFormat.format(tool.number) + " " +
"D=" + xyzFormat.format(tool.diameter) + " " +
localize("CR") + "=" + xyzFormat.format(tool.cornerRadius);
if ((tool.taperAngle > 0) && (tool.taperAngle < Math.PI)) {
comment += " " + localize("TAPER") + "=" + taperFormat.format(tool.taperAngle) + localize("deg");
if (tool.number == 1 || tool.number == 2) {
throw "Tool numbers 1 and 2 are not available for use."
}
if (zRanges[tool.number]) {
comment += " - " + localize("ZMIN") + "=" + xyzFormat.format(zRanges[tool.number].getMinimum());
if (getHaasToolTypeBIDC(tool.type) == HAAS_PROBE) {
continue;
}
comment += " - " + getToolTypeName(tool.type);
//writeComment(comment);
writeComment("T" + toolFormat.format(tool.number) + ": " + tool.description);
//
// var comment = "T" + toolFormat.format(tool.number) + " " +
// "D=" + xyzFormat.format(tool.diameter) + " " +
// localize("CR") + "=" + xyzFormat.format(tool.cornerRadius);
// if ((tool.taperAngle > 0) && (tool.taperAngle < Math.PI)) {
// comment += " " + localize("TAPER") + "=" + taperFormat.format(tool.taperAngle) + localize("deg");
// }
// if (zRanges[tool.number]) {
// comment += " - " + localize("ZMIN") + "=" + xyzFormat.format(zRanges[tool.number].getMinimum());
// }
// comment += " - " + getToolTypeName(tool.type);
// writeComment(comment);
}
}
}
Expand Down Expand Up @@ -898,7 +903,7 @@ function onOpen() {
}
comment += " - " + getToolTypeName(tool.type);
writeComment(tool.description);
writeComment(comment);
//writeComment(comment);
if (staticProperties.optionallyMeasureToolsAtStart) {
var probeType = getHaasProbingTypeBIDC(tool, false)
if (!retracted) {
Expand Down

0 comments on commit 0a85e58

Please sign in to comment.