Skip to content

Commit

Permalink
Added cases for K Factor
Browse files Browse the repository at this point in the history
  • Loading branch information
will1742 committed Jun 28, 2021
1 parent 16e88e9 commit cd03fee
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions Haas_Next_Generation/haas vf2.cps
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ function getHaasProbingTypeBIDC(tool, use9023) {
if (tool.type == TOOL_MILLING_FORM) {
return formatCNumber(NO_PROBING, use9023);
}
formatCNumber(LEN_NON_ROT, use9023);
return formatCNumber(LEN_NON_ROT, use9023);
case HAAS_END_MILL:
return formatCNumber((tool.type == TOOL_MILLING_TAPERED ? LEN_ROT : LEN_DIA_ROT), use9023);
case HAAS_BALL_NOSE:
Expand All @@ -828,19 +828,24 @@ function getHaasKFactorBIDC(tool) {
switch (getHaasToolTypeBIDC(tool.type)) {
case HAAS_SHELL:
case HAAS_END_MILL:
// TODO: Add cases
return DEFAULT_HAAS_K_FACTOR;
if (tool.type == TOOL_BORING_BAR || tool.type == TOOL_MILLING_END_FLAT) {
return DEFAULT_HAAS_K_FACTOR;
}
if (tool.type == TOOL_MILLING_FACE && tool.taperAngle != 0) {
return NULL_HAAS_K_FACTOR;
}
return DEFAULT_HAAS_K_FACTOR + tool.cornerRadius;
case HAAS_BALL_NOSE:
if (tool.type == TOOL_MILLING_RADIUS) {
return NULL_HAAS_K_FACTOR;
}
return tool.diameter + DEFAULT_HAAS_K_FACTOR;
return DEFAULT_HAAS_K_FACTOR + tool.diameter;
case HAAS_CENTER:
case HAAS_PROBE:
case HAAS_DRILL:
case HAAS_TAP:
if (tool.type == TOOL_MILLING_THREAD) {
return tool.getThreadPitch() + DEFAULT_HAAS_K_FACTOR;
return DEFAULT_HAAS_K_FACTOR + tool.getThreadPitch();
}
return NULL_HAAS_K_FACTOR;
default:
Expand Down

0 comments on commit cd03fee

Please sign in to comment.