Extruder.xsp 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. %module{Slic3r::XS};
  2. %{
  3. #include <xsinit.h>
  4. #include "libslic3r/Extruder.hpp"
  5. %}
  6. %name{Slic3r::Extruder} class Extruder {
  7. Extruder(unsigned int id, StaticPrintConfig* config)
  8. %code%{ RETVAL = new Extruder (id, dynamic_cast<GCodeConfig*>(config)); %};
  9. ~Extruder();
  10. void reset();
  11. double extrude(double dE);
  12. double retract(double length, double restart_extra);
  13. double unretract();
  14. double e_per_mm(double mm3_per_mm);
  15. double extruded_volume();
  16. double used_filament();
  17. unsigned int id()
  18. %code%{ RETVAL = THIS->id; %};
  19. double E()
  20. %code%{ RETVAL = THIS->E; %};
  21. double set_E(double val)
  22. %code%{ RETVAL = THIS->E = val; %};
  23. double absolute_E()
  24. %code%{ RETVAL = THIS->absolute_E; %};
  25. double set_absolute_E(double val)
  26. %code%{ RETVAL = THIS->absolute_E = val; %};
  27. double retracted()
  28. %code%{ RETVAL = THIS->retracted; %};
  29. double set_retracted(double val)
  30. %code%{ RETVAL = THIS->retracted = val; %};
  31. double restart_extra()
  32. %code%{ RETVAL = THIS->restart_extra; %};
  33. double set_restart_extra(double val)
  34. %code%{ RETVAL = THIS->restart_extra = val; %};
  35. double e_per_mm3()
  36. %code%{ RETVAL = THIS->e_per_mm3; %};
  37. double retract_speed_mm_min()
  38. %code%{ RETVAL = THIS->retract_speed_mm_min; %};
  39. double filament_diameter();
  40. double filament_density();
  41. double filament_cost();
  42. double extrusion_multiplier();
  43. double retract_length();
  44. double retract_lift();
  45. int retract_speed();
  46. double retract_restart_extra();
  47. double retract_length_toolchange();
  48. double retract_restart_extra_toolchange();
  49. };