Introduction of a greedy Traveling Salesman Problem algorithm,

producing better shortest path estimate than the "closest next neighbor"
heuristics. The new greedy algorithm utilizes KD tree for closest
end point search, and builds a graph to detect loops.

PerimeterGenerator newly uses the optimized TSP algorithm.

ExtrusionEntity has been refactored / simplified.
This commit is contained in:
bubnikv 2019-09-26 09:44:38 +02:00
parent 110d5b9d56
commit 41495a932a
8 changed files with 797 additions and 61 deletions

View file

@ -0,0 +1,17 @@
#ifndef slic3r_ShortestPath_hpp_
#define slic3r_ShortestPath_hpp_
#include "libslic3r.h"
#include "ExtrusionEntity.hpp"
#include "Point.hpp"
#include <utility>
#include <vector>
namespace Slic3r {
std::vector<std::pair<size_t, bool>> chain_extrusion_entities(std::vector<ExtrusionEntity*> &entities, const Point *start_near = nullptr);
} // namespace Slic3r
#endif /* slic3r_ShortestPath_hpp_ */