mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-17 03:37:54 -06:00
Refactoring of EdgeGrid to accept an segment to segment visitor.
WIP: PolygonTrimmer to trim skirt & brim with polygons stored in EdgeGrid.
This commit is contained in:
parent
668a8cd2ea
commit
dc3a0a0ab3
6 changed files with 272 additions and 152 deletions
31
src/libslic3r/PolygonTrimmer.hpp
Normal file
31
src/libslic3r/PolygonTrimmer.hpp
Normal file
|
@ -0,0 +1,31 @@
|
|||
#ifndef slic3r_PolygonTrimmer_hpp_
|
||||
#define slic3r_PolygonTrimmer_hpp_
|
||||
|
||||
#include "libslic3r.h"
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include "Line.hpp"
|
||||
#include "MultiPoint.hpp"
|
||||
#include "Polyline.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
namespace EdgeGrid {
|
||||
class Grid;
|
||||
}
|
||||
|
||||
struct TrimmedLoop
|
||||
{
|
||||
std::vector<Point> points;
|
||||
// Number of points per segment. Empty if the loop is
|
||||
std::vector<unsigned int> segments;
|
||||
|
||||
bool is_trimmed() const { return ! segments.empty(); }
|
||||
};
|
||||
|
||||
TrimmedLoop trim_loop(const Polygon &loop, const EdgeGrid::Grid &grid);
|
||||
std::vector<TrimmedLoop> trim_loops(const Polygons &loops, const EdgeGrid::Grid &grid);
|
||||
|
||||
} // namespace Slic3r
|
||||
|
||||
#endif /* slic3r_PolygonTrimmer_hpp_ */
|
Loading…
Add table
Add a link
Reference in a new issue