Commit Graph

26 Commits

Author SHA1 Message Date
Lukáš Hejl
e123dfa8a4 Fixed wrong orientation of infill and gap-fill extrusion.
When an island contains exactly one infill ExtrusionEntity, this extrusion was oriented to maximize travel distance from the end of the previous extrusion of perimeters instead of minimizing it.
2021-02-23 20:07:40 +01:00
Vojtech Bubnik
5e9a8ea700 Fixed some clang warnings 2021-02-09 19:23:58 +01:00
Lukas Matena
1834ebe981 Fixing Clang warnings 3 2021-02-08 17:52:29 +01:00
Vojtech Bubnik
672ed99320 Fix of Hilbert Curve Infill: Unable to slice, PrusaSlicer not responding. #5771
Fixed by hard limiting the number of iterations of
reorder_by_two_exchanges_with_segment_flipping()
2021-02-08 17:43:39 +01:00
Lukas Matena
dc4bdad84a Fixed some more GCC warnings 2021-01-29 15:17:03 +01:00
Lukas Matena
2d32c80b75 Fixing GCC warnings 2 2021-01-29 10:46:52 +01:00
Vojtech Bubnik
6cdb19971f Fixed crash in Adaptive Cubic infill if just a single line was extracted.
New function to chain lines, however not used by the Adaptive Cubic infill.
2020-09-21 11:10:57 +02:00
bubnikv
ec81de7553 Ironing and Monotonous infill - first working implementation. 2020-04-28 17:19:11 +02:00
bubnikv
033548a568 Introduction of Monotonous infill type. Fill no-sort only for monotonous
and ironing infills.
2020-04-25 08:15:04 +02:00
bubnikv
b8c898bf40 Fixed a bug in validation of the FDM Print to check for extruder
collisions against already printed objects: Rotation of an object
was not being taken into account.
Fixes #2450 PrusaSlicer 2.0 Sequential printing vs rotate object
Fixes #3585 Always Sequential Printing Error (Regardless of setting, placement or object size)

Fixed some collisions in sequential print just after arrangement by
making the validation using a slightly lower extruder radius value
than the arrangement.

Refactored PrintObject coordinate system so that the PrintObject's
coordinate system is always centered in respect to its ModelObject's
geometries. This refactoring may improve path planning a bit and
it may lower the requirements on bits representing Clipper coordinates
by 1 bit.
2020-02-07 14:10:27 +01:00
bubnikv
71fa411100 Refactored PrintObject::m_copies to PrintInstances,
so that the ordering code at G-code export may work directly with
pointers to PrintInstances instead of with pair of <PrintObject, copy idx>.
Also the PrintInstance knows its source ModelInstance, which allows
sorting of PrintInstances for sequential printing in the order
they appear in Plater's object list.
2020-01-23 09:53:06 +01:00
bubnikv
aff5adaaa0 Fixed a typo in extrusion ordering, pointed by @supermerill 2019-12-17 10:55:50 +01:00
bubnikv
b061904ad8 Fixes by @supermerill from pull request "ShortestPath fix" #3306 2019-12-13 15:40:42 +01:00
bubnikv
afa72da9d1 Fix of infill connecting along perimeter lines,
new 3-opt iterative improvement of infill path (currently disabled,
it is extremely slow)
2019-12-02 15:01:52 +01:00
bubnikv
d3ec53d9a6 WIP: Improvement in path planning
reorder_by_three_exchanges_with_segment_flipping()
works, but it is excessively slow, with close to O(n^3) time complexity.
Commited, but not used in production until sped up.
2019-11-25 15:55:59 +01:00
bubnikv
2b17e81f13 If of the previous commit: Set the MutablePriorityQueue indices
to size_t(-1) when removed from the queue.
2019-11-22 19:09:39 +01:00
bubnikv
4cff569b62 Improvements of infill path planning:
Implementation of 2-opt pairwise exchange iterative improvement
algorithm with an extension to a chain of segments, where
the chain of segments may get flipped during the exchange operation.
The 2-opt exchange algorithm may be quite slow.
2019-11-22 15:33:20 +01:00
bubnikv
dd59945098 Fix of a typo in KDTreeIndirect.
Improvement of the infill path planning.
Regression fix of Gyroid infill crashes.
Some unit tests for elephant foot and path planning.
2019-11-14 17:02:32 +01:00
bubnikv
6d11bfe96a Fixing C++ issues, that the Visual Studio compiler did not report. 2019-09-27 19:18:35 +02:00
bubnikv
85ea0396a4 Merge branch 'master' of https://github.com/Prusa3d/PrusaSlicer 2019-09-27 18:23:36 +02:00
bubnikv
331c187b39 Rest of the path chaining has been replaced with the new algorithm.
PolylineCollection.cpp/hpp was removed, use Polylines instead.
Various first_point() / last_point() now return references, not copies.
2019-09-27 18:17:21 +02:00
Lukas Matena
d57a09558e Several fixes of previous commits related to KDTreeIndirect.hpp and ShortestPath.cpp/.hpp 2019-09-27 13:30:07 +02:00
bubnikv
e65ab90c16 Fix of G-code path planning: Infill lines were incorrectly ordered
for islands with another islands in their holes.

Improvement of chaining of infill lines for 3D honeycomb, Gyroid and
Honeycomb infill: New TSP chaining algorithm is used.
2019-09-27 09:51:07 +02:00
bubnikv
d06831076d WIP: Consolidation of shortest path calculations,
various chaining algorithms are replaced with the improved TSP
algorithm.
2019-09-26 17:30:03 +02:00
bubnikv
10eecb2cab Reworked Traveling Salesman Problem code for simplicity and robustness.
The TSP algorithm is newly used for planning of the printing order
of objects AND their instances.
2019-09-26 16:39:50 +02:00
bubnikv
41495a932a Introduction of a greedy Traveling Salesman Problem algorithm,
producing better shortest path estimate than the "closest next neighbor"
heuristics. The new greedy algorithm utilizes KD tree for closest
end point search, and builds a graph to detect loops.

PerimeterGenerator newly uses the optimized TSP algorithm.

ExtrusionEntity has been refactored / simplified.
2019-09-26 09:44:38 +02:00