BridgeDetector.xsp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. %module{Slic3r::XS};
  2. %{
  3. #include <xsinit.h>
  4. #include "libslic3r/BridgeDetector.hpp"
  5. %}
  6. %name{Slic3r::BridgeDetector} class BridgeDetector {
  7. ~BridgeDetector();
  8. bool detect_angle();
  9. Polygons coverage();
  10. %name{coverage_by_angle} Polygons coverage(double angle);
  11. Polylines unsupported_edges();
  12. %name{unsupported_edges_by_angle} Polylines unsupported_edges(double angle);
  13. double angle()
  14. %code{% RETVAL = THIS->angle; %};
  15. double resolution()
  16. %code{% RETVAL = THIS->resolution; %};
  17. %{
  18. BridgeDetector*
  19. BridgeDetector::new(expolygon, lower_slices, extrusion_width)
  20. ExPolygon* expolygon;
  21. ExPolygonCollection* lower_slices;
  22. int extrusion_width;
  23. CODE:
  24. RETVAL = new BridgeDetector(*expolygon, lower_slices->expolygons, extrusion_width);
  25. OUTPUT:
  26. RETVAL
  27. BridgeDetector*
  28. BridgeDetector::new_expolygons(expolygons, lower_slices, extrusion_width)
  29. ExPolygonCollection* expolygons;
  30. ExPolygonCollection* lower_slices;
  31. int extrusion_width;
  32. CODE:
  33. RETVAL = new BridgeDetector(expolygons->expolygons, lower_slices->expolygons, extrusion_width);
  34. OUTPUT:
  35. RETVAL
  36. %}
  37. };