Skip to content

Commit

Permalink
Remove hardcode directory, update README
Browse files Browse the repository at this point in the history
  • Loading branch information
zhu-edward committed Jun 17, 2016
1 parent e7ea763 commit dbe7ca9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/dev/ezhu/STLParser/AppSTLParser.cpp
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Empty file removed src/dev/ezhu/STLParser/Out.txt
Empty file.
2 changes: 1 addition & 1 deletion src/dev/ezhu/STLParser/README.md
Expand Up @@ -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
-----------
Expand Down

0 comments on commit dbe7ca9

Please sign in to comment.