Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/local_27/dev' into nightly_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
supermerill committed Jul 31, 2024
2 parents f5829b9 + 58df1bb commit 60d3a9a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/libslic3r/Extruder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <optional>

#include "libslic3r.h"
#include "GCode/GcodeFormatter.hpp"
#include "GCode/GCodeFormatter.hpp"
#include "Point.hpp"

namespace Slic3r {
Expand Down
12 changes: 6 additions & 6 deletions src/libslic3r/ShortestPath.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,23 @@ std::vector<size_t> chain_expolygons(const ExPolygons &expolygons, Point *s
std::vector<std::pair<size_t, bool>> chain_extrusion_entities(const std::vector<ExtrusionEntity*> &entities, const Point *start_near = nullptr, const bool reversed = false);
std::vector<std::pair<size_t, bool>> chain_extrusion_entities(const std::vector<const ExtrusionEntity*> &entities, const Point *start_near = nullptr, const bool reversed = false);
// Reorder & reverse extrusion entities in place based on the "chain" ordering.
template<typename ExtrusionEntityConstOrNot>
void reorder_extrusion_entities(std::vector<ExtrusionEntityConstOrNot*> &entities, const std::vector<std::pair<size_t, bool>> &chain)
//template<typename ExtrusionEntityConstOrNot>
inline void reorder_extrusion_entities(std::vector<ExtrusionEntity*> &entities, const std::vector<std::pair<size_t, bool>> &chain)
{
assert(entities.size() == chain.size());
std::vector<const ExtrusionEntity*> out;
std::vector<ExtrusionEntity*> out;
out.reserve(entities.size());
for (const std::pair<size_t, bool> &idx : chain) {
assert(entities[idx.first] != nullptr);
out.emplace_back(entities[idx.first]);
if (idx.second)
out.back()->reverse();
entities[idx.first]->reverse();
}
entities.swap(out);
}
// Reorder & reverse extrusion entities in place.
template<typename ExtrusionEntityConstOrNot>
void chain_and_reorder_extrusion_entities(std::vector<ExtrusionEntityConstOrNot*> &entities, const Point *start_near = nullptr)
//template<typename ExtrusionEntityConstOrNot>
inline void chain_and_reorder_extrusion_entities(std::vector<ExtrusionEntity*> &entities, const Point *start_near = nullptr)
{
reorder_extrusion_entities(entities, chain_extrusion_entities(entities, start_near));
}
Expand Down

0 comments on commit 60d3a9a

Please sign in to comment.