mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-15 00:16:07 +08:00
#645 fix temperature for reprap & first layer temp for multiextruders
This commit is contained in:
parent
77f9280646
commit
78f193787f
@ -222,11 +222,10 @@ void AvoidCrossingPerimeters::init_external_mp(const Print &print)
|
||||
std::string();
|
||||
}
|
||||
|
||||
int
|
||||
OozePrevention::_get_temp(GCode& gcodegen)
|
||||
int OozePrevention::_get_temp(GCode& gcodegen)
|
||||
{
|
||||
if (gcodegen.writer().tool_is_extruder())
|
||||
return (gcodegen.layer() != NULL && gcodegen.layer()->id() == 0)
|
||||
return (gcodegen.layer() == NULL || gcodegen.layer()->id() == 0)
|
||||
? gcodegen.config().first_layer_temperature.get_at(gcodegen.writer().tool()->id())
|
||||
: gcodegen.config().temperature.get_at(gcodegen.writer().tool()->id());
|
||||
else
|
||||
@ -1933,7 +1932,7 @@ static bool custom_gcode_sets_temperature(const std::string &gcode, const int mc
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Skip the rest of the line.
|
||||
for (; *ptr != 0 && *ptr != '\r' && *ptr != '\n'; ++ ptr);
|
||||
// Skip the end of line indicators.
|
||||
|
@ -166,12 +166,8 @@ std::string GCodeWriter::set_temperature(const unsigned int temperature, bool wa
|
||||
}
|
||||
gcode << temp_w_offset;
|
||||
bool multiple_tools = this->multiple_extruders && ! m_single_extruder_multi_material;
|
||||
if (tool != -1 && (multiple_tools || FLAVOR_IS(gcfMakerWare) || FLAVOR_IS(gcfSailfish)) ) {
|
||||
if (FLAVOR_IS(gcfRepRap)) {
|
||||
gcode << " P" << tool;
|
||||
} else {
|
||||
gcode << " T" << tool;
|
||||
}
|
||||
if (tool != -1 && (multiple_tools || FLAVOR_IS(gcfMakerWare) || FLAVOR_IS(gcfSailfish)) && FLAVOR_IS_NOT(gcfRepRap)) {
|
||||
gcode << " T" << tool;
|
||||
}
|
||||
gcode << " ; " << comment << "\n";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user