slasupporttree.cpp 903 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #include <iostream>
  2. #include <fstream>
  3. #include <string>
  4. #include <libslic3r/libslic3r.h>
  5. #include <libslic3r/Model.hpp>
  6. #include <libslic3r/Tesselate.hpp>
  7. #include <libslic3r/ClipperUtils.hpp>
  8. #include <libslic3r/SLA/SLAAutoSupports.hpp>
  9. #include <libslic3r/SLA/SLASupportTree.hpp>
  10. #include <libslic3r/SLAPrint.hpp>
  11. #include <libslic3r/MTUtils.hpp>
  12. #include <tbb/parallel_for.h>
  13. #include <tbb/mutex.h>
  14. #include <future>
  15. const std::string USAGE_STR = {
  16. "Usage: slasupporttree stlfilename.stl"
  17. };
  18. int main(const int argc, const char *argv[]) {
  19. using namespace Slic3r;
  20. using std::cout; using std::endl;
  21. if(argc < 2) {
  22. cout << USAGE_STR << endl;
  23. return EXIT_SUCCESS;
  24. }
  25. DynamicPrintConfig config;
  26. Model model = Model::read_from_file(argv[1], &config);
  27. SLAPrint print;
  28. print.apply(model, config);
  29. print.process();
  30. return EXIT_SUCCESS;
  31. }