PrusaSlicer-NonPlainar/xs/xsp/BridgeDetector.xsp
bubnikv 47d904a628 Changed the Slic3r coordinate type from long to int32 to match
the point type on Windows / Linux / OSX
to achieve the same behavior on all the 32 / 64bit systems.
(Windows always treats the long as 32bit int, while Linux treats
long as a 64bit int).
2018-02-12 18:16:10 +01:00

44 lines
1.2 KiB
Plaintext

%module{Slic3r::XS};
%{
#include <xsinit.h>
#include "libslic3r/BridgeDetector.hpp"
%}
%name{Slic3r::BridgeDetector} class BridgeDetector {
~BridgeDetector();
bool detect_angle();
Polygons coverage();
%name{coverage_by_angle} Polygons coverage(double angle);
Polylines unsupported_edges();
%name{unsupported_edges_by_angle} Polylines unsupported_edges(double angle);
double angle()
%code{% RETVAL = THIS->angle; %};
double resolution()
%code{% RETVAL = THIS->resolution; %};
%{
BridgeDetector*
BridgeDetector::new(expolygon, lower_slices, extrusion_width)
ExPolygon* expolygon;
ExPolygonCollection* lower_slices;
int extrusion_width;
CODE:
RETVAL = new BridgeDetector(*expolygon, *lower_slices, extrusion_width);
OUTPUT:
RETVAL
BridgeDetector*
BridgeDetector::new_expolygons(expolygons, lower_slices, extrusion_width)
ExPolygonCollection* expolygons;
ExPolygonCollection* lower_slices;
int extrusion_width;
CODE:
RETVAL = new BridgeDetector(expolygons->expolygons, *lower_slices, extrusion_width);
OUTPUT:
RETVAL
%}
};