Небольшой пример первого варианта:
Код: Выделить всё
#include "common.hpp"
int main(int argc, char ** argv)
{
Nef_polyhedron nef_poly;
std::ifstream is("test.off", std::ios::in);
CGAL::OFF_to_nef_3(is, nef_poly);
is.close();
return 0;
}
Код: Выделить всё
#include "common.hpp"
int main(int argc, char ** argv)
{
Polyhedron poly;
std::ifstream is("test.off", std::ios::in);
bool success = CGAL::IO::read_OFF(is, poly);
is.close();
assert(success);
assert(poly.is_valid());
assert(poly.is_closed());
Nef_polyhedron nef_poly(poly); //
Подробнее здесь: [url]https://stackoverflow.com/questions/79026788/behavioral-difference-between-constructing-a-nef-polyhedron-3-directly-from-of[/url]