Port of Cura's multi-material interlocking (#5775)

* Init port of Cura's MM interlocking

* Refactor a bit

* Fix crash when bottom surface is multi-color

* Fix crash when boundary avoidance is 0

* Add config

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
Noisyfox 2024-06-30 23:25:15 +08:00 committed by GitHub
parent 8ccf0edbc2
commit 4145f45e42
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 1029 additions and 5 deletions

View file

@ -4,6 +4,7 @@
#include "MultiMaterialSegmentation.hpp"
#include "Print.hpp"
#include "ClipperUtils.hpp"
#include "Interlocking/InterlockingGenerator.hpp"
//BBS
#include "ShortestPath.hpp"
@ -1072,6 +1073,9 @@ void PrintObject::slice_volumes()
this->apply_conical_overhang();
m_print->throw_if_canceled();
InterlockingGenerator::generate_interlocking_structure(this);
m_print->throw_if_canceled();
BOOST_LOG_TRIVIAL(debug) << "Slicing volumes - make_slices in parallel - begin";
{
// Compensation value, scaled. Only applying the negative scaling here, as the positive scaling has already been applied during slicing.