mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 18:27:58 -06:00
by re-shuffling the simplification of a path to be extruded. A non-simplified path was being used for a wipe move before, causing an extremely detailed path to be exported into a G-code.
This commit is contained in:
parent
2ddabe5fa8
commit
3bfa6416d8
3 changed files with 31 additions and 30 deletions
|
@ -100,17 +100,17 @@ double ExtrusionMultiPath::min_mm3_per_mm() const
|
|||
|
||||
Polyline ExtrusionMultiPath::as_polyline() const
|
||||
{
|
||||
size_t len = 0;
|
||||
for (size_t i_path = 0; i_path < paths.size(); ++ i_path) {
|
||||
assert(! paths[i_path].polyline.points.empty());
|
||||
assert(i_path == 0 || paths[i_path - 1].polyline.points.back() == paths[i_path].polyline.points.front());
|
||||
len += paths[i_path].polyline.points.size();
|
||||
}
|
||||
// The connecting points between the segments are equal.
|
||||
len -= paths.size() - 1;
|
||||
|
||||
Polyline out;
|
||||
if (len > 0) {
|
||||
if (! paths.empty()) {
|
||||
size_t len = 0;
|
||||
for (size_t i_path = 0; i_path < paths.size(); ++ i_path) {
|
||||
assert(! paths[i_path].polyline.points.empty());
|
||||
assert(i_path == 0 || paths[i_path - 1].polyline.points.back() == paths[i_path].polyline.points.front());
|
||||
len += paths[i_path].polyline.points.size();
|
||||
}
|
||||
// The connecting points between the segments are equal.
|
||||
len -= paths.size() - 1;
|
||||
assert(len > 0);
|
||||
out.points.reserve(len);
|
||||
out.points.push_back(paths.front().polyline.points.front());
|
||||
for (size_t i_path = 0; i_path < paths.size(); ++ i_path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue