2014-05-06 08:07:18 +00:00
|
|
|
%module{Slic3r::XS};
|
|
|
|
|
|
|
|
%{
|
|
|
|
#include <myinit.h>
|
2014-08-03 17:42:29 +00:00
|
|
|
#include "libslic3r/Layer.hpp"
|
2014-05-06 08:07:18 +00:00
|
|
|
%}
|
|
|
|
|
|
|
|
%name{Slic3r::Layer::Region} class LayerRegion {
|
|
|
|
// owned by Layer, no constructor/destructor
|
|
|
|
|
2014-05-19 20:38:10 +00:00
|
|
|
Ref<Layer> layer();
|
|
|
|
Ref<PrintRegion> region();
|
2014-05-06 08:07:18 +00:00
|
|
|
|
|
|
|
Ref<SurfaceCollection> slices()
|
|
|
|
%code%{ RETVAL = &THIS->slices; %};
|
|
|
|
Ref<ExtrusionEntityCollection> thin_fills()
|
|
|
|
%code%{ RETVAL = &THIS->thin_fills; %};
|
|
|
|
Ref<SurfaceCollection> fill_surfaces()
|
|
|
|
%code%{ RETVAL = &THIS->fill_surfaces; %};
|
|
|
|
Ref<ExPolygonCollection> bridged()
|
|
|
|
%code%{ RETVAL = &THIS->bridged; %};
|
|
|
|
Ref<PolylineCollection> unsupported_bridge_edges()
|
|
|
|
%code%{ RETVAL = &THIS->unsupported_bridge_edges; %};
|
|
|
|
Ref<ExtrusionEntityCollection> perimeters()
|
|
|
|
%code%{ RETVAL = &THIS->perimeters; %};
|
|
|
|
Ref<ExtrusionEntityCollection> fills()
|
|
|
|
%code%{ RETVAL = &THIS->fills; %};
|
2014-08-03 17:17:23 +00:00
|
|
|
|
|
|
|
Flow* flow(FlowRole role, bool bridge = false, double width = -1)
|
|
|
|
%code%{ RETVAL = new Flow(THIS->flow(role, bridge, width)); %};
|
2014-11-09 15:23:50 +00:00
|
|
|
void merge_slices();
|
2014-05-06 08:07:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
%name{Slic3r::Layer} class Layer {
|
|
|
|
// owned by PrintObject, no constructor/destructor
|
|
|
|
|
2014-05-19 20:38:10 +00:00
|
|
|
int id();
|
|
|
|
Ref<PrintObject> object();
|
2014-05-06 08:07:18 +00:00
|
|
|
Ref<Layer> upper_layer()
|
|
|
|
%code%{ RETVAL = THIS->upper_layer; %};
|
|
|
|
Ref<Layer> lower_layer()
|
|
|
|
%code%{ RETVAL = THIS->lower_layer; %};
|
|
|
|
bool slicing_errors()
|
|
|
|
%code%{ RETVAL = THIS->slicing_errors; %};
|
|
|
|
coordf_t slice_z()
|
|
|
|
%code%{ RETVAL = THIS->slice_z; %};
|
|
|
|
coordf_t print_z()
|
|
|
|
%code%{ RETVAL = THIS->print_z; %};
|
|
|
|
coordf_t height()
|
|
|
|
%code%{ RETVAL = THIS->height; %};
|
|
|
|
|
|
|
|
void set_upper_layer(Layer *layer)
|
|
|
|
%code%{ THIS->upper_layer = layer; %};
|
|
|
|
void set_lower_layer(Layer *layer)
|
|
|
|
%code%{ THIS->lower_layer = layer; %};
|
|
|
|
|
|
|
|
size_t region_count();
|
|
|
|
Ref<LayerRegion> get_region(int idx);
|
|
|
|
Ref<LayerRegion> add_region(PrintRegion* print_region);
|
|
|
|
|
|
|
|
Ref<ExPolygonCollection> slices()
|
|
|
|
%code%{ RETVAL = &THIS->slices; %};
|
2014-06-10 14:17:34 +00:00
|
|
|
|
|
|
|
int ptr()
|
|
|
|
%code%{ RETVAL = (int)(intptr_t)THIS; %};
|
2014-08-03 16:41:09 +00:00
|
|
|
|
|
|
|
void make_slices();
|
2014-05-06 08:07:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
%name{Slic3r::Layer::Support} class SupportLayer {
|
|
|
|
// owned by PrintObject, no constructor/destructor
|
|
|
|
|
|
|
|
Ref<ExPolygonCollection> support_islands()
|
|
|
|
%code%{ RETVAL = &THIS->support_islands; %};
|
|
|
|
Ref<ExtrusionEntityCollection> support_fills()
|
|
|
|
%code%{ RETVAL = &THIS->support_fills; %};
|
|
|
|
Ref<ExtrusionEntityCollection> support_interface_fills()
|
|
|
|
%code%{ RETVAL = &THIS->support_interface_fills; %};
|
|
|
|
|
|
|
|
|
|
|
|
// copies of some Layer methods, because the parameter wrapper code
|
|
|
|
// gets confused about getting a Layer::Support instead of a Layer
|
2014-05-24 21:50:49 +00:00
|
|
|
int id();
|
|
|
|
Ref<PrintObject> object();
|
2014-05-06 08:07:18 +00:00
|
|
|
Ref<SupportLayer> upper_layer()
|
|
|
|
%code%{ RETVAL = (SupportLayer*)THIS->upper_layer; %};
|
|
|
|
Ref<SupportLayer> lower_layer()
|
|
|
|
%code%{ RETVAL = (SupportLayer*)THIS->lower_layer; %};
|
|
|
|
bool slicing_errors()
|
|
|
|
%code%{ RETVAL = THIS->slicing_errors; %};
|
|
|
|
coordf_t slice_z()
|
|
|
|
%code%{ RETVAL = THIS->slice_z; %};
|
|
|
|
coordf_t print_z()
|
|
|
|
%code%{ RETVAL = THIS->print_z; %};
|
|
|
|
coordf_t height()
|
|
|
|
%code%{ RETVAL = THIS->height; %};
|
|
|
|
|
|
|
|
void set_upper_layer(SupportLayer *layer)
|
|
|
|
%code%{ THIS->upper_layer = layer; %};
|
|
|
|
void set_lower_layer(SupportLayer *layer)
|
|
|
|
%code%{ THIS->lower_layer = layer; %};
|
|
|
|
|
|
|
|
size_t region_count();
|
|
|
|
Ref<LayerRegion> get_region(int idx);
|
|
|
|
Ref<LayerRegion> add_region(PrintRegion* print_region);
|
|
|
|
|
|
|
|
Ref<ExPolygonCollection> slices()
|
|
|
|
%code%{ RETVAL = &THIS->slices; %};
|
|
|
|
};
|