mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
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:
parent
110d5b9d56
commit
41495a932a
8 changed files with 797 additions and 61 deletions
17
src/libslic3r/ShortestPath.hpp
Normal file
17
src/libslic3r/ShortestPath.hpp
Normal 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_ */
|
Loading…
Add table
Add a link
Reference in a new issue