ExtrusionSimulator.xsp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. %module{Slic3r::XS};
  2. %{
  3. #include <xsinit.h>
  4. #include "libslic3r/ExtrusionSimulator.hpp"
  5. %}
  6. %name{Slic3r::ExtrusionSimulator} class ExtrusionSimulator {
  7. ~ExtrusionSimulator();
  8. %name{_new} ExtrusionSimulator();
  9. Clone<ExtrusionSimulator> clone()
  10. %code{% RETVAL = THIS; %};
  11. void set_image_size(Point *image_size)
  12. %code{% THIS->set_image_size(*image_size); %};
  13. void set_viewport(BoundingBox *viewport)
  14. %code{% THIS->set_viewport(*viewport); %};
  15. void set_bounding_box(BoundingBox *bbox)
  16. %code{% THIS->set_bounding_box(*bbox); %};
  17. void reset_accumulator();
  18. void extrude_to_accumulator(ExtrusionPath *path, Point *shift, ExtrusionSimulationType simulationType)
  19. %code{% THIS->extrude_to_accumulator(*path, *shift, simulationType); %};
  20. void evaluate_accumulator(ExtrusionSimulationType simulationType);
  21. void* image_ptr()
  22. %code{% RETVAL = const_cast<void*>(const_cast<Slic3r::ExtrusionSimulator*>(THIS)->image_ptr()); %};
  23. %{
  24. %}
  25. };
  26. %package{Slic3r::ExtrusionSimulator};
  27. %{
  28. IV
  29. _constant()
  30. ALIAS:
  31. EXTRSIM_SIMPLE = ExtrusionSimulationSimple
  32. EXTRSIM_DONT_SPREAD = ExtrusionSimulationDontSpread
  33. EXTRSIM_SPREAD_NFULL = ExtrisopmSimulationSpreadNotOverfilled
  34. EXTRSIM_SPREAD_FULL = ExtrusionSimulationSpreadFull
  35. EXTRSIM_SPREAD_EXCESS = ExtrusionSimulationSpreadExcess
  36. PROTOTYPE:
  37. CODE:
  38. RETVAL = ix;
  39. OUTPUT: RETVAL
  40. %}