e65ab90c16
for islands with another islands in their holes. Improvement of chaining of infill lines for 3D honeycomb, Gyroid and Honeycomb infill: New TSP chaining algorithm is used.
34 lines
1.2 KiB
C++
34 lines
1.2 KiB
C++
#ifndef slic3r_ShortestPath_hpp_
|
|
#define slic3r_ShortestPath_hpp_
|
|
|
|
#include "libslic3r.h"
|
|
#include "ExtrusionEntity.hpp"
|
|
#include "Point.hpp"
|
|
|
|
#include <utility>
|
|
#include <vector>
|
|
|
|
namespace ClipperLib { class PolyNode; }
|
|
|
|
namespace Slic3r {
|
|
|
|
std::vector<size_t> chain_points(const Points &points, Point *start_near = nullptr);
|
|
|
|
std::vector<std::pair<size_t, bool>> chain_extrusion_entities(std::vector<ExtrusionEntity*> &entities, const Point *start_near = nullptr);
|
|
void reorder_extrusion_entities(std::vector<ExtrusionEntity*> &entities, std::vector<std::pair<size_t, bool>> &chain);
|
|
void chain_and_reorder_extrusion_entities(std::vector<ExtrusionEntity*> &entities, const Point *start_near = nullptr);
|
|
|
|
Polylines chain_infill_polylines(Polylines &src);
|
|
|
|
std::vector<ClipperLib::PolyNode*> chain_clipper_polynodes(const Points &points, const std::vector<ClipperLib::PolyNode*> &items);
|
|
|
|
// Chain instances of print objects by an approximate shortest path.
|
|
// Returns pairs of PrintObject idx and instance of that PrintObject.
|
|
class Print;
|
|
std::vector<std::pair<size_t, size_t>> chain_print_object_instances(const Print &print);
|
|
|
|
|
|
} // namespace Slic3r
|
|
|
|
#endif /* slic3r_ShortestPath_hpp_ */
|