main.cpp 608 B

123456789101112131415161718192021222324
  1. #include "GCodeChecker.h"
  2. using namespace std;
  3. using namespace BambuStudio;
  4. int main(int argc, char *argv[])
  5. {
  6. if (argc != 2) {
  7. cout << "Invalid input arguments" << endl;
  8. return -1;
  9. }
  10. string path(argv[1]);
  11. cout << "Start to check file " << path << endl;
  12. GCodeChecker checker;
  13. //BBS: parse and check whether has invalid gcode
  14. if (checker.parse_file(path) != GCodeCheckResult::Success) {
  15. cout << "Failed to parse and check file " << path << endl;
  16. return -1;
  17. }
  18. cout << "Success to parse and check file" << path << endl;
  19. return 0;
  20. }