Merge branch 'master-remote' into feature/merge_remote_1.3

# Conflicts:
#	bbl/i18n/zh_cn/BambuStudio_zh_CN.po
#	resources/i18n/zh_cn/BambuStudio.mo
#	resources/profiles/Voron.json
#	resources/profiles/Voron/filament/Voron Generic ABS.json
#	resources/profiles/Voron/filament/Voron Generic ASA.json
#	resources/profiles/Voron/filament/Voron Generic PA-CF.json
#	resources/profiles/Voron/filament/Voron Generic PA.json
#	resources/profiles/Voron/filament/Voron Generic PC.json
#	resources/profiles/Voron/filament/Voron Generic PETG.json
#	resources/profiles/Voron/filament/Voron Generic PLA-CF.json
#	resources/profiles/Voron/filament/Voron Generic PLA.json
#	resources/profiles/Voron/filament/Voron Generic PVA.json
#	resources/profiles/Voron/filament/Voron Generic TPU.json
#	resources/profiles/Voron/filament/fdm_filament_abs.json
#	resources/profiles/Voron/filament/fdm_filament_asa.json
#	resources/profiles/Voron/filament/fdm_filament_common.json
#	resources/profiles/Voron/filament/fdm_filament_pa.json
#	resources/profiles/Voron/filament/fdm_filament_pc.json
#	resources/profiles/Voron/filament/fdm_filament_pet.json
#	resources/profiles/Voron/filament/fdm_filament_pla.json
#	resources/profiles/Voron/filament/fdm_filament_pva.json
#	resources/profiles/Voron/filament/fdm_filament_tpu.json
#	resources/profiles/Voron/machine/Voron 0.1 0.4 nozzle.json
#	resources/profiles/Voron/machine/Voron 0.1.json
#	resources/profiles/Voron/machine/Voron 2.4 250 0.4 nozzle.json
#	resources/profiles/Voron/machine/Voron 2.4 250.json
#	resources/profiles/Voron/machine/Voron 2.4 300 0.4 nozzle.json
#	resources/profiles/Voron/machine/Voron 2.4 300.json
#	resources/profiles/Voron/machine/Voron 2.4 350 0.4 nozzle.json
#	resources/profiles/Voron/machine/Voron 2.4 350.json
#	resources/profiles/Voron/machine/Voron Trident 250 0.4 nozzle.json
#	resources/profiles/Voron/machine/Voron Trident 250.json
#	resources/profiles/Voron/machine/Voron Trident 300 0.4 nozzle.json
#	resources/profiles/Voron/machine/Voron Trident 300.json
#	resources/profiles/Voron/machine/Voron Trident 350 0.4 nozzle.json
#	resources/profiles/Voron/machine/Voron Trident 350.json
#	resources/profiles/Voron/machine/fdm_klipper_common.json
#	resources/profiles/Voron/process/0.08mm Extra Fine @Voron.json
#	resources/profiles/Voron/process/0.12mm Fine @Voron.json
#	resources/profiles/Voron/process/0.15mm Optimal @Voron.json
#	resources/profiles/Voron/process/0.20mm Standard @Voron.json
#	resources/profiles/Voron/process/0.24mm Draft @Voron.json
#	resources/profiles/Voron/process/0.28mm Extra Draft @Voron.json
#	resources/profiles/Voron/process/fdm_process_voron_common.json
#	src/libslic3r/Preset.cpp
#	src/libslic3r/PrintConfig.cpp
#	src/libslic3r/PrintConfig.hpp
#	src/libslic3r/PrintObject.cpp
#	src/slic3r/GUI/BackgroundSlicingProcess.cpp
#	src/slic3r/GUI/Field.cpp
#	src/slic3r/GUI/GLToolbar.cpp
#	src/slic3r/GUI/GLToolbar.hpp
#	src/slic3r/GUI/MainFrame.cpp
#	src/slic3r/GUI/MainFrame.hpp
#	src/slic3r/GUI/NotificationManager.cpp
#	src/slic3r/GUI/PhysicalPrinterDialog.cpp
#	src/slic3r/GUI/PhysicalPrinterDialog.hpp
#	src/slic3r/GUI/Plater.cpp
#	src/slic3r/GUI/Plater.hpp
#	src/slic3r/GUI/PrintHostDialogs.cpp
#	src/slic3r/GUI/PrintHostDialogs.hpp
#	src/slic3r/Utils/PrintHost.cpp
This commit is contained in:
SoftFever 2022-10-20 23:12:00 +08:00
commit 35455e6533
278 changed files with 14888 additions and 2414 deletions

View file

@ -11,6 +11,7 @@
#include "FillBase.hpp"
#include "FillRectilinear.hpp"
#include "FillLightning.hpp"
#include "FillConcentricInternal.hpp"
#include "FillConcentric.hpp"
@ -108,6 +109,9 @@ struct SurfaceFill {
Surface surface;
ExPolygons expolygons;
SurfaceFillParams params;
// BBS
std::vector<size_t> region_id_group;
ExPolygons no_overlap_expolygons;
};
// BBS: used to judge whether the internal solid infill area is narrow
@ -209,8 +213,18 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
fill.region_id = region_id;
fill.surface = surface;
fill.expolygons.emplace_back(std::move(fill.surface.expolygon));
} else
fill.expolygons.emplace_back(surface.expolygon);
//BBS
fill.region_id_group.push_back(region_id);
fill.no_overlap_expolygons = layerm.fill_no_overlap_expolygons;
} else {
fill.expolygons.emplace_back(surface.expolygon);
//BBS
auto t = find(fill.region_id_group.begin(), fill.region_id_group.end(), region_id);
if (t == fill.region_id_group.end()) {
fill.region_id_group.push_back(region_id);
fill.no_overlap_expolygons = union_ex(fill.no_overlap_expolygons, layerm.fill_no_overlap_expolygons);
}
}
}
}
}
@ -336,6 +350,8 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
surface_fills.back().region_id = surface_fills[i].region_id;
surface_fills.back().surface.surface_type = stInternalSolid;
surface_fills.back().surface.thickness = surface_fills[i].surface.thickness;
surface_fills.back().region_id_group = surface_fills[i].region_id_group;
surface_fills.back().no_overlap_expolygons = surface_fills[i].no_overlap_expolygons;
for (size_t j = 0; j < narrow_expolygons_index.size(); j++) {
// BBS: move the narrow expolygons to new surface_fills.back();
surface_fills.back().expolygons.emplace_back(std::move(surface_fills[i].expolygons[narrow_expolygons_index[j]]));
@ -373,7 +389,7 @@ void export_group_fills_to_svg(const char *path, const std::vector<SurfaceFill>
#endif
// friend to Layer
void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive::Octree* support_fill_octree)
void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive::Octree* support_fill_octree, FillLightning::Generator* lightning_generator)
{
for (LayerRegion *layerm : m_regions)
layerm->fills.clear();
@ -413,7 +429,8 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive:
assert(fill_concentric != nullptr);
fill_concentric->print_config = &this->object()->print()->config();
fill_concentric->print_object_config = &this->object()->config();
}
} else if (surface_fill.params.pattern == ipLightning)
dynamic_cast<FillLightning::Filler*>(f.get())->generator = lightning_generator;
// calculate flow spacing for infill pattern generation
bool using_internal_flow = ! surface_fill.surface.is_solid() && ! surface_fill.params.bridge;
@ -441,6 +458,7 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive:
params.anchor_length_max = surface_fill.params.anchor_length_max;
params.resolution = resolution;
params.use_arachne = surface_fill.params.pattern == ipConcentric;
params.layer_height = m_regions[surface_fill.region_id]->layer()->height;
// BBS
params.flow = surface_fill.params.flow;