Skip to content

Commit 03793cc

Browse files
mark-v-dpetterreinholdtsen
authored andcommitted
Corrected G72 behaviour with no axis movement.
Fixes #707
1 parent 844045e commit 03793cc

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

src/emc/rs274ngc/interp_g7x.cc

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,8 +1191,24 @@ int Interp::convert_g7x(int mode,
11911191
try {
11921192
switch(cycle) {
11931193
case 70: path.do_g70(&motion,x,z,d,e,p); break;
1194-
case 71: path.do_g71(&motion,subcycle,x,z,u,w,d,i,r); break;
1195-
case 72: path.do_g72(&motion,subcycle,x,z,u,w,d,i,r); break;
1194+
case 71:
1195+
if(x!=imag(start)) {
1196+
std::complex<double> end{real(start),x};
1197+
path.emplace_back(std::make_unique<straight_segment>(
1198+
start, end
1199+
));
1200+
}
1201+
path.do_g71(&motion,subcycle,x,z,u,w,d,i,r);
1202+
break;
1203+
case 72:
1204+
if(z!=real(start)) {
1205+
std::complex<double> end{z,imag(start)};
1206+
path.emplace_back(std::make_unique<straight_segment>(
1207+
start, end
1208+
));
1209+
}
1210+
path.do_g72(&motion,subcycle,x,z,u,w,d,i,r);
1211+
break;
11961212
}
11971213
} catch(std::string &s) {
11981214
ERS("G7X error: %s", s.c_str());

0 commit comments

Comments
 (0)