ENH: speed gcode export up again

thanks prusa

Signed-off-by: salt.wei <salt.wei@bambulab.com>
Change-Id: Ifbe5e2ea55b16a7fe281b54ca16c37695c15f5b1
This commit is contained in:
salt.wei
2023-03-08 17:22:21 +08:00
committed by Lane.Wei
parent c945c47383
commit 4c4b274408
11 changed files with 512 additions and 75 deletions

View File

@@ -0,0 +1,32 @@
#ifndef slic3r_RetractWhenCrossingPerimeters_hpp_
#define slic3r_RetractWhenCrossingPerimeters_hpp_
#include <vector>
#include "../AABBTreeIndirect.hpp"
namespace Slic3r {
// Forward declarations.
class ExPolygon;
class Layer;
class Polyline;
class RetractWhenCrossingPerimeters
{
public:
bool travel_inside_internal_regions(const Layer &layer, const Polyline &travel);
private:
// Last object layer visited, for which a cache of internal islands was created.
const Layer *m_layer;
// Internal islands only, referencing data owned by m_layer->regions()->surfaces().
std::vector<const ExPolygon*> m_internal_islands;
// Search structure over internal islands.
using AABBTree = AABBTreeIndirect::Tree<2, coord_t>;
AABBTree m_aabbtree_internal_islands;
};
} // namespace Slic3r
#endif // slic3r_RetractWhenCrossingPerimeters_hpp_