MMU segmentation refactoring: Most of the MMU segmentation code

was extracted to its own file.
This commit is contained in:
Vojtech Bubnik 2021-04-20 15:07:00 +02:00
parent bf1fc7d436
commit 4f950343c8
5 changed files with 1520 additions and 1490 deletions

View file

@ -128,6 +128,8 @@ add_library(libslic3r STATIC
Model.hpp
ModelArrange.hpp
ModelArrange.cpp
MultiMaterialSegmentation.cpp
MultiMaterialSegmentation.hpp
CustomGCode.cpp
CustomGCode.hpp
Arrange.hpp

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,18 @@
#ifndef slic3r_MultiMaterialSegmentation_hpp_
#define slic3r_MultiMaterialSegmentation_hpp_
#include <utility>
#include <vector>
namespace Slic3r {
class PrintObject;
class ExPolygon;
// Returns MMU segmentation based on painting in MMU segmentation gizmo
std::vector<std::vector<std::pair<ExPolygon, size_t>>> multi_material_segmentation_by_painting(const PrintObject &print_object);
} // namespace Slic3r
#endif // slic3r_MultiMaterialSegmentation_hpp_

View file

@ -240,11 +240,6 @@ public:
// Helpers to project custom facets on slices
void project_and_append_custom_facets(bool seam, EnforcerBlockerType type, std::vector<ExPolygons>& expolys) const;
// Returns MMU segmentation based on painting in MMU segmentation gizmo
std::vector<std::vector<std::pair<ExPolygon, size_t>>> mmu_segmentation_by_painting();
// Returns MMU segmentation of top and bottom layers based on painting in MMU segmentation gizmo
std::vector<std::vector<ExPolygons>> mmu_segmentation_top_and_bottom_layers();
private:
// to be called from Print only.
friend class Print;

File diff suppressed because it is too large Load diff