2019-09-26 07:44:38 +00:00
|
|
|
#ifndef slic3r_ShortestPath_hpp_
|
|
|
|
#define slic3r_ShortestPath_hpp_
|
|
|
|
|
|
|
|
#include "libslic3r.h"
|
|
|
|
#include "ExtrusionEntity.hpp"
|
|
|
|
#include "Point.hpp"
|
|
|
|
|
|
|
|
#include <utility>
|
|
|
|
#include <vector>
|
|
|
|
|
2019-09-26 15:30:03 +00:00
|
|
|
namespace ClipperLib { class PolyNode; }
|
|
|
|
|
2019-09-26 07:44:38 +00:00
|
|
|
namespace Slic3r {
|
|
|
|
|
2019-09-26 14:39:50 +00:00
|
|
|
std::vector<size_t> chain_points(const Points &points, Point *start_near = nullptr);
|
|
|
|
|
2019-09-26 07:44:38 +00:00
|
|
|
std::vector<std::pair<size_t, bool>> chain_extrusion_entities(std::vector<ExtrusionEntity*> &entities, const Point *start_near = nullptr);
|
2019-09-26 14:39:50 +00:00
|
|
|
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);
|
|
|
|
|
2019-09-26 15:30:03 +00:00
|
|
|
std::vector<ClipperLib::PolyNode*> chain_clipper_polynodes(const Points &points, const std::vector<ClipperLib::PolyNode*> &items);
|
|
|
|
|
2019-09-26 14:39:50 +00:00
|
|
|
// 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);
|
|
|
|
|
2019-09-26 07:44:38 +00:00
|
|
|
|
|
|
|
} // namespace Slic3r
|
|
|
|
|
|
|
|
#endif /* slic3r_ShortestPath_hpp_ */
|