Merge branch 'master_250' (NO CONFLICTS FIXED):

CONFLICT (content): Merge conflict in resources/profiles/PrusaResearch.idx
CONFLICT (content): Merge conflict in resources/profiles/PrusaResearch.ini
CONFLICT (content): Merge conflict in src/libslic3r/CMakeLists.txt
CONFLICT (content): Merge conflict in src/libslic3r/Fill/Fill.cpp
CONFLICT (content): Merge conflict in src/libslic3r/GCode.cpp
CONFLICT (content): Merge conflict in src/libslic3r/GCode.hpp
CONFLICT (content): Merge conflict in src/libslic3r/GCode/GCodeProcessor.cpp
CONFLICT (content): Merge conflict in src/libslic3r/GCode/GCodeProcessor.hpp
CONFLICT (content): Merge conflict in src/libslic3r/GCode/SeamPlacer.cpp
CONFLICT (content): Merge conflict in src/libslic3r/GCode/SeamPlacer.hpp
CONFLICT (add/add): Merge conflict in src/libslic3r/Geometry/Curves.hpp
CONFLICT (content): Merge conflict in src/libslic3r/PerimeterGenerator.cpp
CONFLICT (content): Merge conflict in src/libslic3r/Point.hpp
CONFLICT (content): Merge conflict in src/libslic3r/PrintConfig.hpp
CONFLICT (content): Merge conflict in src/slic3r/GUI/ConfigWizard.cpp
CONFLICT (content): Merge conflict in src/slic3r/GUI/GCodeViewer.cpp
CONFLICT (content): Merge conflict in src/slic3r/GUI/GLCanvas3D.cpp
CONFLICT (content): Merge conflict in src/slic3r/GUI/GUI_App.cpp
CONFLICT (content): Merge conflict in src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp
CONFLICT (content): Merge conflict in src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp
CONFLICT (content): Merge conflict in src/slic3r/Utils/FixModelByWin10.cpp
CONFLICT (modify/delete): t/perimeters.t deleted in HEAD and modified in master_250.  Version master_250 of t/perimeters.t left in tree.
CONFLICT (content): Merge conflict in tests/fff_print/CMakeLists.txt
CONFLICT (content): Merge conflict in tests/fff_print/test_fill.cpp
CONFLICT (content): Merge conflict in version.inc
CONFLICT (modify/delete): xs/xsp/PerimeterGenerator.xsp deleted in HEAD and modified in master_250.  Version master_250 of xs/xsp/PerimeterGenerator.xsp left in tree.
This commit is contained in:
Lukas Matena 2022-06-29 14:34:55 +02:00
commit b61714bb3e
152 changed files with 86092 additions and 45493 deletions
src/libslic3r/Fill

View file

@ -8,10 +8,15 @@
#include "../Print.hpp"
#include "../PrintConfig.hpp"
#include "../Surface.hpp"
#include "../PerimeterGenerator.hpp"
#include "FillBase.hpp"
#include "FillRectilinear.hpp"
#include "FillLightning.hpp"
<<<<<<< HEAD
=======
#include "FillConcentric.hpp"
>>>>>>> master_250
namespace Slic3r {
@ -329,9 +334,10 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive:
// this->export_region_fill_surfaces_to_svg_debug("10_fill-initial");
#endif /* SLIC3R_DEBUG_SLICE_PROCESSING */
std::vector<SurfaceFill> surface_fills = group_fills(*this);
const Slic3r::BoundingBox bbox = this->object()->bounding_box();
const auto resolution = this->object()->print()->config().gcode_resolution.value;
std::vector<SurfaceFill> surface_fills = group_fills(*this);
const Slic3r::BoundingBox bbox = this->object()->bounding_box();
const auto resolution = this->object()->print()->config().gcode_resolution.value;
const auto perimeter_generator = this->object()->config().perimeter_generator;
#ifdef SLIC3R_DEBUG_SLICE_PROCESSING
{
@ -352,6 +358,16 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive:
if (surface_fill.params.pattern == ipLightning)
dynamic_cast<FillLightning::Filler*>(f.get())->generator = lightning_generator;
<<<<<<< HEAD
=======
if (perimeter_generator.value == PerimeterGeneratorType::Arachne && surface_fill.params.pattern == ipConcentric) {
FillConcentric *fill_concentric = dynamic_cast<FillConcentric *>(f.get());
assert(fill_concentric != nullptr);
fill_concentric->print_config = &this->object()->print()->config();
fill_concentric->print_object_config = &this->object()->config();
}
>>>>>>> master_250
// calculate flow spacing for infill pattern generation
bool using_internal_flow = ! surface_fill.surface.is_solid() && ! surface_fill.params.bridge;
double link_max_length = 0.;
@ -372,23 +388,28 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive:
// apply half spacing using this flow's own spacing and generate infill
FillParams params;
params.density = float(0.01 * surface_fill.params.density);
params.dont_adjust = false; // surface_fill.params.dont_adjust;
params.density = float(0.01 * surface_fill.params.density);
params.dont_adjust = false; // surface_fill.params.dont_adjust;
params.anchor_length = surface_fill.params.anchor_length;
params.anchor_length_max = surface_fill.params.anchor_length_max;
params.resolution = resolution;
params.anchor_length_max = surface_fill.params.anchor_length_max;
params.resolution = resolution;
params.use_arachne = perimeter_generator == PerimeterGeneratorType::Arachne && surface_fill.params.pattern == ipConcentric;
for (ExPolygon &expoly : surface_fill.expolygons) {
// Spacing is modified by the filler to indicate adjustments. Reset it for each expolygon.
f->spacing = surface_fill.params.spacing;
surface_fill.surface.expolygon = std::move(expoly);
Polylines polylines;
Polylines polylines;
ThickPolylines thick_polylines;
try {
polylines = f->fill_surface(&surface_fill.surface, params);
if (params.use_arachne)
thick_polylines = f->fill_surface_arachne(&surface_fill.surface, params);
else
polylines = f->fill_surface(&surface_fill.surface, params);
} catch (InfillFailedException &) {
}
if (! polylines.empty()) {
// calculate actual flow from spacing (which might have been adjusted by the infill
if (!polylines.empty() || !thick_polylines.empty()) {
// calculate actual flow from spacing (which might have been adjusted by the infill
// pattern generator)
double flow_mm3_per_mm = surface_fill.params.flow.mm3_per_mm();
double flow_width = surface_fill.params.flow.width();
@ -406,10 +427,28 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive:
m_regions[surface_fill.region_id]->fills.entities.push_back(eec = new ExtrusionEntityCollection());
// Only concentric fills are not sorted.
eec->no_sort = f->no_sort();
extrusion_entities_append_paths(
eec->entities, std::move(polylines),
surface_fill.params.extrusion_role,
flow_mm3_per_mm, float(flow_width), surface_fill.params.flow.height());
if (params.use_arachne) {
for (const ThickPolyline &thick_polyline : thick_polylines) {
Flow new_flow = surface_fill.params.flow.with_spacing(float(f->spacing));
ExtrusionPaths paths = thick_polyline_to_extrusion_paths(thick_polyline, surface_fill.params.extrusion_role, new_flow, scaled<float>(0.05), 0);
// Append paths to collection.
if (!paths.empty()) {
if (paths.front().first_point() == paths.back().last_point())
eec->entities.emplace_back(new ExtrusionLoop(std::move(paths)));
else
for (ExtrusionPath &path : paths)
eec->entities.emplace_back(new ExtrusionPath(std::move(path)));
}
}
thick_polylines.clear();
} else {
extrusion_entities_append_paths(
eec->entities, std::move(polylines),
surface_fill.params.extrusion_role,
flow_mm3_per_mm, float(flow_width), surface_fill.params.flow.height());
}
}
}
}
@ -618,6 +657,7 @@ void Layer::make_ironing()
surface_fill.expolygon = std::move(expoly);
Polylines polylines;
try {
assert(!fill_params.use_arachne);
polylines = fill.fill_surface(&surface_fill, fill_params);
} catch (InfillFailedException &) {
}