PerimeterGenerator.xsp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. %module{Slic3r::XS};
  2. %{
  3. #include <xsinit.h>
  4. #include "libslic3r/PerimeterGenerator.hpp"
  5. %}
  6. %name{Slic3r::Layer::PerimeterGenerator} class PerimeterGenerator {
  7. PerimeterGenerator(SurfaceCollection* slices, double layer_height, Flow* flow,
  8. StaticPrintConfig* region_config, StaticPrintConfig* object_config,
  9. StaticPrintConfig* print_config, ExtrusionEntityCollection* loops,
  10. ExtrusionEntityCollection* gap_fill,
  11. SurfaceCollection* fill_surfaces)
  12. %code{% RETVAL = new PerimeterGenerator(slices, layer_height, *flow,
  13. dynamic_cast<PrintRegionConfig*>(region_config),
  14. dynamic_cast<PrintObjectConfig*>(object_config),
  15. dynamic_cast<PrintConfig*>(print_config),
  16. loops, gap_fill, fill_surfaces); %};
  17. ~PerimeterGenerator();
  18. void set_lower_slices(ExPolygonCollection* lower_slices)
  19. %code{% THIS->lower_slices = &lower_slices->expolygons; %};
  20. void set_layer_id(int layer_id)
  21. %code{% THIS->layer_id = layer_id; %};
  22. void set_perimeter_flow(Flow* flow)
  23. %code{% THIS->perimeter_flow = *flow; %};
  24. void set_ext_perimeter_flow(Flow* flow)
  25. %code{% THIS->ext_perimeter_flow = *flow; %};
  26. void set_overhang_flow(Flow* flow)
  27. %code{% THIS->overhang_flow = *flow; %};
  28. void set_solid_infill_flow(Flow* flow)
  29. %code{% THIS->solid_infill_flow = *flow; %};
  30. Ref<StaticPrintConfig> config()
  31. %code{% RETVAL = THIS->config; %};
  32. void process();
  33. };