%module{Slic3r::XS}; %{ #include #include "libslic3r/Layer.hpp" %} %name{Slic3r::Layer::Region} class LayerRegion { // owned by Layer, no constructor/destructor Ref layer(); Ref region() %code%{ RETVAL = &THIS->region(); %}; Ref slices() %code%{ RETVAL = &THIS->slices; %}; Ref thin_fills() %code%{ RETVAL = &THIS->thin_fills; %}; Ref fill_surfaces() %code%{ RETVAL = &THIS->fill_surfaces; %}; Ref perimeters() %code%{ RETVAL = &THIS->perimeters; %}; Ref fills() %code%{ RETVAL = &THIS->fills; %}; void prepare_fill_surfaces(); void make_perimeters(SurfaceCollection* slices, SurfaceCollection* fill_surfaces) %code%{ THIS->make_perimeters(*slices, fill_surfaces); %}; double infill_area_threshold(); void export_region_slices_to_svg(const char *path) const; void export_region_fill_surfaces_to_svg(const char *path) const; void export_region_slices_to_svg_debug(const char *name) const; void export_region_fill_surfaces_to_svg_debug(const char *name) const; }; %name{Slic3r::Layer} class Layer { // owned by PrintObject, no constructor/destructor Ref as_layer() %code%{ RETVAL = THIS; %}; int id(); void set_id(int id); Ref object(); 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; %}; size_t region_count(); Ref get_region(int idx); Ref add_region(PrintRegion* print_region); int ptr() %code%{ RETVAL = (int)(intptr_t)THIS; %}; void make_slices(); void backup_untyped_slices(); void restore_untyped_slices(); void make_perimeters(); void make_fills(); void export_region_slices_to_svg(const char *path); void export_region_fill_surfaces_to_svg(const char *path); void export_region_slices_to_svg_debug(const char *name); void export_region_fill_surfaces_to_svg_debug(const char *name); };