mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-30 04:02:52 -06:00
merge tm_sla_supports_backend with master, reapply fix for index slice invalidation, fix for autorotation z offset
This commit is contained in:
commit
980c53970b
13 changed files with 304 additions and 174 deletions
|
|
@ -1322,11 +1322,11 @@ void GCode::process_layer(
|
|||
// In case there are more toolchange requests that weren't done yet and should happen simultaneously, erase them all.
|
||||
// (Layers can be close to each other, model could have been resliced with bigger layer height, ...).
|
||||
bool colorprint_change = false;
|
||||
while (!m_colorprint_heights.empty() && m_colorprint_heights.front()/*-EPSILON*/ < layer.print_z-EPSILON) {
|
||||
while (!m_colorprint_heights.empty() && m_colorprint_heights.front()-EPSILON < layer.print_z) {
|
||||
m_colorprint_heights.erase(m_colorprint_heights.begin());
|
||||
colorprint_change = true;
|
||||
}
|
||||
if (colorprint_change)
|
||||
if (colorprint_change && print.extruders().size()==1)
|
||||
gcode += "M600\n";
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -382,7 +382,7 @@ std::string GCodePreviewData::get_legend_title() const
|
|||
return "";
|
||||
}
|
||||
|
||||
GCodePreviewData::LegendItemsList GCodePreviewData::get_legend_items(const std::vector<float>& tool_colors, const std::vector<double>& cp_values) const
|
||||
GCodePreviewData::LegendItemsList GCodePreviewData::get_legend_items(const std::vector<float>& tool_colors, const std::vector</*double*/std::pair<double, double>>& cp_values) const
|
||||
{
|
||||
struct Helper
|
||||
{
|
||||
|
|
@ -465,15 +465,16 @@ GCodePreviewData::LegendItemsList GCodePreviewData::get_legend_items(const std::
|
|||
break;
|
||||
}
|
||||
if (i == 0) {
|
||||
items.emplace_back((boost::format(Slic3r::I18N::translate(L("up to %.2f mm"))) % cp_values[0]).str(), color);
|
||||
items.emplace_back((boost::format(Slic3r::I18N::translate(L("up to %.2f mm"))) % cp_values[0].first).str(), color);
|
||||
break;
|
||||
}
|
||||
if (i == color_print_cnt) {
|
||||
items.emplace_back((boost::format(Slic3r::I18N::translate(L("above %.2f mm"))) % cp_values[i-1]).str(), color);
|
||||
items.emplace_back((boost::format(Slic3r::I18N::translate(L("above %.2f mm"))) % cp_values[i-1].second).str(), color);
|
||||
continue;
|
||||
}
|
||||
|
||||
items.emplace_back((boost::format(Slic3r::I18N::translate(L("%.2f - %.2f mm"))) % cp_values[i-1] % cp_values[i]).str(), color);
|
||||
// items.emplace_back((boost::format(Slic3r::I18N::translate(L("%.2f - %.2f mm"))) % cp_values[i-1] % cp_values[i]).str(), color);
|
||||
items.emplace_back((boost::format(Slic3r::I18N::translate(L("%.2f - %.2f mm"))) % cp_values[i-1].second % cp_values[i].first).str(), color);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ public:
|
|||
void set_extrusion_paths_colors(const std::vector<std::string>& colors);
|
||||
|
||||
std::string get_legend_title() const;
|
||||
LegendItemsList get_legend_items(const std::vector<float>& tool_colors, const std::vector<double>& cp_values) const;
|
||||
LegendItemsList get_legend_items(const std::vector<float>& tool_colors, const std::vector</*double*/std::pair<double, double>>& cp_values) const;
|
||||
};
|
||||
|
||||
GCodePreviewData::Color operator + (const GCodePreviewData::Color& c1, const GCodePreviewData::Color& c2);
|
||||
|
|
|
|||
|
|
@ -908,12 +908,12 @@ bool SLAPrintObject::invalidate_state_by_config_options(const std::vector<t_conf
|
|||
std::vector<SLAPrintObjectStep> steps;
|
||||
bool invalidated = false;
|
||||
for (const t_config_option_key &opt_key : opt_keys) {
|
||||
if ( opt_key == "support_head_front_radius"
|
||||
if ( opt_key == "supports_enable"
|
||||
|| opt_key == "support_head_front_diameter"
|
||||
|| opt_key == "support_head_penetration"
|
||||
|| opt_key == "support_head_back_radius"
|
||||
|| opt_key == "support_head_width"
|
||||
|| opt_key == "support_pillar_radius"
|
||||
|| opt_key == "support_base_radius"
|
||||
|| opt_key == "support_pillar_diameter"
|
||||
|| opt_key == "support_base_diameter"
|
||||
|| opt_key == "support_base_height"
|
||||
|| opt_key == "support_critical_angle"
|
||||
|| opt_key == "support_max_bridge_length"
|
||||
|
|
@ -945,18 +945,21 @@ bool SLAPrintObject::invalidate_step(SLAPrintObjectStep step)
|
|||
if (step == slaposObjectSlice) {
|
||||
invalidated |= this->invalidate_all_steps();
|
||||
} else if (step == slaposSupportIslands) {
|
||||
invalidated |= this->invalidate_steps({ slaposSupportPoints, slaposSupportTree, slaposBasePool, slaposSliceSupports });
|
||||
invalidated |= this->invalidate_steps({ slaposSupportPoints, slaposSupportTree, slaposBasePool, slaposSliceSupports, slaposIndexSlices });
|
||||
invalidated |= m_print->invalidate_step(slapsRasterize);
|
||||
} else if (step == slaposSupportPoints) {
|
||||
invalidated |= this->invalidate_steps({ slaposSupportTree, slaposBasePool, slaposSliceSupports });
|
||||
invalidated |= this->invalidate_steps({ slaposSupportTree, slaposBasePool, slaposSliceSupports, slaposIndexSlices });
|
||||
invalidated |= m_print->invalidate_step(slapsRasterize);
|
||||
} else if (step == slaposSupportTree) {
|
||||
invalidated |= this->invalidate_steps({ slaposBasePool, slaposSliceSupports });
|
||||
invalidated |= this->invalidate_steps({ slaposBasePool, slaposSliceSupports, slaposIndexSlices });
|
||||
invalidated |= m_print->invalidate_step(slapsRasterize);
|
||||
} else if (step == slaposBasePool) {
|
||||
invalidated |= this->invalidate_step(slaposSliceSupports);
|
||||
invalidated |= this->invalidate_steps({slaposSliceSupports, slaposIndexSlices});
|
||||
invalidated |= m_print->invalidate_step(slapsRasterize);
|
||||
} else if (step == slaposSliceSupports) {
|
||||
invalidated |= this->invalidate_step(slaposIndexSlices);
|
||||
invalidated |= m_print->invalidate_step(slapsRasterize);
|
||||
} else if(step == slaposIndexSlices) {
|
||||
invalidated |= m_print->invalidate_step(slapsRasterize);
|
||||
}
|
||||
return invalidated;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue