@@ -197,7 +197,7 @@ static void maybe_new_line(int sequence_number) {
197197
198198// das ist für die Vorschau
199199/* G_5_2/G_5_3*/
200- void NURBS_G5_FEED (int line_number, std::vector<NURBS_CONTROL_POINT> nurbs_control_points, unsigned int nurbs_order, int plane)
200+ void NURBS_G5_FEED (int line_number, std::vector<NURBS_CONTROL_POINT> nurbs_control_points, unsigned int nurbs_order, CANON_PLANE plane)
201201 {
202202 double u = 0.0 ;
203203 unsigned int n = nurbs_control_points.size () - 1 ;
@@ -210,15 +210,15 @@ void NURBS_G5_FEED(int line_number, std::vector<NURBS_CONTROL_POINT> nurbs_contr
210210 // printf("P1 X: %8.4f Y: %8.4f pos_x: %8.4f pos_y: %8.4f pos_z: %8.4f (F: %s L: %d)\n",P1.NURBS_X,P1.NURBS_Y,_pos_x,_pos_y,_pos_z,__FILE__,__LINE__);
211211
212212 // STRAIGHT_FEED(line_number, P1.X,P1.Y, _pos_z, _pos_a, _pos_b, _pos_c, _pos_u, _pos_v, _pos_w);
213- if (plane==CANON_PLANE_XY ) {
213+ if (plane==CANON_PLANE::XY ) {
214214 // printf("XY (F: %s L: %d)\n",__FILE__,__LINE__);
215215 STRAIGHT_FEED (line_number, P1.NURBS_X , P1.NURBS_Y , _pos_z, _pos_a, _pos_b, _pos_c, _pos_u, _pos_v, _pos_w); //
216216 }
217- if (plane==CANON_PLANE_YZ ) {
217+ if (plane==CANON_PLANE::YZ ) {
218218 // printf("YZ (F: %s L: %d)\n",__FILE__,__LINE__);
219219 STRAIGHT_FEED (line_number, _pos_x, P1.NURBS_X , P1.NURBS_Y , _pos_a, _pos_b, _pos_c, _pos_u, _pos_v, _pos_w); //
220220 }
221- if (plane==CANON_PLANE_XZ ) {
221+ if (plane==CANON_PLANE::XZ ) {
222222 // printf("XZ (F: %s L: %d)\n",__FILE__,__LINE__);
223223 STRAIGHT_FEED (line_number, P1.NURBS_Y , _pos_y, P1.NURBS_X , _pos_a, _pos_b, _pos_c, _pos_u, _pos_v, _pos_w); //
224224 }
@@ -228,21 +228,21 @@ void NURBS_G5_FEED(int line_number, std::vector<NURBS_CONTROL_POINT> nurbs_contr
228228 P1.NURBS_Y = nurbs_control_points[n].NURBS_Y ;
229229 // printf("Pn X: %8.4f Y: %8.4f pos_x: %8.4f pos_y: %8.4f pos_z: %8.4f (F: %s L: %d)\n",P1.X,P1.Y,_pos_x,_pos_y,_pos_z,__FILE__,__LINE__);
230230 // STRAIGHT_FEED(line_number, P1.X,P1.Y, _pos_z, _pos_a, _pos_b, _pos_c, _pos_u, _pos_v, _pos_w);
231- if (plane==CANON_PLANE_XY ) {
231+ if (plane==CANON_PLANE::XY ) {
232232 STRAIGHT_FEED (line_number, P1.NURBS_X , P1.NURBS_Y , _pos_z, _pos_a, _pos_b, _pos_c, _pos_u, _pos_v, _pos_w); //
233233 }
234- if (plane==CANON_PLANE_YZ ) {
234+ if (plane==CANON_PLANE::YZ ) {
235235 STRAIGHT_FEED (line_number, _pos_x, P1.NURBS_X , P1.NURBS_Y , _pos_a, _pos_b, _pos_c, _pos_u, _pos_v, _pos_w); //
236236 }
237- if (plane==CANON_PLANE_XZ ) {
237+ if (plane==CANON_PLANE::XZ ) {
238238 STRAIGHT_FEED (line_number, P1.NURBS_Y , _pos_y, P1.NURBS_X , _pos_a, _pos_b, _pos_c, _pos_u, _pos_v, _pos_w); //
239239 }
240240 knot_vector.clear ();
241241}
242242
243243/* G_6_2 L_option is unused */
244244// -----------------------------------------------------------------------------------------------------------------------------------------
245- void NURBS_G6_FEED (int line_number, std::vector<NURBS_G6_CONTROL_POINT> nurbs_control_points, unsigned int k, double feedrate, int L_option, int plane) { // (L_option: NICU, NICL, NICC see publication from Lo Valvo and Drago)
245+ void NURBS_G6_FEED (int line_number, std::vector<NURBS_G6_CONTROL_POINT> nurbs_control_points, unsigned int k, double feedrate, int L_option, CANON_PLANE plane) { // (L_option: NICU, NICL, NICC see publication from Lo Valvo and Drago)
246246 double u = 0.0 ;
247247 unsigned int n = nurbs_control_points.size () - 1 -k;
248248 double umax = nurbs_control_points[n+k].NURBS_K ;
@@ -256,27 +256,27 @@ void NURBS_G6_FEED(int line_number, std::vector<NURBS_G6_CONTROL_POINT> nurbs_co
256256 P1 = nurbs_G6_pointx (knot_vector[0 ],k,nurbs_control_points,knot_vector,A6);
257257 // printf("%.3d P1 X: %8.4f Y: %8.4f pos_x: %8.4f pos_y: %8.4f pos_z: %8.4f (F: %s L: %d)\n",line_number,P1.NURBS_X,P1.NURBS_Y,_pos_x,_pos_y,_pos_z,__FILE__,__LINE__);
258258 // STRAIGHT_FEED(line_number, P1.NURBS_X,P1.NURBS_Y, _pos_z, _pos_a, _pos_b, _pos_c, _pos_u, _pos_v, _pos_w);
259- if (plane==CANON_PLANE_XY ) {
259+ if (plane==CANON_PLANE::XY ) {
260260 STRAIGHT_FEED (line_number, P1.NURBS_X , P1.NURBS_Y , _pos_z, _pos_a, _pos_b, _pos_c, _pos_u, _pos_v, _pos_w);
261261 }
262- if (plane==CANON_PLANE_YZ ) {
262+ if (plane==CANON_PLANE::YZ ) {
263263 STRAIGHT_FEED (line_number, _pos_x, P1.NURBS_X , P1.NURBS_Y , _pos_a, _pos_b, _pos_c, _pos_u, _pos_v, _pos_w);
264264 }
265- if (plane==CANON_PLANE_XZ ) {
265+ if (plane==CANON_PLANE::XZ ) {
266266 STRAIGHT_FEED (line_number, P1.NURBS_Y , _pos_y, P1.NURBS_X , _pos_a, _pos_b, _pos_c, _pos_u, _pos_v, _pos_w);
267267 }
268268 u=0.1 ;
269269 while (u+umax/div < umax) {
270270 P1x = nurbs_G6_point_x (u+umax/div,k,nurbs_control_points,knot_vector);
271271 // printf("%.3d P1x X: %8.4f Y: %8.4f pos_x: %8.4f pos_y: %8.4f pos_z: %8.4f (F: %s L: %d)\n",line_number,P1x.NURBS_X,P1x.NURBS_Y,_pos_x,_pos_y,_pos_z,__FILE__,__LINE__);
272272 // STRAIGHT_FEED(line_number, P1x.NURBS_X,P1x.NURBS_Y, _pos_z, _pos_a, _pos_b, _pos_c, _pos_u, _pos_v, _pos_w);
273- if (plane==CANON_PLANE_XY ) {
273+ if (plane==CANON_PLANE::XY ) {
274274 STRAIGHT_FEED (line_number, P1x.NURBS_X , P1x.NURBS_Y , _pos_z, _pos_a, _pos_b, _pos_c, _pos_u, _pos_v, _pos_w);
275275 }
276- if (plane==CANON_PLANE_YZ ) {
276+ if (plane==CANON_PLANE::YZ ) {
277277 STRAIGHT_FEED (line_number, _pos_x, P1x.NURBS_X , P1x.NURBS_Y , _pos_a, _pos_b, _pos_c, _pos_u, _pos_v, _pos_w);
278278 }
279- if (plane==CANON_PLANE_XZ ) {
279+ if (plane==CANON_PLANE::XZ ) {
280280 STRAIGHT_FEED (line_number, P1x.NURBS_Y , _pos_y, P1x.NURBS_X , _pos_a, _pos_b, _pos_c, _pos_u, _pos_v, _pos_w);
281281 }
282282 u = u + umax/div;
@@ -285,13 +285,13 @@ void NURBS_G6_FEED(int line_number, std::vector<NURBS_G6_CONTROL_POINT> nurbs_co
285285 P1 = nurbs_G6_pointx (umax,k,nurbs_control_points,knot_vector,A6);
286286 // printf("%.3d P1 X: %8.4f Y: %8.4f pos_x: %8.4f pos_y: %8.4f pos_z: %8.4f (F: %s L: %d)\n",line_number,P1.NURBS_X,P1.NURBS_Y,_pos_x,_pos_y,_pos_z,__FILE__,__LINE__);
287287 // STRAIGHT_FEED(line_number, P1.NURBS_X,P1.NURBS_Y, _pos_z, _pos_a, _pos_b, _pos_c, _pos_u, _pos_v, _pos_w);
288- if (plane==CANON_PLANE_XY ) {
288+ if (plane==CANON_PLANE::XY ) {
289289 STRAIGHT_FEED (line_number, P1.NURBS_X , P1.NURBS_Y , _pos_z, _pos_a, _pos_b, _pos_c, _pos_u, _pos_v, _pos_w);
290290 }
291- if (plane==CANON_PLANE_YZ ) {
291+ if (plane==CANON_PLANE::YZ ) {
292292 STRAIGHT_FEED (line_number, _pos_x, P1.NURBS_X , P1.NURBS_Y , _pos_a, _pos_b, _pos_c, _pos_u, _pos_v, _pos_w);
293293 }
294- if (plane==CANON_PLANE_XZ ) {
294+ if (plane==CANON_PLANE::XZ ) {
295295 STRAIGHT_FEED (line_number, P1.NURBS_Y , _pos_y, P1.NURBS_X , _pos_a, _pos_b, _pos_c, _pos_u, _pos_v, _pos_w);
296296 }
297297 knot_vector.clear ();
@@ -692,7 +692,7 @@ double GET_EXTERNAL_FEED_RATE() { return 1; }
692692double GET_EXTERNAL_TRAVERSE_RATE () { return 0 ; }
693693int GET_EXTERNAL_FLOOD () { return 0 ; }
694694int GET_EXTERNAL_MIST () { return 0 ; }
695- CANON_PLANE GET_EXTERNAL_PLANE () { return CANON_PLANE_XY ; }
695+ CANON_PLANE GET_EXTERNAL_PLANE () { return CANON_PLANE::XY ; }
696696double GET_EXTERNAL_SPEED (int spindle) { return 0 ; }
697697void DISABLE_ADAPTIVE_FEED () {}
698698void ENABLE_ADAPTIVE_FEED () {}
0 commit comments