mirror of
https://github.com/QIDITECH/QIDISlicer.git
synced 2026-02-03 17:38:43 +03:00
update Detect narrow internal solid infill
This commit is contained in:
@@ -14,7 +14,8 @@
|
|||||||
#include "Polyline.hpp"
|
#include "Polyline.hpp"
|
||||||
#include "SVG.hpp"
|
#include "SVG.hpp"
|
||||||
#include "libslic3r.h"
|
#include "libslic3r.h"
|
||||||
|
//w11
|
||||||
|
#include "../PrintConfig.hpp"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <boost/log/trivial.hpp>
|
#include <boost/log/trivial.hpp>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
@@ -293,15 +294,16 @@ ThickPolylines make_fill_polylines(
|
|||||||
// svg.draw(vertical_lines, "black", scale_(0.1));
|
// svg.draw(vertical_lines, "black", scale_(0.1));
|
||||||
// svg.Close();
|
// svg.Close();
|
||||||
//w11
|
//w11
|
||||||
|
PrintObjectConfig config;
|
||||||
const coord_t threshold = scaled_spacing * 4.5;
|
const coord_t threshold = scaled_spacing * 4.5;
|
||||||
for (ExPolygon &ex_poly : gaps_for_additional_filling) {
|
for (ExPolygon &ex_poly : gaps_for_additional_filling) {
|
||||||
//w11
|
//w11
|
||||||
if (ex_poly.contour.length() < threshold) {
|
if (ex_poly.contour.length() < threshold && config.detect_narrow_internal_solid_infill) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
BoundingBox ex_bb = ex_poly.contour.bounding_box();
|
BoundingBox ex_bb = ex_poly.contour.bounding_box();
|
||||||
//w11
|
//w11
|
||||||
if (ex_bb.size().x() < threshold || ex_bb.size().y() < threshold) {
|
if ((ex_bb.size().x() < threshold || ex_bb.size().y() < threshold) && config.detect_narrow_internal_solid_infill) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
coord_t loops_count = (std::max(ex_bb.size().x(), ex_bb.size().y()) + scaled_spacing - 1) / scaled_spacing;
|
coord_t loops_count = (std::max(ex_bb.size().x(), ex_bb.size().y()) + scaled_spacing - 1) / scaled_spacing;
|
||||||
|
|||||||
Reference in New Issue
Block a user