CGAL 4.12 - 3D Boolean Operations on Nef Polyhedra

## Functions

template<class Nef_polyhedron , class Polygon_mesh >
void CGAL::convert_nef_polyhedron_to_polygon_mesh (const Nef_polyhedron &nef, Polygon_mesh &pm, bool triangulate_all_faces=false)
Converts an objet of type Nef_polyhedron_3 into a polygon mesh model of MutableFaceGraph. More...

template<class Traits >
istream & CGAL::operator>> (std::istream &in, CGAL::Nef_polyhedron_3< Traits > &N)
This operator reads a Nef polyhedron, which is given in the proprietary file format written by the input operator in and assigns it to N. More...

template<class Traits >
ostream & CGAL::operator<< (std::ostream &out, CGAL::Nef_polyhedron_3< Traits > &N)
This operator writes the Nef polyhedron N to the output stream out using a proprietary file format. More...

template<class Nef_polyhedron_3 >
std::size_t CGAL::OFF_to_nef_3 (std::istream &in, Nef_polyhedron_3 &N)
This function creates a 3D Nef polyhedron from an OFF file which is read from input stream in. More...

## ◆ convert_nef_polyhedron_to_polygon_mesh()

template<class Nef_polyhedron , class Polygon_mesh >
 void CGAL::convert_nef_polyhedron_to_polygon_mesh ( const Nef_polyhedron & nef, Polygon_mesh & pm, bool triangulate_all_faces = false )

#include <CGAL/boost/graph/convert_nef_polyhedron_to_polygon_mesh.h>

Converts an objet of type Nef_polyhedron_3 into a polygon mesh model of MutableFaceGraph.

Note that contrary to Nef_polyhedron_3::convert_to_polyhedron(), the output is not triangulated (but faces with more than one connected component of the boundary). The polygon mesh can be triangulated by setting triangulate_all_faces to true or by calling the function triangulate_faces().

Precondition
Polygon_mesh must have an internal point property map with value type being Nef_polyhedron_3::Point_3.
nef.simple()
Examples:
Nef_3/nef_3_to_surface_mesh.cpp.

## ◆ OFF_to_nef_3()

template<class Nef_polyhedron_3 >
 std::size_t CGAL::OFF_to_nef_3 ( std::istream & in, Nef_polyhedron_3 & N )

#include <CGAL/OFF_to_nef_3.h>

This function creates a 3D Nef polyhedron from an OFF file which is read from input stream in.

The purpose of OFF_to_nef_3 is to create a Nef polyhedron from an OFF file that cannot be handled by the Nef_polyhedron_3 constructors. It handles double coordinates while using a homogenous kernel, non-coplanar facets, surfaces with boundaries, self-intersecting surfaces, and single facets. Every closed volume gets marked. The function returns the number of facets it could not handle.

CGAL::Nef_polyhedron_3<Traits>
Examples:
Nef_3/complex_construction.cpp.

## ◆ operator>>()

template<class Traits >
 istream& CGAL::operator>> ( std::istream & in, CGAL::Nef_polyhedron_3< Traits > & N )

#include <CGAL/IO/Nef_polyhedron_iostream_3.h>

This operator reads a Nef polyhedron, which is given in the proprietary file format written by the input operator in and assigns it to N.

It includes the complete incidence structure, the geometric data, and the marks of each item.

It is recommended to use the CGAL kernels Homogeneous, Simple_homogeneous, or Extended_homogeneous parametrized with any exact number type that models $$\mathbb{Z}$$ (e.g.Gmpz or leda_integer). The input and output iterators of Nef polyhedra parametrized with either of these kernels are compatible as long as the Nef polyhedron is bounded. An unbounded Nef polyhedron can only be read by a Nef polyhedron parametrized with an extended kernel. It is also recommended to use the CGAL stream modifier set_ascii_mode().

CGAL::Nef_polyhedron_3<Traits>