mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-16 22:51:51 -06:00
Performance improvements of the MotionPlanner
(rewrote the Dijkstra shortest path algorithm to use a binary priority heap instead of a dumb O(n^2) algorithm, added some bounding box tests to avoid expensive in-polygon tests if possible).
This commit is contained in:
parent
8a628c451c
commit
60528c5c2a
8 changed files with 340 additions and 313 deletions
|
@ -127,6 +127,12 @@ void remove_nulls(std::vector<T*> &vec)
|
|||
vec.end());
|
||||
}
|
||||
|
||||
// Older compilers do not provide a std::make_unique template. Provide a simple one.
|
||||
template<typename T, typename... Args>
|
||||
inline std::unique_ptr<T> make_unique(Args&&... args) {
|
||||
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
|
||||
}
|
||||
|
||||
} // namespace Slic3r
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue