Skip to content

Commit

Permalink
Clearance is now a constant
Browse files Browse the repository at this point in the history
  • Loading branch information
will1742 committed Jul 14, 2021
1 parent 8ef0da4 commit f0f7f15
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Haas_Next_Generation/haas vf2.cps
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,8 @@ staticProperties = {
const DEFAULT_HAAS_K_FACTOR = 0.05;
const NULL_HAAS_K_FACTOR = 0;

const CLEARANCE_HEIGHT = 1;

var singleLineCoolant = false; // specifies to output multiple coolant codes in one line rather than in separate lines
// samples:
// {id: COOLANT_THROUGH_TOOL, on: 88, off: 89}
Expand Down Expand Up @@ -2579,8 +2581,8 @@ function onSection() {
writeComment("BEGIN VALIDATION SECTION");
// Added 06/15/21 | Gavin Williams | will1742
// Verifies tool-stock distance. Post fails if tool fails clearance standards
if (toolDistance < 1) {
throw "Error: Clearance height must be greater than 1 inch from stock";
if (toolDistance < CLEARANCE_HEIGHT) {
throw "Error: Clearance height must be " + CLEARANCE_HEIGHT + " or more inches from stock";
}

if (toolDistance == Infinity) {
Expand Down

0 comments on commit f0f7f15

Please sign in to comment.