mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Workaround to fix inconsistencies of width of gcode preview extrusion paths
This commit is contained in:
parent
f88cc6a5c1
commit
8a6d29f7d8
1 changed files with 6 additions and 2 deletions
|
@ -2488,6 +2488,10 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
||||||
// adds analyzer tags and updates analyzer's tracking data
|
// adds analyzer tags and updates analyzer's tracking data
|
||||||
if (m_enable_analyzer)
|
if (m_enable_analyzer)
|
||||||
{
|
{
|
||||||
|
// PrusaMultiMaterial::Writer may generate GCodeAnalyzer::Height_Tag and GCodeAnalyzer::Width_Tag lines without updating m_last_height and m_last_width
|
||||||
|
// so, if the last role was erWipeTower we force export of GCodeAnalyzer::Height_Tag and GCodeAnalyzer::Width_Tag lines
|
||||||
|
bool last_was_wipe_tower = (m_last_analyzer_extrusion_role == erWipeTower);
|
||||||
|
|
||||||
if (path.role() != m_last_analyzer_extrusion_role)
|
if (path.role() != m_last_analyzer_extrusion_role)
|
||||||
{
|
{
|
||||||
m_last_analyzer_extrusion_role = path.role();
|
m_last_analyzer_extrusion_role = path.role();
|
||||||
|
@ -2505,7 +2509,7 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
||||||
gcode += buf;
|
gcode += buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_last_width != path.width)
|
if (last_was_wipe_tower || (m_last_width != path.width))
|
||||||
{
|
{
|
||||||
m_last_width = path.width;
|
m_last_width = path.width;
|
||||||
|
|
||||||
|
@ -2514,7 +2518,7 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
||||||
gcode += buf;
|
gcode += buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_last_height != path.height)
|
if (last_was_wipe_tower || (m_last_height != path.height))
|
||||||
{
|
{
|
||||||
m_last_height = path.height;
|
m_last_height = path.height;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue