mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
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:
commit
35455e6533
278 changed files with 14888 additions and 2414 deletions
|
@ -14,6 +14,7 @@
|
|||
#include "TriangleMeshSlicer.hpp"
|
||||
#include "Utils.hpp"
|
||||
#include "Fill/FillAdaptive.hpp"
|
||||
#include "Fill/FillLightning.hpp"
|
||||
#include "Format/STL.hpp"
|
||||
#include "InternalBridgeDetector.hpp"
|
||||
#include "TreeSupport.hpp"
|
||||
|
@ -367,14 +368,16 @@ void PrintObject::infill()
|
|||
m_print->set_status(35, L("Generating infill toolpath"));
|
||||
|
||||
auto [adaptive_fill_octree, support_fill_octree] = this->prepare_adaptive_infill_data();
|
||||
auto lightning_generator = this->prepare_lightning_infill_data();
|
||||
|
||||
|
||||
BOOST_LOG_TRIVIAL(debug) << "Filling layers in parallel - start";
|
||||
tbb::parallel_for(
|
||||
tbb::blocked_range<size_t>(0, m_layers.size()),
|
||||
[this, &adaptive_fill_octree = adaptive_fill_octree, &support_fill_octree = support_fill_octree](const tbb::blocked_range<size_t>& range) {
|
||||
[this, &adaptive_fill_octree = adaptive_fill_octree, &support_fill_octree = support_fill_octree, &lightning_generator](const tbb::blocked_range<size_t>& range) {
|
||||
for (size_t layer_idx = range.begin(); layer_idx < range.end(); ++ layer_idx) {
|
||||
m_print->throw_if_canceled();
|
||||
m_layers[layer_idx]->make_fills(adaptive_fill_octree.get(), support_fill_octree.get());
|
||||
m_layers[layer_idx]->make_fills(adaptive_fill_octree.get(), support_fill_octree.get(), lightning_generator.get());
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@ -534,6 +537,18 @@ std::pair<FillAdaptive::OctreePtr, FillAdaptive::OctreePtr> PrintObject::prepare
|
|||
support_line_spacing ? build_octree(mesh, overhangs.front(), support_line_spacing, true) : OctreePtr());
|
||||
}
|
||||
|
||||
FillLightning::GeneratorPtr PrintObject::prepare_lightning_infill_data()
|
||||
{
|
||||
bool has_lightning_infill = false;
|
||||
for (size_t region_id = 0; region_id < this->num_printing_regions(); ++region_id)
|
||||
if (const PrintRegionConfig& config = this->printing_region(region_id).config(); config.sparse_infill_density > 0 && config.sparse_infill_pattern == ipLightning) {
|
||||
has_lightning_infill = true;
|
||||
break;
|
||||
}
|
||||
|
||||
return has_lightning_infill ? FillLightning::build_generator(std::as_const(*this)) : FillLightning::GeneratorPtr();
|
||||
}
|
||||
|
||||
void PrintObject::clear_layers()
|
||||
{
|
||||
if (!m_shared_object) {
|
||||
|
@ -759,6 +774,17 @@ bool PrintObject::invalidate_state_by_config_options(
|
|||
|| opt_key == "top_surface_line_width"
|
||||
|| opt_key == "initial_layer_line_width") {
|
||||
steps.emplace_back(posInfill);
|
||||
} else if (opt_key == "sparse_infill_pattern") {
|
||||
steps.emplace_back(posInfill);
|
||||
#if HAS_LIGHTNING_INFILL
|
||||
const auto *old_fill_pattern = old_config.option<ConfigOptionEnum<InfillPattern>>(opt_key);
|
||||
const auto *new_fill_pattern = new_config.option<ConfigOptionEnum<InfillPattern>>(opt_key);
|
||||
assert(old_fill_pattern && new_fill_pattern);
|
||||
// We need to recalculate infill surfaces when infill_only_where_needed is enabled, and we are switching from
|
||||
// the Lightning infill to another infill or vice versa.
|
||||
if (PrintObject::infill_only_where_needed && (new_fill_pattern->value == ipLightning || old_fill_pattern->value == ipLightning))
|
||||
steps.emplace_back(posPrepareInfill);
|
||||
#endif
|
||||
} else if (opt_key == "sparse_infill_density") {
|
||||
// One likely wants to reslice only when switching between zero infill to simulate boolean difference (subtracting volumes),
|
||||
// normal infill and 100% (solid) infill.
|
||||
|
@ -781,6 +807,8 @@ bool PrintObject::invalidate_state_by_config_options(
|
|||
|| opt_key == "fuzzy_skin_thickness"
|
||||
|| opt_key == "fuzzy_skin_point_distance"
|
||||
|| opt_key == "detect_overhang_wall"
|
||||
//BBS
|
||||
|| opt_key == "enable_overhang_speed"
|
||||
|| opt_key == "detect_thin_wall") {
|
||||
steps.emplace_back(posPerimeters);
|
||||
steps.emplace_back(posSupportMaterial);
|
||||
|
@ -796,8 +824,6 @@ bool PrintObject::invalidate_state_by_config_options(
|
|||
opt_key == "seam_position"
|
||||
|| opt_key == "support_speed"
|
||||
|| opt_key == "support_interface_speed"
|
||||
//BBS
|
||||
|| opt_key == "enable_overhang_speed"
|
||||
|| opt_key == "overhang_1_4_speed"
|
||||
|| opt_key == "overhang_2_4_speed"
|
||||
|| opt_key == "overhang_3_4_speed"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue