2016-04-11 15:09:15 +00:00
|
|
|
%module{Slic3r::XS};
|
|
|
|
|
|
|
|
%{
|
|
|
|
#include <xsinit.h>
|
2016-10-27 15:03:57 +00:00
|
|
|
#include "libslic3r/Fill/Fill.hpp"
|
2016-11-02 09:47:00 +00:00
|
|
|
#include "libslic3r/ExtrusionEntity.hpp"
|
|
|
|
#include "libslic3r/ExtrusionEntityCollection.hpp"
|
2016-04-11 15:09:15 +00:00
|
|
|
%}
|
|
|
|
|
|
|
|
%name{Slic3r::Filler} class Filler {
|
|
|
|
~Filler();
|
|
|
|
|
|
|
|
void set_bounding_box(BoundingBox *bbox)
|
|
|
|
%code{% THIS->fill->set_bounding_box(*bbox); %};
|
|
|
|
void set_spacing(coordf_t spacing)
|
|
|
|
%code{% THIS->fill->spacing = spacing; %};
|
|
|
|
coordf_t spacing()
|
|
|
|
%code{% RETVAL = THIS->fill->spacing; %};
|
|
|
|
void set_layer_id(size_t layer_id)
|
|
|
|
%code{% THIS->fill->layer_id = layer_id; %};
|
|
|
|
void set_z(coordf_t z)
|
|
|
|
%code{% THIS->fill->z = z; %};
|
|
|
|
void set_angle(float angle)
|
|
|
|
%code{% THIS->fill->angle = angle; %};
|
2016-10-27 15:03:57 +00:00
|
|
|
void set_link_max_length(coordf_t len)
|
|
|
|
%code{% THIS->fill->link_max_length = len; %};
|
2016-04-11 15:09:15 +00:00
|
|
|
void set_loop_clipping(coordf_t clipping)
|
|
|
|
%code{% THIS->fill->loop_clipping = clipping; %};
|
|
|
|
|
|
|
|
bool use_bridge_flow()
|
|
|
|
%code{% RETVAL = THIS->fill->use_bridge_flow(); %};
|
|
|
|
bool no_sort()
|
|
|
|
%code{% RETVAL = THIS->fill->no_sort(); %};
|
|
|
|
|
|
|
|
void set_density(float density)
|
|
|
|
%code{% THIS->params.density = density; %};
|
|
|
|
void set_dont_adjust(bool dont_adjust)
|
|
|
|
%code{% THIS->params.dont_adjust = dont_adjust; %};
|
|
|
|
|
|
|
|
PolylineCollection* _fill_surface(Surface *surface)
|
|
|
|
%code{%
|
|
|
|
PolylineCollection *pc = NULL;
|
|
|
|
if (THIS->fill != NULL) {
|
|
|
|
pc = new PolylineCollection();
|
|
|
|
pc->polylines = THIS->fill->fill_surface(surface, THIS->params);
|
|
|
|
}
|
|
|
|
RETVAL = pc;
|
|
|
|
%};
|
|
|
|
|
|
|
|
%{
|
|
|
|
|
|
|
|
Filler*
|
|
|
|
new_from_type(CLASS, type)
|
|
|
|
char* CLASS;
|
|
|
|
std::string type;
|
|
|
|
CODE:
|
|
|
|
Filler *filler = new Filler();
|
|
|
|
filler->fill = Fill::new_from_type(type);
|
|
|
|
RETVAL = filler;
|
|
|
|
OUTPUT:
|
|
|
|
RETVAL
|
|
|
|
|
|
|
|
%}
|
2016-11-02 09:47:00 +00:00
|
|
|
|
2016-04-11 15:09:15 +00:00
|
|
|
};
|