WIP: Reworking of FillRectilinear2 to support monotonous infill

with ant colony optimization and 3-opt flips.
This commit is contained in:
bubnikv 2020-04-22 10:54:11 +02:00
parent 10110ed307
commit 03eb5ffcd5
3 changed files with 1445 additions and 569 deletions

View file

@ -5,6 +5,7 @@
#include <memory.h> #include <memory.h>
#include <float.h> #include <float.h>
#include <stdint.h> #include <stdint.h>
#include <stdexcept>
#include <type_traits> #include <type_traits>
@ -18,6 +19,11 @@ namespace Slic3r {
class ExPolygon; class ExPolygon;
class Surface; class Surface;
class InfillFailedException : public std::runtime_error {
public:
InfillFailedException() : std::runtime_error("Infill failed") {}
};
struct FillParams struct FillParams
{ {
bool full_infill() const { return density > 0.9999f; } bool full_infill() const { return density > 0.9999f; }

File diff suppressed because it is too large Load diff

View file

@ -25,6 +25,7 @@
// Saves around 32% RAM after slicing step, 6.7% after G-code export (tested on PrusaSlicer 2.2.0 final). // Saves around 32% RAM after slicing step, 6.7% after G-code export (tested on PrusaSlicer 2.2.0 final).
typedef int32_t coord_t; typedef int32_t coord_t;
#else #else
//FIXME At least FillRectilinear2 requires coord_t to be 32bit.
typedef int64_t coord_t; typedef int64_t coord_t;
#endif #endif