mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 16:15:59 +08:00
Fixed most of issues, TODO expand by half extrusion width, smoothen sides, crashes
This commit is contained in:
parent
95ec803a06
commit
d843d0d981
@ -1570,11 +1570,8 @@ void PrintObject::bridge_over_infill()
|
|||||||
|
|
||||||
std::unordered_map<const LayerSlice *, std::vector<ModifiedSurface>> expanded_briding_surfaces;
|
std::unordered_map<const LayerSlice *, std::vector<ModifiedSurface>> expanded_briding_surfaces;
|
||||||
|
|
||||||
// tbb::parallel_for(tbb::blocked_range<size_t>(0, this->layers().size()), [po = this,
|
tbb::parallel_for(tbb::blocked_range<size_t>(0, this->layers().size()), [po = this,
|
||||||
// &expanded_briding_surfaces](tbb::blocked_range<size_t> r) {
|
&expanded_briding_surfaces](tbb::blocked_range<size_t> r) {
|
||||||
auto r = tbb::blocked_range<size_t>{0, this->layer_count()};
|
|
||||||
auto po = this;
|
|
||||||
|
|
||||||
for (size_t lidx = r.begin(); lidx < r.end(); lidx++) {
|
for (size_t lidx = r.begin(); lidx < r.end(); lidx++) {
|
||||||
const Layer *layer = po->get_layer(lidx);
|
const Layer *layer = po->get_layer(lidx);
|
||||||
|
|
||||||
@ -1601,7 +1598,7 @@ void PrintObject::bridge_over_infill()
|
|||||||
//remove very small solid infills, usually not worth it and many of them may not even contain extrusions in the end.
|
//remove very small solid infills, usually not worth it and many of them may not even contain extrusions in the end.
|
||||||
void(std::remove_if(region_internal_solids.begin(), region_internal_solids.end(), [region](const Surface *s) {
|
void(std::remove_if(region_internal_solids.begin(), region_internal_solids.end(), [region](const Surface *s) {
|
||||||
float min_width = float(region->bridging_flow(frSolidInfill).scaled_width()) * 3.f;
|
float min_width = float(region->bridging_flow(frSolidInfill).scaled_width()) * 3.f;
|
||||||
return opening_ex({s->expolygon}, min_width).empty();
|
return offset_ex({s->expolygon}, -min_width).empty();
|
||||||
}));
|
}));
|
||||||
if (!region_internal_solids.empty()) {
|
if (!region_internal_solids.empty()) {
|
||||||
max_bridge_flow_height[&slice] = std::max(max_bridge_flow_height[&slice],
|
max_bridge_flow_height[&slice] = std::max(max_bridge_flow_height[&slice],
|
||||||
@ -1736,7 +1733,7 @@ void PrintObject::bridge_over_infill()
|
|||||||
if (angle > PI) {
|
if (angle > PI) {
|
||||||
angle -= PI;
|
angle -= PI;
|
||||||
}
|
}
|
||||||
angle -= PI * 0.5;
|
angle += PI * 0.5;
|
||||||
directions_with_distances.emplace_back(angle, distance);
|
directions_with_distances.emplace_back(angle, distance);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1757,10 +1754,6 @@ void PrintObject::bridge_over_infill()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO maybe get extens of rotated max_area, then fill with vertical lines, make AABB tree rotated for anchors and
|
|
||||||
// walls and also
|
|
||||||
// for bridged area
|
|
||||||
// then cut off the vertical lines, compose the final polygon, and rotate back
|
|
||||||
auto lines_rotate = [](Lines &lines, double cos_angle, double sin_angle) {
|
auto lines_rotate = [](Lines &lines, double cos_angle, double sin_angle) {
|
||||||
for (Line &l : lines) {
|
for (Line &l : lines) {
|
||||||
double ax = double(l.a.x());
|
double ax = double(l.a.x());
|
||||||
@ -1932,7 +1925,7 @@ void PrintObject::bridge_over_infill()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// });
|
});
|
||||||
|
|
||||||
BOOST_LOG_TRIVIAL(info) << "Bridge over infill - Directions and expanded surfaces computed" << log_memory_info();
|
BOOST_LOG_TRIVIAL(info) << "Bridge over infill - Directions and expanded surfaces computed" << log_memory_info();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user