mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 09:47:58 -06:00
Initial port of the new ensure vertical thickness algorithm from PrusaSlicer (#2382)
* Initial port of the new ensure vertical thickness algorithm from PrusaSlicer. Based on prusa3d/PrusaSlicer@1a0d8f5130 * Remove code related to "Detect narrow internal solid infill" as it's handled by the new ensuring code * Support different internal solid infill pattern * Ignore removed options --------- Co-authored-by: Pavel Mikuš <pavel.mikus.mail@seznam.cz> Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
parent
ef831ab8b1
commit
075a08bca8
37 changed files with 3792 additions and 489 deletions
|
@ -1,3 +1,13 @@
|
|||
///|/ Copyright (c) Prusa Research 2016 - 2023 Tomáš Mészáros @tamasmeszaros, Pavel Mikuš @Godrak, Vojtěch Bubník @bubnikv, Lukáš Hejl @hejllukas, Lukáš Matěna @lukasmatena, Oleksandra Iushchenko @YuSanka, Enrico Turri @enricoturri1966
|
||||
///|/ Copyright (c) Slic3r 2013 - 2016 Alessandro Ranellucci @alranel
|
||||
///|/
|
||||
///|/ ported from lib/Slic3r/Polyline.pm:
|
||||
///|/ Copyright (c) Prusa Research 2018 Vojtěch Bubník @bubnikv
|
||||
///|/ Copyright (c) Slic3r 2011 - 2014 Alessandro Ranellucci @alranel
|
||||
///|/ Copyright (c) 2012 Mark Hindess
|
||||
///|/
|
||||
///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
|
||||
///|/
|
||||
#ifndef slic3r_Polyline_hpp_
|
||||
#define slic3r_Polyline_hpp_
|
||||
|
||||
|
@ -221,6 +231,25 @@ inline void polylines_append(Polylines &dst, Polylines &&src)
|
|||
}
|
||||
}
|
||||
|
||||
// Merge polylines at their respective end points.
|
||||
// dst_first: the merge point is at dst.begin() or dst.end()?
|
||||
// src_first: the merge point is at src.begin() or src.end()?
|
||||
// The orientation of the resulting polyline is unknown, the output polyline may start
|
||||
// either with src piece or dst piece.
|
||||
template<typename PointsType>
|
||||
inline void polylines_merge(PointsType &dst, bool dst_first, PointsType &&src, bool src_first)
|
||||
{
|
||||
if (dst_first) {
|
||||
if (src_first)
|
||||
std::reverse(dst.begin(), dst.end());
|
||||
else
|
||||
std::swap(dst, src);
|
||||
} else if (! src_first)
|
||||
std::reverse(src.begin(), src.end());
|
||||
// Merge src into dst.
|
||||
append(dst, std::move(src));
|
||||
}
|
||||
|
||||
const Point& leftmost_point(const Polylines &polylines);
|
||||
|
||||
bool remove_degenerate(Polylines &polylines);
|
||||
|
@ -242,6 +271,11 @@ public:
|
|||
width.clear();
|
||||
}
|
||||
|
||||
// Make this closed ThickPolyline starting in the specified index.
|
||||
// Be aware that this method can be applicable just for closed ThickPolyline.
|
||||
// On open ThickPolyline make no effect.
|
||||
void start_at_index(int index);
|
||||
|
||||
std::vector<coordf_t> width;
|
||||
std::pair<bool,bool> endpoints;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue