mirror of https://github.com/CGAL/cgal
Merge pull request #7215 from bkhanal-11/master
Modified polyfit examples to take in user input
This commit is contained in:
commit
d528e54490
|
|
@ -39,9 +39,9 @@ typedef CGAL::Nth_of_tuple_property_map<2, PNI>
|
|||
* candidate generation are cached and reused.
|
||||
*/
|
||||
|
||||
int main()
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
const std::string& input_file(CGAL::data_file_path("points_3/building.ply"));
|
||||
const std::string input_file = (argc > 1) ? argv[1] : CGAL::data_file_path("points_3/building.ply");
|
||||
std::ifstream input_stream(input_file.c_str());
|
||||
|
||||
std::vector<PNI> points; // store points
|
||||
|
|
|
|||
|
|
@ -39,9 +39,9 @@ typedef CGAL::Nth_of_tuple_property_map<2, PNI>
|
|||
* the point is not assigned to a plane).
|
||||
*/
|
||||
|
||||
int main()
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
const std::string& input_file(CGAL::data_file_path("points_3/ball.ply"));
|
||||
const std::string input_file = (argc > 1) ? argv[1] : CGAL::data_file_path("points_3/ball.ply");
|
||||
std::ifstream input_stream(input_file.c_str());
|
||||
|
||||
std::vector<PNI> points; // store points
|
||||
|
|
|
|||
|
|
@ -83,12 +83,12 @@ private:
|
|||
* the surface model from the planes.
|
||||
*/
|
||||
|
||||
int main()
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
Point_vector points;
|
||||
|
||||
// Load point set from a file.
|
||||
const std::string input_file(CGAL::data_file_path("points_3/cube.pwn"));
|
||||
const std::string input_file = (argc > 1) ? argv[1] : CGAL::data_file_path("points_3/cube.pwn");
|
||||
std::ifstream input_stream(input_file.c_str());
|
||||
if (input_stream.fail()) {
|
||||
std::cerr << "Failed open file \'" << input_file << "\'" << std::endl;
|
||||
|
|
|
|||
|
|
@ -52,12 +52,12 @@ typedef CGAL::Surface_mesh<Point>
|
|||
* the surface model from the planes.
|
||||
*/
|
||||
|
||||
int main()
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
Point_vector points;
|
||||
|
||||
// Loads point set from a file.
|
||||
const std::string input_file(CGAL::data_file_path("points_3/cube.pwn"));
|
||||
const std::string input_file = (argc > 1) ? argv[1] : CGAL::data_file_path("points_3/cube.pwn");
|
||||
std::ifstream input_stream(input_file.c_str());
|
||||
if (input_stream.fail()) {
|
||||
std::cerr << "failed open file \'" <<input_file << "\'" << std::endl;
|
||||
|
|
|
|||
Loading…
Reference in New Issue