From dbe7ca9b842cde5ddbc0c80a5805879b2462c2d4 Mon Sep 17 00:00:00 2001 From: Edward Zhu Date: Fri, 17 Jun 2016 11:14:33 -0700 Subject: [PATCH] Remove hardcode directory, update README --- src/dev/ezhu/STLParser/AppSTLParser.cpp | 12 ++++++------ src/dev/ezhu/STLParser/Out.txt | 0 src/dev/ezhu/STLParser/README.md | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 src/dev/ezhu/STLParser/Out.txt diff --git a/src/dev/ezhu/STLParser/AppSTLParser.cpp b/src/dev/ezhu/STLParser/AppSTLParser.cpp index fc75b9112..4d0c18e74 100644 --- a/src/dev/ezhu/STLParser/AppSTLParser.cpp +++ b/src/dev/ezhu/STLParser/AppSTLParser.cpp @@ -9,18 +9,18 @@ using namespace std; int main(int argc, char* argv[]) { // Check for number of arguments if (argc <= 2) { - cout << "Not enough arguments, please use ./AppSTLParser [filename_in] [filename_out]" << endl; + cout << "Not enough arguments, please use ./AppSTLParser [path/filename_in] [path/filename_out]" << endl; exit(EXIT_FAILURE); } else if (argc > 3) { - cout << "Too many arguments, please use ./AppSTLParser [filename_in] [filename_out]" << endl; + cout << "Too many arguments, please use ./AppSTLParser [path/filename_in] [path/filename_out]" << endl; exit(EXIT_FAILURE); } else { // Get filenames from argv string filename_in = argv[1]; string filename_out = argv[2]; - string out_path = "/home/edward/NTRTsim/src/dev/ezhu/STLParser/"; + //string out_path = "/home/edward/NTRTsim/src/dev/ezhu/STLParser/"; // Check for valid file extension if (strstr(filename_in.c_str(), ".stl") == NULL) { cout << "Incorrect filetype, application for ASCII STL files only" << endl; @@ -41,10 +41,10 @@ int main(int argc, char* argv[]) { else { cout << "Input file opened successfully" << endl; } - out_path = out_path + filename_out; - cout << "Parsed info writing to: " << out_path << endl; + //out_path = out_path + filename_out; + cout << "Parsed info writing to: " << filename_out << endl; // Open output file - file_out.open(out_path.c_str(), fstream::out); + file_out.open(filename_out.c_str(), fstream::out); // Check if output file opened successfully if (!file_out.is_open()) { cout << "Failed to open output file" << endl; diff --git a/src/dev/ezhu/STLParser/Out.txt b/src/dev/ezhu/STLParser/Out.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/dev/ezhu/STLParser/README.md b/src/dev/ezhu/STLParser/README.md index 1545c640b..f702ef22c 100644 --- a/src/dev/ezhu/STLParser/README.md +++ b/src/dev/ezhu/STLParser/README.md @@ -4,7 +4,7 @@ An application for parsing ASCII STL files for easy import of triangle meshes in USAGE ----------- -$ ./appSTLParser [filename is .stl to be converted] +$ ./appSTLParser [path/filename of .stl to be converted] [path/filename of .txt to be created with parsed info] Author -----------