Skip to content

Instantly share code, notes, and snippets.

@afabri
Created October 30, 2023 15:24
Show Gist options
  • Save afabri/cddea2aef598be78ad99574232987f2d to your computer and use it in GitHub Desktop.
Save afabri/cddea2aef598be78ad99574232987f2d to your computer and use it in GitHub Desktop.
read_STL
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/boost/graph/IO/STL.h>
#include <CGAL/Polygon_mesh_processing/orientation.h>
typedef CGAL::Exact_predicates_inexact_constructions_kernel C_Kernel;
typedef CGAL::Polyhedron_3<C_Kernel> C_Polyhedron;
int main()
{
C_Polyhedron poly;
CGAL::IO::read_STL("./test.stl", poly);
std::cout << num_faces(poly) << std::endl;
bool is_outward_oriented = CGAL::Polygon_mesh_processing::is_outward_oriented(poly);// crashes
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment