Initial port of the new ensure vertical thickness algorithm from PrusaSlicer (#2382)

* Initial port of the new ensure vertical thickness algorithm from PrusaSlicer.

Based on prusa3d/PrusaSlicer@1a0d8f5130

* Remove code related to "Detect narrow internal solid infill" as it's handled by the new ensuring code

* Support different internal solid infill pattern

* Ignore removed options

---------

Co-authored-by: Pavel Mikuš <pavel.mikus.mail@seznam.cz>
Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
Noisyfox 2023-10-19 06:55:05 -05:00 committed by GitHub
parent ef831ab8b1
commit 075a08bca8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 3792 additions and 489 deletions

View file

@ -1,3 +1,8 @@
///|/ Copyright (c) Prusa Research 2016 - 2023 Oleksandra Iushchenko @YuSanka, Vojtěch Bubník @bubnikv, Filip Sykala @Jony01, David Kocík @kocikdav, Enrico Turri @enricoturri1966, Tomáš Mészáros @tamasmeszaros, Lukáš Matěna @lukasmatena, Vojtěch Král @vojtechkral
///|/ Copyright (c) 2019 Sijmen Schoon
///|/
///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
///|/
#ifndef slic3r_Utils_hpp_
#define slic3r_Utils_hpp_
@ -287,6 +292,16 @@ template <class VectorType> void reserve_power_of_2(VectorType &vector, size_t n
vector.reserve(next_highest_power_of_2(n));
}
template<class VectorType> void reserve_more(VectorType &vector, size_t n)
{
vector.reserve(vector.size() + n);
}
template<class VectorType> void reserve_more_power_of_2(VectorType &vector, size_t n)
{
vector.reserve(next_highest_power_of_2(vector.size() + n));
}
template<typename INDEX_TYPE>
inline INDEX_TYPE prev_idx_modulo(INDEX_TYPE idx, const INDEX_TYPE count)
{