Fix of spiral vase mode with holes in the bottom: Holes in the bottom layers

(non-spiral vase layers) were being closed.
Fixes Bad slicing in vase mode (unexpected bridge and solid infill layers) #3326
Fixes Model with holes in the base does not slice properly in "Vase Mode" #5359
This commit is contained in:
Vojtech Bubnik 2020-12-09 14:07:22 +01:00
parent 5470af3938
commit 364300055e
8 changed files with 77 additions and 26 deletions

View file

@ -179,8 +179,17 @@ public:
TriangleMeshSlicer() : mesh(nullptr) {}
TriangleMeshSlicer(const TriangleMesh* mesh) { this->init(mesh, [](){}); }
void init(const TriangleMesh *mesh, throw_on_cancel_callback_type throw_on_cancel);
void slice(const std::vector<float> &z, SlicingMode mode, std::vector<Polygons>* layers, throw_on_cancel_callback_type throw_on_cancel) const;
void slice(const std::vector<float> &z, SlicingMode mode, const float closing_radius, std::vector<ExPolygons>* layers, throw_on_cancel_callback_type throw_on_cancel) const;
void slice(
const std::vector<float> &z, SlicingMode mode, size_t alternate_mode_first_n_layers, SlicingMode alternate_mode,
std::vector<Polygons>* layers, throw_on_cancel_callback_type throw_on_cancel) const;
void slice(const std::vector<float> &z, SlicingMode mode, std::vector<Polygons>* layers, throw_on_cancel_callback_type throw_on_cancel) const
{ return this->slice(z, mode, 0, mode, layers, throw_on_cancel); }
void slice(
const std::vector<float> &z, SlicingMode mode, size_t alternate_mode_first_n_layers, SlicingMode alternate_mode, const float closing_radius,
std::vector<ExPolygons>* layers, throw_on_cancel_callback_type throw_on_cancel) const;
void slice(const std::vector<float> &z, SlicingMode mode, const float closing_radius,
std::vector<ExPolygons>* layers, throw_on_cancel_callback_type throw_on_cancel) const
{ this->slice(z, mode, 0, mode, closing_radius, layers, throw_on_cancel); }
enum FacetSliceType {
NoSlice = 0,
Slicing = 1,