PerimeterGenerator.xsp 1.5 KB

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