Files
OrcaSlicer-bambulab/xs/src/libslic3r/BridgeDetector.hpp
T

41 lines
1.1 KiB
C++
Raw Normal View History

2014-11-15 22:41:22 +01:00
#ifndef slic3r_BridgeDetector_hpp_
#define slic3r_BridgeDetector_hpp_
2015-12-08 00:39:54 +01:00
#include "libslic3r.h"
2014-11-15 22:41:22 +01:00
#include "ExPolygon.hpp"
#include "ExPolygonCollection.hpp"
#include <string>
namespace Slic3r {
class BridgeDetector {
2016-09-26 12:53:41 +02:00
public:
// The non-grown hole.
2014-11-15 22:41:22 +01:00
ExPolygon expolygon;
2016-09-26 12:53:41 +02:00
// Lower slices, all regions.
2014-11-15 22:41:22 +01:00
ExPolygonCollection lower_slices;
2016-09-26 12:53:41 +02:00
// Scaled extrusion width of the infill.
double extrusion_width;
// Angle resolution for the brute force search of the best bridging angle.
2014-11-15 22:41:22 +01:00
double resolution;
2016-09-26 12:53:41 +02:00
// The final optimal angle.
2014-11-15 22:41:22 +01:00
double angle;
BridgeDetector(const ExPolygon &_expolygon, const ExPolygonCollection &_lower_slices, coord_t _extrusion_width);
bool detect_angle();
void coverage(double angle, Polygons* coverage) const;
2015-10-26 23:23:03 +01:00
Polygons coverage(double angle = -1) const;
2014-11-15 22:41:22 +01:00
void unsupported_edges(double angle, Polylines* unsupported) const;
2015-10-26 23:23:03 +01:00
Polylines unsupported_edges(double angle = -1) const;
2014-11-15 22:41:22 +01:00
2016-09-26 12:53:41 +02:00
private:
// Open lines representing the supporting edges.
Polylines _edges;
// Closed polygons representing the supporting areas.
2014-11-15 22:41:22 +01:00
ExPolygons _anchors;
};
}
#endif