add GTest infrastructure and port first mathematical tests from Java
- Add Google Test via CMake FetchContent (v1.14.0) - Add clausen.hpp: Clausen integral, Lobachevsky function, Im(Li2) - Add hyper_ideal_utility.hpp: generalized and ideal-vertex hyperbolic tetrahedron volume formulas using Eigen for the 4x4 Gram determinant - Port ClausenTest (5 tests) and HyperIdealUtilityTest (8 tests) from Java/JUnit — all 13 pass with same tolerances as the Java originals - Fix pre-existing VIEWER/viewer case mismatch in CMakeLists.txt Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include <CGAL/Surface_mesh.h>
|
||||
#include <CGAL/IO/polygon_mesh_io.h>
|
||||
|
||||
|
||||
#include "viewer_utils.h"
|
||||
#include "mesh_utils.hpp"
|
||||
|
||||
@@ -34,7 +35,6 @@ bool parse_arguments(int argc, char* argv[], std::string& input_file, std::strin
|
||||
} catch (const CLI::ParseError &e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
if (input_file.empty()) {
|
||||
std::cerr << "Input file is required.\n";
|
||||
@@ -45,12 +45,18 @@ bool parse_arguments(int argc, char* argv[], std::string& input_file, std::strin
|
||||
std::cerr << "Unsupported file format. Please provide an OFF file.\n";
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
std::cout << "Input file: " << input_file << "\n";
|
||||
std::cout << "Output file: " << output_file << "\n";
|
||||
std::cout << "Show mesh: " << (show ? "Yes" : "No") << "\n";
|
||||
std::cout << "Verbose: " << (verbose ? "Yes" : "No") << "\n";
|
||||
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
std::string input_file;
|
||||
@@ -63,17 +69,15 @@ int main(int argc, char* argv[])
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
std::cout << "Input file: " << input_file << "\n";
|
||||
std::cout << "Output file: " << output_file << "\n";
|
||||
std::cout << "Show mesh: " << (show ? "Yes" : "No") << "\n";
|
||||
std::cout << "Verbose: " << (verbose ? "Yes" : "No") << "\n";
|
||||
|
||||
Mesh surface_mesh;
|
||||
if (!CGAL::IO::read_polygon_mesh(input_file, surface_mesh) || surface_mesh.is_empty()) {
|
||||
std::cerr << "Invalid input file: " << input_file << "\n";
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// #TODO: later: here we would call the unwrapping code, e.g.:
|
||||
// UnwrapSettings settings;
|
||||
// settings.target_geometry = TargetGeometry::Euclidean;
|
||||
|
||||
Reference in New Issue
Block a user