|
@@ -264,7 +264,7 @@ bool collision(const Points &pts_to_check, const Polylines &polylines_blocker, c
|
|
|
//convert to double to allow ² operation
|
|
|
double min_dist_square = (double)width * (double)width * 0.9 - SCALED_EPSILON;
|
|
|
Polyline better_polylines(pts_to_check);
|
|
|
- Points better_pts = better_polylines.equally_spaced_points(width / 2);
|
|
|
+ Points better_pts = better_polylines.equally_spaced_points(double(width / 2));
|
|
|
for (const Point &p : better_pts) {
|
|
|
for (const Polyline &poly2 : polylines_blocker) {
|
|
|
for (const Point &p2 : poly2.points) {
|
|
@@ -584,7 +584,7 @@ Fill::do_gap_fill(const ExPolygons &gapfill_areas, const FillParams ¶ms, Ext
|
|
|
double max = 2. * params.flow->scaled_width();
|
|
|
// collapse
|
|
|
//be sure we don't gapfill where the perimeters are already touching each other (negative spacing).
|
|
|
- min = std::max(min, double(Flow::new_from_spacing(EPSILON, params.flow->nozzle_diameter, params.flow->height, false).scaled_width()));
|
|
|
+ min = std::max(min, double(Flow::new_from_spacing((float)EPSILON, (float)params.flow->nozzle_diameter, (float)params.flow->height, false).scaled_width()));
|
|
|
//ExPolygons gapfill_areas_collapsed = diff_ex(
|
|
|
// offset2_ex(gapfill_areas, double(-min / 2), double(+min / 2)),
|
|
|
// offset2_ex(gapfill_areas, double(-max / 2), double(+max / 2)),
|
|
@@ -813,7 +813,7 @@ void mark_boundary_segments_touching_infill(
|
|
|
EdgeGrid::Grid grid;
|
|
|
grid.set_bbox(boundary_bbox);
|
|
|
// Inflate the bounding box by a thick line width.
|
|
|
- grid.create(boundary, clip_distance + scale_(10.));
|
|
|
+ grid.create(boundary, coord_t(clip_distance + scale_(10.)));
|
|
|
|
|
|
struct Visitor {
|
|
|
Visitor(const EdgeGrid::Grid &grid, const std::vector<Points> &boundary, std::vector<std::vector<ContourPointData>> &boundary_data, const double dist2_max) :
|
|
@@ -871,7 +871,7 @@ void mark_boundary_segments_touching_infill(
|
|
|
} visitor(grid, boundary, boundary_data, distance_colliding * distance_colliding);
|
|
|
|
|
|
BoundingBoxf bboxf(boundary_bbox.min.cast<double>(), boundary_bbox.max.cast<double>());
|
|
|
- bboxf.offset(- SCALED_EPSILON);
|
|
|
+ bboxf.offset(coordf_t(-SCALED_EPSILON));
|
|
|
|
|
|
for (const Polyline &polyline : infill) {
|
|
|
// Clip the infill polyline by the Eucledian distance along the polyline.
|
|
@@ -940,7 +940,7 @@ void Fill::connect_infill(Polylines &&infill_ordered, const ExPolygon &boundary_
|
|
|
assert(! boundary_src.contour.points.empty());
|
|
|
|
|
|
BoundingBox bbox = get_extents(boundary_src.contour);
|
|
|
- bbox.offset(SCALED_EPSILON);
|
|
|
+ bbox.offset(coordf_t(SCALED_EPSILON));
|
|
|
|
|
|
// 1) Add the end points of infill_ordered to boundary_src.
|
|
|
std::vector<Points> boundary;
|
|
@@ -1019,7 +1019,7 @@ void Fill::connect_infill(Polylines &&infill_ordered, const ExPolygon &boundary_
|
|
|
// Connection from end of one infill line to the start of another infill line.
|
|
|
//const float length_max = scale_(spacing);
|
|
|
// const float length_max = scale_((2. / params.density) * spacing);
|
|
|
- const float length_max = scale_((1000. / params.density) * spacing);
|
|
|
+ const coord_t length_max = scale_((1000. / params.density) * spacing);
|
|
|
std::vector<size_t> merged_with(infill_ordered.size());
|
|
|
for (size_t i = 0; i < merged_with.size(); ++ i)
|
|
|
merged_with[i] = i;
|
|
@@ -1049,10 +1049,10 @@ void Fill::connect_infill(Polylines &&infill_ordered, const ExPolygon &boundary_
|
|
|
}
|
|
|
assert(param_lo >= 0.f && param_lo <= param_end);
|
|
|
assert(param_hi >= 0.f && param_hi <= param_end);
|
|
|
- double len = param_hi - param_lo;
|
|
|
+ coord_t len = coord_t(param_hi - param_lo);
|
|
|
if (len < length_max)
|
|
|
connections_sorted.emplace_back(idx_chain - 1, len, reversed);
|
|
|
- len = param_lo + param_end - param_hi;
|
|
|
+ len = coord_t(param_lo + param_end - param_hi);
|
|
|
if (len < length_max)
|
|
|
connections_sorted.emplace_back(idx_chain - 1, len, ! reversed);
|
|
|
}
|