mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-20 23:31:13 -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
37
xs/xsp/BridgeDetector.xsp
Normal file
37
xs/xsp/BridgeDetector.xsp
Normal file
|
@ -0,0 +1,37 @@
|
|||
%module{Slic3r::XS};
|
||||
|
||||
%{
|
||||
#include <myinit.h>
|
||||
#include "libslic3r/BridgeDetector.hpp"
|
||||
%}
|
||||
|
||||
%name{Slic3r::BridgeDetector} class BridgeDetector {
|
||||
~BridgeDetector();
|
||||
|
||||
bool detect_angle();
|
||||
Polygons coverage()
|
||||
%code{% THIS->coverage(&RETVAL); %};
|
||||
Polygons coverage_by_angle(double angle)
|
||||
%code{% THIS->coverage(angle, &RETVAL); %};
|
||||
Polylines unsupported_edges()
|
||||
%code{% THIS->unsupported_edges(&RETVAL); %};
|
||||
Polylines unsupported_edges_by_angle(double angle)
|
||||
%code{% THIS->unsupported_edges(angle, &RETVAL); %};
|
||||
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;
|
||||
long extrusion_width;
|
||||
CODE:
|
||||
RETVAL = new BridgeDetector(*expolygon, *lower_slices, extrusion_width);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
%}
|
||||
};
|
|
@ -55,4 +55,28 @@ chained_path_from(points, start_from)
|
|||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
double
|
||||
rad2deg(angle)
|
||||
double angle
|
||||
CODE:
|
||||
RETVAL = Slic3r::Geometry::rad2deg(angle);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
double
|
||||
rad2deg_dir(angle)
|
||||
double angle
|
||||
CODE:
|
||||
RETVAL = Slic3r::Geometry::rad2deg_dir(angle);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
double
|
||||
deg2rad(angle)
|
||||
double angle
|
||||
CODE:
|
||||
RETVAL = Slic3r::Geometry::deg2rad(angle);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
|
||||
%}
|
||||
|
|
|
@ -165,6 +165,10 @@ GCodeWriter* O_OBJECT_SLIC3R
|
|||
Ref<GCodeWriter> O_OBJECT_SLIC3R_T
|
||||
Clone<GCodeWriter> O_OBJECT_SLIC3R_T
|
||||
|
||||
BridgeDetector* O_OBJECT_SLIC3R
|
||||
Ref<BridgeDetector> O_OBJECT_SLIC3R_T
|
||||
Clone<BridgeDetector> O_OBJECT_SLIC3R_T
|
||||
|
||||
ExtrusionLoopRole T_UV
|
||||
ExtrusionRole T_UV
|
||||
FlowRole T_UV
|
||||
|
|
|
@ -87,6 +87,9 @@
|
|||
%typemap{GCodeWriter*};
|
||||
%typemap{Ref<GCodeWriter>}{simple};
|
||||
%typemap{Clone<GCodeWriter>}{simple};
|
||||
%typemap{BridgeDetector*};
|
||||
%typemap{Ref<BridgeDetector>}{simple};
|
||||
%typemap{Clone<BridgeDetector>}{simple};
|
||||
|
||||
%typemap{Surface*};
|
||||
%typemap{Ref<Surface>}{simple};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue