mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 07:34:03 -06:00
Ported Slic3r::BridgeDetector to XS
This commit is contained in:
parent
36825e0134
commit
379cde30e2
22 changed files with 539 additions and 307 deletions
33
xs/src/libslic3r/BridgeDetector.hpp
Normal file
33
xs/src/libslic3r/BridgeDetector.hpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
#ifndef slic3r_BridgeDetector_hpp_
|
||||
#define slic3r_BridgeDetector_hpp_
|
||||
|
||||
#include <myinit.h>
|
||||
#include "ExPolygon.hpp"
|
||||
#include "ExPolygonCollection.hpp"
|
||||
#include <string>
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
class BridgeDetector {
|
||||
public:
|
||||
ExPolygon expolygon;
|
||||
ExPolygonCollection lower_slices;
|
||||
double extrusion_width; // scaled
|
||||
double resolution;
|
||||
double angle;
|
||||
|
||||
BridgeDetector(const ExPolygon &_expolygon, const ExPolygonCollection &_lower_slices, coord_t _extrusion_width);
|
||||
bool detect_angle();
|
||||
void coverage(Polygons* coverage) const;
|
||||
void coverage(double angle, Polygons* coverage) const;
|
||||
void unsupported_edges(Polylines* unsupported) const;
|
||||
void unsupported_edges(double angle, Polylines* unsupported) const;
|
||||
|
||||
private:
|
||||
Polylines _edges; // representing the supporting edges
|
||||
ExPolygons _anchors;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue