We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 844045e + 0982fdb commit 1f3ec37Copy full SHA for 1f3ec37
3 files changed
src/emc/rs274ngc/interp_g7x.cc
@@ -1191,8 +1191,24 @@ int Interp::convert_g7x(int mode,
1191
try {
1192
switch(cycle) {
1193
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;
+ case 71:
+ 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
1207
1208
1209
1210
+ path.do_g72(&motion,subcycle,x,z,u,w,d,i,r);
1211
1212
}
1213
} catch(std::string &s) {
1214
ERS("G7X error: %s", s.c_str());
tests/interp/g72-missing-iteration/expected
@@ -89,7 +89,7 @@
89
N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -38.9000, 0.0000, 0.0000, 0.0000)
90
N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -39.0000, 0.0000, 0.0000, 0.0000)
91
N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -40.0000, 0.0000, 0.0000, 0.0000)
92
- N..... STRAIGHT_FEED(100.0000, 0.0000, -39.9990, 0.0000, 0.0000, 0.0000)
+ N..... STRAIGHT_FEED(100.0000, 0.0000, -40.0000, 0.0000, 0.0000, 0.0000)
93
N..... STRAIGHT_FEED(100.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
94
N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
95
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
tests/interp/g72-missing-iteration/xfail
0 commit comments