Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Nef polygon

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Nef polygon


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Nef polygon
  • Date: Thu, 16 May 2013 07:47:13 +0200
  • Organization: GeometryFactory

Here is a simple example where you half-spheres are inside two off files:

#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/IO/Polyhedron_iostream.h>
#include <CGAL/Nef_polyhedron_3.h>
#include <CGAL/IO/Nef_polyhedron_iostream_3.h>
#include <CGAL/OFF_to_nef_3.h>
#include <iostream>
#include <fstream>

typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
typedef CGAL::Nef_polyhedron_3<Kernel> Nef_polyhedron;

int main(int, char *argv[]) {

std::ifstream off1(argv[1]);
std::ifstream off2(argv[2]);

Nef_polyhedron n1,n2;
//read nef polyhedra from off files
CGAL::OFF_to_nef_3(off1,n1);
CGAL::OFF_to_nef_3(off2,n2);

//do the union
n1 += n2;

//convert the nef polyhedron as a polyhedron
Polyhedron p;
n1.convert_to_polyhedron(p);

std::ifstream output(argv[3]);
output << p;
}



On 05/15/2013 05:09 PM, ChaoM wrote:
Hello all:
I get two half spere intersected~ and I want to mesh or triangulation
the whole object, I try to use the constraited Delaunay Triangulation, but
I don't know how to set the constraited edges? Some CGAL users suggest me to
use the Nef polygon and use the bool opreation to get the whole result.
if some one can help me i am very appreciate!




--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Nef-polygon-tp4657453.html
Sent from the cgal-discuss mailing list archive at Nabble.com.





Archive powered by MHonArc 2.6.18.

Top of Page