|
@@ -194,7 +194,7 @@ mesh_index_pair find_closest_circle_to_print(const float &X, const float &Y) {
|
194
|
194
|
|
195
|
195
|
for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) {
|
196
|
196
|
for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++) {
|
197
|
|
- if (!is_bit_set(circle_flags, i, j)) {
|
|
197
|
+ if (!is_bitmap_set(circle_flags, i, j)) {
|
198
|
198
|
const float mx = _GET_MESH_X(i), // We found a circle that needs to be printed
|
199
|
199
|
my = _GET_MESH_Y(j);
|
200
|
200
|
|
|
@@ -220,7 +220,7 @@ mesh_index_pair find_closest_circle_to_print(const float &X, const float &Y) {
|
220
|
220
|
}
|
221
|
221
|
}
|
222
|
222
|
}
|
223
|
|
- bit_set(circle_flags, return_val.x_index, return_val.y_index); // Mark this location as done.
|
|
223
|
+ bitmap_set(circle_flags, return_val.x_index, return_val.y_index); // Mark this location as done.
|
224
|
224
|
return return_val;
|
225
|
225
|
}
|
226
|
226
|
|
|
@@ -348,8 +348,8 @@ inline bool look_for_lines_to_connect() {
|
348
|
348
|
if (i < GRID_MAX_POINTS_X) { // We can't connect to anything to the right than GRID_MAX_POINTS_X.
|
349
|
349
|
// This is already a half circle because we are at the edge of the bed.
|
350
|
350
|
|
351
|
|
- if (is_bit_set(circle_flags, i, j) && is_bit_set(circle_flags, i + 1, j)) { // check if we can do a line to the left
|
352
|
|
- if (!is_bit_set(horizontal_mesh_line_flags, i, j)) {
|
|
351
|
+ if (is_bitmap_set(circle_flags, i, j) && is_bitmap_set(circle_flags, i + 1, j)) { // check if we can do a line to the left
|
|
352
|
+ if (!is_bitmap_set(horizontal_mesh_line_flags, i, j)) {
|
353
|
353
|
|
354
|
354
|
//
|
355
|
355
|
// We found two circles that need a horizontal line to connect them
|
|
@@ -376,15 +376,15 @@ inline bool look_for_lines_to_connect() {
|
376
|
376
|
|
377
|
377
|
print_line_from_here_to_there(sx, sy, g26_layer_height, ex, ey, g26_layer_height);
|
378
|
378
|
}
|
379
|
|
- bit_set(horizontal_mesh_line_flags, i, j); // Mark it as done so we don't do it again, even if we skipped it
|
|
379
|
+ bitmap_set(horizontal_mesh_line_flags, i, j); // Mark it as done so we don't do it again, even if we skipped it
|
380
|
380
|
}
|
381
|
381
|
}
|
382
|
382
|
|
383
|
383
|
if (j < GRID_MAX_POINTS_Y) { // We can't connect to anything further back than GRID_MAX_POINTS_Y.
|
384
|
384
|
// This is already a half circle because we are at the edge of the bed.
|
385
|
385
|
|
386
|
|
- if (is_bit_set(circle_flags, i, j) && is_bit_set(circle_flags, i, j + 1)) { // check if we can do a line straight down
|
387
|
|
- if (!is_bit_set( vertical_mesh_line_flags, i, j)) {
|
|
386
|
+ if (is_bitmap_set(circle_flags, i, j) && is_bitmap_set(circle_flags, i, j + 1)) { // check if we can do a line straight down
|
|
387
|
+ if (!is_bitmap_set( vertical_mesh_line_flags, i, j)) {
|
388
|
388
|
//
|
389
|
389
|
// We found two circles that need a vertical line to connect them
|
390
|
390
|
// Print it!
|
|
@@ -412,7 +412,7 @@ inline bool look_for_lines_to_connect() {
|
412
|
412
|
}
|
413
|
413
|
print_line_from_here_to_there(sx, sy, g26_layer_height, ex, ey, g26_layer_height);
|
414
|
414
|
}
|
415
|
|
- bit_set(vertical_mesh_line_flags, i, j); // Mark it as done so we don't do it again, even if skipped
|
|
415
|
+ bitmap_set(vertical_mesh_line_flags, i, j); // Mark it as done so we don't do it again, even if skipped
|
416
|
416
|
}
|
417
|
417
|
}
|
418
|
418
|
}
|