mirror of https://github.com/CGAL/cgal
remove .cmd files for examples
This commit is contained in:
parent
a3cf61fc8c
commit
bd345c7f83
|
|
@ -1 +0,0 @@
|
|||
cube.off
|
||||
|
|
@ -1 +0,0 @@
|
|||
cube.off
|
||||
|
|
@ -1 +0,0 @@
|
|||
cube.off
|
||||
|
|
@ -1 +0,0 @@
|
|||
cube.off
|
||||
|
|
@ -1 +0,0 @@
|
|||
cube.off
|
||||
|
|
@ -1 +0,0 @@
|
|||
cube.off
|
||||
|
|
@ -1 +0,0 @@
|
|||
cube.off
|
||||
|
|
@ -1 +0,0 @@
|
|||
cube.off
|
||||
|
|
@ -1 +0,0 @@
|
|||
cube.off
|
||||
|
|
@ -1 +0,0 @@
|
|||
cube.off
|
||||
|
|
@ -1 +0,0 @@
|
|||
data/prim.off
|
||||
|
|
@ -1 +0,0 @@
|
|||
data/b9_training.ply
|
||||
|
|
@ -188,17 +188,18 @@ using CTP = CGAL::Constrained_triangulation_plus_2<CDT>;
|
|||
|
||||
int main (int argc, char** argv)
|
||||
{
|
||||
const std::string fname = argc != 2 ? "data/b9_training.ply" : argv[1];
|
||||
if (argc != 2)
|
||||
{
|
||||
std::cerr << "Usage: " << argv[0] << " points.ply" << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
std::cerr << "Running with default value " << fname << "\n";
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
//! [Init DSM]
|
||||
|
||||
// Read points
|
||||
std::ifstream ifile (argv[1], std::ios_base::binary);
|
||||
std::ifstream ifile (fname, std::ios_base::binary);
|
||||
CGAL::Point_set_3<Point_3> points;
|
||||
ifile >> points;
|
||||
std::cerr << points.size() << " point(s) read" << std::endl;
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
6
|
||||
|
|
@ -12,12 +12,12 @@ typedef Kernel::Direction_2 Direction_2;
|
|||
|
||||
int main(int argc, char ** argv) {
|
||||
|
||||
unsigned int k = argc < 2 ? 6 : atoi(argv[1]);
|
||||
if (argc < 2) {
|
||||
std::cout << "Usage: " << argv[0] << " <no. of cones> [<direction-x> <direction-y>]" << std::endl;
|
||||
return 1;
|
||||
std::cout << "Using default value " << k << "\n";
|
||||
}
|
||||
|
||||
unsigned int k = atoi(argv[1]);
|
||||
if (k<2) {
|
||||
std::cout << "The number of cones should be larger than 1!" << std::endl;
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
6 data/n20.cin
|
||||
|
|
@ -32,18 +32,20 @@ typedef boost::adjacency_list<boost::listS,
|
|||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
const std::string fname = argc!=3 ? "data/n20.cin" : argv[2];
|
||||
unsigned int k = argc!=3 ? 6 : atoi(argv[1]);
|
||||
|
||||
if (argc != 3) {
|
||||
std::cout << "Usage: " << argv[0] << " <no. of cones> <input filename>" << std::endl;
|
||||
return 1;
|
||||
std::cout << "Using default values " << k << " " << fname << "\n";
|
||||
}
|
||||
unsigned int k = atoi(argv[1]);
|
||||
|
||||
if (k<2) {
|
||||
std::cout << "The number of cones should be larger than 1!" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
// open the file containing the vertex list
|
||||
std::ifstream inf(argv[2]);
|
||||
std::ifstream inf(fname);
|
||||
if (!inf) {
|
||||
std::cout << "Cannot open file " << argv[1] << "!" << std::endl;
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
data/skull_2.9.inr 1.5 2.9 3.5
|
||||
|
|
@ -52,8 +52,10 @@ int main(int argc, char*argv[])
|
|||
|
||||
typedef boost::container::flat_set<float> Flat_set;
|
||||
Flat_set iso_values;
|
||||
if(argc < 3) {
|
||||
if(argc < 2) {
|
||||
iso_values.insert(1.5f);
|
||||
iso_values.insert(2.9f);
|
||||
iso_values.insert(3.5f);
|
||||
} else {
|
||||
for(int i = 2; i < argc; ++i) {
|
||||
iso_values.insert(static_cast<float>(std::atof(argv[i])));
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
data/ChineseDragon-10kv.off ChineseDragon-10kv.pwn -nb_neighbors_jet_fitting 10 -nb_neighbors_mst 10
|
||||
|
|
@ -184,7 +184,8 @@ int main(int argc, char * argv[])
|
|||
std::cerr << " using a Minimum Spanning Tree (default=MST)\n";
|
||||
std::cerr << " -nb_neighbors_mst <int> Number of neighbors\n";
|
||||
std::cerr << " to compute the MST (default=18)\n";
|
||||
return EXIT_FAILURE;
|
||||
std::cerr << "Running with " << argv[0] << "data/ChineseDragon-10kv.off ChineseDragon-10kv.pwn"
|
||||
<< " -nb_neighbors_jet_fitting 10 -nb_neighbors_mst 10\n";
|
||||
}
|
||||
|
||||
// Normals Computing options
|
||||
|
|
@ -197,8 +198,14 @@ int main(int argc, char * argv[])
|
|||
std::string orient = "MST"; // orient normals using a Minimum Spanning Tree
|
||||
|
||||
// decode parameters
|
||||
std::string input_filename = argv[1];
|
||||
std::string output_filename = argv[2];
|
||||
std::string input_filename = argc == 1 ? "data/ChineseDragon-10kv.off" : argv[1];
|
||||
std::string output_filename = argc == 1 ? "ChineseDragon-10kv.pwn" : argv[2];
|
||||
if (argc==1)
|
||||
{
|
||||
nb_neighbors_jet_fitting_normals = 10;
|
||||
nb_neighbors_mst = 10
|
||||
}
|
||||
|
||||
for (int i=3; i+1<argc ; ++i)
|
||||
{
|
||||
if (std::string(argv[i])=="-estimate") {
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
data/kitten.xyz kitten_poisson-20-100-0.5.off -sm_distance 0.5
|
||||
|
|
@ -115,8 +115,7 @@ int main(int argc, char * argv[])
|
|||
std::cerr << "Options:\n";
|
||||
std::cerr << " -sm_radius <float> Radius upper bound (default=100 * average spacing)\n";
|
||||
std::cerr << " -sm_distance <float> Distance upper bound (default=0.25 * average spacing)\n";
|
||||
|
||||
return EXIT_FAILURE;
|
||||
std::cerr << "Running " << argv[0] << "data/kitten.xyz kitten_poisson-20-100-0.5.off -sm_distance 0.5\n";
|
||||
}
|
||||
|
||||
// Poisson options
|
||||
|
|
@ -128,8 +127,8 @@ int main(int argc, char * argv[])
|
|||
double average_spacing_ratio = 5;
|
||||
|
||||
// decode parameters
|
||||
std::string input_filename = argv[1];
|
||||
std::string output_filename = argv[2];
|
||||
std::string input_filename = argc == 1 ? "data/kitten.xyz" : argv[1];
|
||||
std::string output_filename = argc == 1 ? "kitten_poisson-20-100-0.5.off" : argv[2];
|
||||
for (int i=3; i+1<argc ; ++i)
|
||||
{
|
||||
if (std::string(argv[i])=="-sm_radius")
|
||||
|
|
@ -148,6 +147,8 @@ int main(int argc, char * argv[])
|
|||
}
|
||||
}
|
||||
|
||||
if (argc == 1) sm_distance = 0.5;
|
||||
|
||||
CGAL::Timer task_timer; task_timer.start();
|
||||
|
||||
//***************************************
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
data/kitten.xyz
|
||||
data/kitten.xyz 1
|
||||
data/kitten.xyz 2
|
||||
|
|
@ -37,17 +37,17 @@ int main(int argc, char*argv[])
|
|||
|
||||
Point_set points;
|
||||
|
||||
std::string fname = argc==1?"data/kitten.xyz" : argv[1];
|
||||
if (argc < 2)
|
||||
{
|
||||
std::cerr << "Usage: " << argv[0] << " [input.xyz/off/ply/las]" << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
std::cerr <<"Running " << argv[0] << " data/kitten.xyz -1\n";
|
||||
}
|
||||
|
||||
const char* input_file = argv[1];
|
||||
std::ifstream stream (input_file, std::ios_base::binary);
|
||||
std::ifstream stream (fname, std::ios_base::binary);
|
||||
if (!stream)
|
||||
{
|
||||
std::cerr << "Error: cannot read file " << input_file << std::endl;
|
||||
std::cerr << "Error: cannot read file " << fname << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
|
@ -104,10 +104,10 @@ int main(int argc, char*argv[])
|
|||
//! [Smoothing]
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
unsigned int reconstruction_choice
|
||||
= (argc < 3 ? 0 : atoi(argv[2]));
|
||||
int reconstruction_choice
|
||||
= argc==1? -1 : (argc < 3 ? 0 : atoi(argv[2]));
|
||||
|
||||
if (reconstruction_choice == 0) // Poisson
|
||||
if (reconstruction_choice == 0 || reconstruction_choice==-1) // Poisson
|
||||
{
|
||||
///////////////////////////////////////////////////////////////////
|
||||
//! [Normal estimation]
|
||||
|
|
@ -139,7 +139,7 @@ int main(int argc, char*argv[])
|
|||
///////////////////////////////////////////////////////////////////
|
||||
//! [Output poisson]
|
||||
|
||||
std::ofstream f ("out.ply", std::ios_base::binary);
|
||||
std::ofstream f ("out_poisson.ply", std::ios_base::binary);
|
||||
CGAL::IO::set_binary_mode (f);
|
||||
CGAL::IO::write_PLY(f, output_mesh);
|
||||
f.close ();
|
||||
|
|
@ -147,7 +147,7 @@ int main(int argc, char*argv[])
|
|||
//! [Output poisson]
|
||||
///////////////////////////////////////////////////////////////////
|
||||
}
|
||||
else if (reconstruction_choice == 1) // Advancing front
|
||||
if (reconstruction_choice == 1 || reconstruction_choice==-1) // Advancing front
|
||||
{
|
||||
///////////////////////////////////////////////////////////////////
|
||||
//! [Advancing front reconstruction]
|
||||
|
|
@ -176,14 +176,14 @@ int main(int argc, char*argv[])
|
|||
|
||||
CGAL::Surface_mesh<Point_3> output_mesh;
|
||||
CGAL::Polygon_mesh_processing::polygon_soup_to_polygon_mesh (vertices, facets, output_mesh);
|
||||
std::ofstream f ("out.off");
|
||||
std::ofstream f ("out_af.off");
|
||||
f << output_mesh;
|
||||
f.close ();
|
||||
|
||||
//! [Output advancing front]
|
||||
///////////////////////////////////////////////////////////////////
|
||||
}
|
||||
else if (reconstruction_choice == 2) // Scale space
|
||||
if (reconstruction_choice == 2 || reconstruction_choice==-1) // Scale space
|
||||
{
|
||||
///////////////////////////////////////////////////////////////////
|
||||
//! [Scale space reconstruction]
|
||||
|
|
@ -202,7 +202,7 @@ int main(int argc, char*argv[])
|
|||
///////////////////////////////////////////////////////////////////
|
||||
//! [Output scale space]
|
||||
|
||||
std::ofstream f ("out.off");
|
||||
std::ofstream f ("out_sp.off");
|
||||
f << "OFF" << std::endl << points.size () << " "
|
||||
<< reconstruct.number_of_facets() << " 0" << std::endl;
|
||||
for (Point_set::Index idx : points)
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
data/kitten.off
|
||||
|
|
@ -16,15 +16,13 @@ typedef Reconstruction::Facet_const_iterator Facet_iterator;
|
|||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
if (argc != 2)
|
||||
{
|
||||
std::cerr << "Error, no input file provided\n";
|
||||
return 1;
|
||||
}
|
||||
// Read the data.
|
||||
std::vector<Point> points;
|
||||
std::std::string fname = argc==1?"data/kitten.off":argv[1];
|
||||
|
||||
std::cerr << "Reading " << std::flush;
|
||||
std::vector<Point> points;
|
||||
if(!CGAL::IO::read_points(argv[1], std::back_inserter(points)))
|
||||
if(!CGAL::IO::read_points(fname, std::back_inserter(points)))
|
||||
{
|
||||
std::cerr << "Error: cannot read file" << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
data/kitten.off
|
||||
|
|
@ -23,16 +23,12 @@ typedef Reconstruction::Facet_const_iterator Facet_iterator;
|
|||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
if (argc != 2)
|
||||
{
|
||||
std::cerr << "Error, no input file provided\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Read the data.
|
||||
Point_set points;
|
||||
std::string fname = argc==1?"data/kitten.off":argv[1];
|
||||
std::cerr << "Reading " << std::flush;
|
||||
Point_set points;
|
||||
if(!CGAL::IO::read_point_set(argv[1], points))
|
||||
if(!CGAL::IO::read_point_set(fname, points))
|
||||
{
|
||||
std::cerr << "Error: cannot read file" << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
data/kitten.off
|
||||
|
|
@ -32,15 +32,13 @@ void dump_reconstruction(const Reconstruction& reconstruct, std::string name)
|
|||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
if (argc != 2)
|
||||
{
|
||||
std::cerr << "Error, no input file provided\n";
|
||||
return 1;
|
||||
}
|
||||
// Read the data.
|
||||
std::vector<Point> points;
|
||||
|
||||
std::string fname = argc==1?"data/kitten.off":argv[1];
|
||||
std::cout << "Reading " << std::flush;
|
||||
std::vector<Point> points;
|
||||
if(!CGAL::IO::read_points(argv[1], std::back_inserter(points)))
|
||||
if(!CGAL::IO::read_points(fname, std::back_inserter(points)))
|
||||
{
|
||||
std::cerr << "Error: cannot read file" << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
data/kitten.off
|
||||
|
|
@ -20,17 +20,14 @@ typedef Reconstruction::Facet_const_iterator Facet_iterator;
|
|||
typedef Mesher::Facet_const_iterator Mesher_iterator;
|
||||
typedef CGAL::Timer Timer;
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
if(argc != 2)
|
||||
{
|
||||
std::cerr << "Error, no input file provided\n";
|
||||
return 1;
|
||||
}
|
||||
int main(int argc, char* argv[]) {
|
||||
// Read the data.
|
||||
std::vector<Point> points;
|
||||
std::string fname = argc==1?"data/kitten.off":argv[1];
|
||||
|
||||
std::cerr << "Reading " << std::flush;
|
||||
std::vector<Point> points;
|
||||
if(!CGAL::IO::read_points(argv[1], std::back_inserter(points)))
|
||||
if(!CGAL::IO::read_points(fname, std::back_inserter(points)))
|
||||
{
|
||||
std::cerr << "Error: cannot read file" << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
data/cube.pwn
|
||||
-r data/cube.pwn
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
data/cube.pwn
|
||||
-r data/cube.pwn
|
||||
|
|
@ -1 +0,0 @@
|
|||
data/knot1.off
|
||||
|
|
@ -15,10 +15,11 @@ typedef CGAL::Surface_mesh<Point> Mesh;
|
|||
|
||||
typedef boost::graph_traits<Mesh>::vertex_descriptor vertex_descriptor;
|
||||
|
||||
int main(int /* argc */, char* argv[])
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
Mesh sm;
|
||||
if(!CGAL::IO::read_polygon_mesh(argv[1], sm))
|
||||
std::string fname = argc==1?"data/knot1.off":argv[1];
|
||||
if(!CGAL::IO::read_polygon_mesh(fname, sm))
|
||||
{
|
||||
std::cerr << "Invalid input file." << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
data/knot1.off data/elephant.off
|
||||
|
|
@ -104,16 +104,16 @@ unsigned int intersect(const Mesh& P, const Mesh& Q) {
|
|||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
if(argc < 3)
|
||||
{
|
||||
Mesh P, Q;
|
||||
std::string P_name = argc==1?"data/knot1.off" : argv[1];
|
||||
std::string Q_name = argc<3 ?"data/elephant.off" : argv[2];
|
||||
if(argc < 3) {
|
||||
std::cerr << "Usage: do_intersect <mesh_1.off> <mesh_2.off>" << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
std::cerr << "Running with data/knot1.off and data/elephant.off\n";
|
||||
}
|
||||
|
||||
std::cout.precision(17);
|
||||
|
||||
Mesh P, Q;
|
||||
if(!CGAL::IO::read_polygon_mesh(argv[1], P) || !CGAL::IO::read_polygon_mesh(argv[2], Q))
|
||||
if(!CGAL::IO::read_polygon_mesh(P_name, P) || !CGAL::IO::read_polygon_mesh(Q_name], Q))
|
||||
{
|
||||
std::cerr << "Invalid input files." << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
data/knot1.off
|
||||
|
|
@ -58,7 +58,8 @@ void kruskal(const Mesh& sm)
|
|||
int main(int argc, char** argv)
|
||||
{
|
||||
Mesh sm;
|
||||
if(argc < 2 || !CGAL::IO::read_polygon_mesh(argv[1], sm))
|
||||
std::string fname = argc==1?"data/knot1.off":argv[1];
|
||||
if(argc < 2 || !CGAL::IO::read_polygon_mesh(fname, sm))
|
||||
{
|
||||
std::cerr << "Invalid input file." << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
data/cactus.off data/cactus.sel data/cactus.def
|
||||
|
|
@ -16,15 +16,25 @@ typedef CGAL::Surface_mesh_deformation<Polyhedron,CGAL::Default, CGAL::Default,
|
|||
|
||||
int main(int argc,char** argv)
|
||||
{
|
||||
std::string off_name="input.off", sel_name="input.sel", def_name="input.def";
|
||||
if ( argc!=4){
|
||||
std::cerr <<"Usage " << argv[0] << " input.off input.sel input.def\n";
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
off_name=argv[1];
|
||||
sel_name=argv[2];
|
||||
def_name=argv[3];
|
||||
}
|
||||
|
||||
Polyhedron mesh;
|
||||
std::ifstream input(argv[1]);
|
||||
std::ifstream input(off_name);
|
||||
|
||||
if ( !input || !(input >> mesh) || mesh.empty() ) {
|
||||
std::cerr<< argv[1] << " is not a valid off file" << std::endl;
|
||||
std::cerr<< off_name << " is not a valid off file" << std::endl;
|
||||
data/cactus.off data/cactus.sel data/cactus.def
|
||||
|
||||
return 1;
|
||||
}
|
||||
input.close();
|
||||
|
|
@ -44,7 +54,7 @@ int main(int argc,char** argv)
|
|||
boost::tie(vb, ve) = vertices(mesh);
|
||||
|
||||
//the selection is set by a file
|
||||
input.open(argv[2]);
|
||||
input.open(sel_name);
|
||||
std::string line;
|
||||
std::vector<vertex_descriptor> control_vertices;
|
||||
while(getline(input, line))
|
||||
|
|
@ -69,7 +79,7 @@ int main(int argc,char** argv)
|
|||
}
|
||||
|
||||
//define the transformation
|
||||
input.open(argv[3]);
|
||||
input.open(def_name);
|
||||
double m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, hw, sink;
|
||||
getline(input, line); // skip first comment line
|
||||
input >> m00 >> m01 >> m02 >> m03;
|
||||
|
|
|
|||
Loading…
Reference in New Issue