Commit Graph

26 Commits

Author SHA1 Message Date
bubnikv
8e80f72d3c Fix of recent wipe tower / tool ordering refactoring. 2020-01-16 14:59:16 +01:00
bubnikv
98aca09ea5 WIP: Enhancement of the FDM back end to support Color Change situations,
when a project was switched from multi-extruder printer to single
extruder printer.
2020-01-16 13:39:03 +01:00
bubnikv
efd6d795e4 Added synonyms to some PrintSteps:
psWipeTower now equals to new psToolOrdering indicating that
the ToolOrdering has been calculated (only if non-sequential mode is active).

psBrim now equals to new psExtrusionPaths
psExtrusionPaths shall be the last step before psWipeTower, indicating
that all the printing extrusions are calculated for the G-code preview
slider to edit the custom per print_z color changes, tool changes etc.
2020-01-15 16:20:16 +01:00
bubnikv
f65a532cbb Fixed regression in placement of Color Change event at the correct layer. 2020-01-14 17:35:42 +01:00
bubnikv
a9e9d0a629 Fix of recent refactoring of color print. 2020-01-14 16:11:03 +01:00
Lukas Matena
a31f00cd7a Refactoring fix: making sure that mark_wiping_extrusions doesn't report it wiped something it didn't 2020-01-14 15:43:43 +01:00
bubnikv
836cd78885 Another bugfixes of GCode export after refactoring. 2020-01-14 15:12:45 +01:00
bubnikv
5272a97a6a gcc & clang do not like taking reference of const temporaries. 2020-01-14 12:10:01 +01:00
bubnikv
6ed818a5e7 Custom G-code references are now being assigned to ToolOrdering::LayerTools()
and the superfluous M600 (color change) events are filtered out there.

Fixed a handful of compiler warnings.
2020-01-14 11:54:09 +01:00
bubnikv
7c0cdc3134 Refactoring of GCode::process_layer().
Refactoring of GCode export of color changes, extruder switches etc,
so that the "color change" like extruder switches are applied first
at the Wipe Tower / G-code export, so that adding / removing
an extruder switch at the G-code preview slider does not invalidate
slicing.
2020-01-14 10:31:18 +01:00
bubnikv
8406b2dafa Refactoring of ToolOrdering (wipe into infill / object)
Refactoring of GCode::_do_export()
Helper lower_bound and search functions similar to std, but without
needing the value object explicitely.
2020-01-10 11:27:04 +01:00
bubnikv
a5f0a98788 ToolOrdering: Removed unused parameter. 2020-01-10 11:27:04 +01:00
bubnikv
823100f3d9 Optimization of G-code export:
1) Don't allocate ExtruderOverrides if not necessary
2) Use boost::container::small_vector<int32, 3) for ExtruderOverrides
   (usually less than 4 instances are printed))
2020-01-08 14:58:24 +01:00
bubnikv
9f822b0ee4 Some refactoring and const correctness fixes. 2020-01-07 14:35:43 +01:00
Lukas Matena
a34a1341c5 Whitespace changes to supress misleading indentation warnings
These appear in newer gcc when spaces and tabs are mixed
2019-09-24 16:01:01 +02:00
Lukas Matena
afb8f01bb9 Fix of #1266 and #2258
In case there were empty object layers supposed to be floating on supports which were set to use a specific extruder, wipe tower was missing layer required to do the toolchange, leading to a crash
Such cases are now detected and layers that need it are additionally assigned as wipe tower layers

Also tracked as SPE-526
2019-09-10 13:13:21 +02:00
Lukas Matena
6f0b44da72 Fixed couple of warnings in WipeTower.cpp, ToolOrdering.cpp and GCode.cpp 2019-09-04 14:56:35 +02:00
tamasmeszaros
a02e218ccd Merge branch 'master' into tm_clang_mingw 2019-08-16 16:37:02 +02:00
tamasmeszaros
2792e94938 Fix up build and clear dev output 2019-08-16 16:31:05 +02:00
Lukas Matena
d0c9c28494 Empty layers detection added to GCode.cpp
Added detection of empty layers so the wipe tower doesn't trip on them (it is not printable anyway).
This should improve wipe tower reliability with supports, objects standing on edges, etc.
I also turned an assert into exception throw to prevent hard crashes and nonsense output.
2019-08-02 16:54:18 +02:00
Lukas Matena
9bbe65c53e Fixed warnings in libslic3r 2019-06-25 16:04:29 +02:00
Lukas Matena
b8fe1fabf3 Fixed unit tests when run with range checks on std::vector
There was a bug in unit tests that led to generating the wipe tower with non-normalized preset.
This caused out-of-bounds access into max_layer_height vector in fill_wipe_tower_partitions.
The problem surfaced in https://github.com/prusa3d/PrusaSlicer/issues/2288.
I quickly patched additional normalization of the preset to prevent this from happening.

Also, an assert in the same function turned out to trip on one of the tests.
This one was commented out for now and will (hopefully) be looked into later.

Function Print::apply_config was renamed to apply_config_perl_tests_only so everyone
sees its current purpose and does not mistake it for the more important Print::apply.
2019-05-22 16:48:20 +02:00
bubnikv
d79e2d8fa6 Separated Print / PrintObject into PrintBase.cpp/h to support SLAPrint 2018-11-08 14:23:17 +01:00
Lukas Matena
d91784ee5d When iterating over PrintObject regions, use PrintObject::region_volumes (see also yesterday's commit 3eea327) 2018-11-07 15:17:29 +01:00
bubnikv
9e0bbefb68 WIP: When iterating over PrintObject's regions, use the region count
by PrintObject::region_volumes. This is due to the way Print::apply()
works, it does not invalidate an existing PrintObject if a new region
is added to the print.
2018-11-06 15:31:26 +01:00
bubnikv
1260b8deb3 WIP: Moved sources int src/, separated most of the source code from Perl.
The XS was left only for the unit / integration tests, and it links
libslic3r only. No wxWidgets are allowed to be used from Perl starting
from now.
2018-09-19 11:02:24 +02:00