Download vendor/libigl/tests/include/igl/triangle/predicates.cpp from AVSim/simulation-package: direct link, hf CLI and curl.
- Browser
- Download file 1.01 kB
-
https://huggingface.co/datasets/AVSim/simulation-package/resolve/main/vendor/libigl/tests/include/igl/triangle/predicates.cpp
- Command line
-
hf download hf://datasets/AVSim/simulation-package/vendor/libigl/tests/include/igl/triangle/predicates.cpp
-
curl -L -o predicates.cpp https://huggingface.co/datasets/AVSim/simulation-package/resolve/main/vendor/libigl/tests/include/igl/triangle/predicates.cpp
1.01 kB
| TEST_CASE("predicates and triangle", "[igl][predicates][triangle]") { | |
| using namespace igl::predicates; | |
| using Scalar = double; | |
| igl::predicates::exactinit(); | |
| SECTION("Predicate and triangle") { | |
| Eigen::Matrix<double, -1, -1> vertices(4, 2); | |
| Eigen::Matrix<double, -1, -1> holes; | |
| Eigen::Matrix<int, -1, -1> edges; | |
| vertices << 0.0, 0.0, | |
| 1.0, 0.0, | |
| 0.0, 1.0, | |
| 1.0, 1.0; | |
| Eigen::Matrix<double, -1, -1> out_vertices; | |
| Eigen::Matrix<int, -1, -1> out_faces; | |
| // Run constrained Delaunay. | |
| igl::triangle::triangulate(vertices, edges, holes, "QcYY", | |
| out_vertices, out_faces); | |
| REQUIRE(out_vertices.rows() == 4); | |
| REQUIRE(out_vertices.cols() == 2); | |
| REQUIRE(out_faces.rows() == 2); | |
| REQUIRE(out_faces.cols() == 3); | |
| } | |
| } | |