|
|
|
|
6456
|
set_current_to_destination();
|
6456
|
set_current_to_destination();
|
6457
|
return;
|
6457
|
return;
|
6458
|
}
|
6458
|
}
|
6459
|
- float nx, ny, ne, normalized_dist;
|
|
|
|
|
6459
|
+ float nx, ny, nz, ne, normalized_dist;
|
6460
|
if (ix > pix && TEST(x_splits, ix)) {
|
6460
|
if (ix > pix && TEST(x_splits, ix)) {
|
6461
|
nx = mbl.get_x(ix);
|
6461
|
nx = mbl.get_x(ix);
|
6462
|
normalized_dist = (nx - current_position[X_AXIS]) / (x - current_position[X_AXIS]);
|
6462
|
normalized_dist = (nx - current_position[X_AXIS]) / (x - current_position[X_AXIS]);
|
6463
|
ny = current_position[Y_AXIS] + (y - current_position[Y_AXIS]) * normalized_dist;
|
6463
|
ny = current_position[Y_AXIS] + (y - current_position[Y_AXIS]) * normalized_dist;
|
|
|
6464
|
+ nz = current_position[Z_AXIS] + (z - current_position[Z_AXIS]) * normalized_dist;
|
6464
|
ne = current_position[E_AXIS] + (e - current_position[E_AXIS]) * normalized_dist;
|
6465
|
ne = current_position[E_AXIS] + (e - current_position[E_AXIS]) * normalized_dist;
|
6465
|
CBI(x_splits, ix);
|
6466
|
CBI(x_splits, ix);
|
6466
|
}
|
6467
|
}
|
|
|
|
|
6468
|
nx = mbl.get_x(pix);
|
6469
|
nx = mbl.get_x(pix);
|
6469
|
normalized_dist = (nx - current_position[X_AXIS]) / (x - current_position[X_AXIS]);
|
6470
|
normalized_dist = (nx - current_position[X_AXIS]) / (x - current_position[X_AXIS]);
|
6470
|
ny = current_position[Y_AXIS] + (y - current_position[Y_AXIS]) * normalized_dist;
|
6471
|
ny = current_position[Y_AXIS] + (y - current_position[Y_AXIS]) * normalized_dist;
|
|
|
6472
|
+ nz = current_position[Z_AXIS] + (z - current_position[Z_AXIS]) * normalized_dist;
|
6471
|
ne = current_position[E_AXIS] + (e - current_position[E_AXIS]) * normalized_dist;
|
6473
|
ne = current_position[E_AXIS] + (e - current_position[E_AXIS]) * normalized_dist;
|
6472
|
CBI(x_splits, pix);
|
6474
|
CBI(x_splits, pix);
|
6473
|
}
|
6475
|
}
|
|
|
|
|
6475
|
ny = mbl.get_y(iy);
|
6477
|
ny = mbl.get_y(iy);
|
6476
|
normalized_dist = (ny - current_position[Y_AXIS]) / (y - current_position[Y_AXIS]);
|
6478
|
normalized_dist = (ny - current_position[Y_AXIS]) / (y - current_position[Y_AXIS]);
|
6477
|
nx = current_position[X_AXIS] + (x - current_position[X_AXIS]) * normalized_dist;
|
6479
|
nx = current_position[X_AXIS] + (x - current_position[X_AXIS]) * normalized_dist;
|
|
|
6480
|
+ nz = current_position[Z_AXIS] + (z - current_position[Z_AXIS]) * normalized_dist;
|
6478
|
ne = current_position[E_AXIS] + (e - current_position[E_AXIS]) * normalized_dist;
|
6481
|
ne = current_position[E_AXIS] + (e - current_position[E_AXIS]) * normalized_dist;
|
6479
|
CBI(y_splits, iy);
|
6482
|
CBI(y_splits, iy);
|
6480
|
}
|
6483
|
}
|
|
|
|
|
6482
|
ny = mbl.get_y(piy);
|
6485
|
ny = mbl.get_y(piy);
|
6483
|
normalized_dist = (ny - current_position[Y_AXIS]) / (y - current_position[Y_AXIS]);
|
6486
|
normalized_dist = (ny - current_position[Y_AXIS]) / (y - current_position[Y_AXIS]);
|
6484
|
nx = current_position[X_AXIS] + (x - current_position[X_AXIS]) * normalized_dist;
|
6487
|
nx = current_position[X_AXIS] + (x - current_position[X_AXIS]) * normalized_dist;
|
|
|
6488
|
+ nz = current_position[Z_AXIS] + (z - current_position[Z_AXIS]) * normalized_dist;
|
6485
|
ne = current_position[E_AXIS] + (e - current_position[E_AXIS]) * normalized_dist;
|
6489
|
ne = current_position[E_AXIS] + (e - current_position[E_AXIS]) * normalized_dist;
|
6486
|
CBI(y_splits, piy);
|
6490
|
CBI(y_splits, piy);
|
6487
|
}
|
6491
|
}
|
|
|
|
|
6494
|
// Do the split and look for more borders
|
6498
|
// Do the split and look for more borders
|
6495
|
destination[X_AXIS] = nx;
|
6499
|
destination[X_AXIS] = nx;
|
6496
|
destination[Y_AXIS] = ny;
|
6500
|
destination[Y_AXIS] = ny;
|
|
|
6501
|
+ destination[Z_AXIS] = nz;
|
6497
|
destination[E_AXIS] = ne;
|
6502
|
destination[E_AXIS] = ne;
|
6498
|
- mesh_plan_buffer_line(nx, ny, z, ne, feed_rate, extruder, x_splits, y_splits);
|
|
|
|
|
6503
|
+ mesh_plan_buffer_line(nx, ny, nz, ne, feed_rate, extruder, x_splits, y_splits);
|
6499
|
destination[X_AXIS] = x;
|
6504
|
destination[X_AXIS] = x;
|
6500
|
destination[Y_AXIS] = y;
|
6505
|
destination[Y_AXIS] = y;
|
|
|
6506
|
+ destination[Z_AXIS] = z;
|
6501
|
destination[E_AXIS] = e;
|
6507
|
destination[E_AXIS] = e;
|
6502
|
mesh_plan_buffer_line(x, y, z, e, feed_rate, extruder, x_splits, y_splits);
|
6508
|
mesh_plan_buffer_line(x, y, z, e, feed_rate, extruder, x_splits, y_splits);
|
6503
|
}
|
6509
|
}
|