Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] [Nef_polyhedron_3] interior(), closure() and boundary()

Subject: CGAL users discussion list

List archive

[cgal-discuss] [Nef_polyhedron_3] interior(), closure() and boundary()


Chronological Thread 
  • From: "Max" <>
  • To: "" <>
  • Subject: [cgal-discuss] [Nef_polyhedron_3] interior(), closure() and boundary()
  • Date: Mon, 4 Feb 2008 09:40:56 +0800
  • Disposition-notification-to: "Max" <>
  • Organization: LoadCom

Hi

From the doc, I get the brief definitions of them:

interior():With interior() one deselects all boundary items.
closure():with closure() one selects all boundary items.
boundary():with boundary() one deselects all volumes.

To verify my understanding of them, I wrote the following
code to test:

#include <CGAL/Gmpz.h>
#include <CGAL/Extended_homogeneous.h>
#include <CGAL/Nef_polyhedron_3.h>

typedef CGAL::Extended_homogeneous<CGAL::Gmpz> Kernel;
typedef CGAL::Nef_polyhedron_3<Kernel> Nef_polyhedron;
typedef Kernel::Plane_3 Plane_3;

int main() {
Nef_polyhedron N_1(Plane_3( 1, 0, 0,-1), Nef_polyhedron::INCLUDED);
Nef_polyhedron N_2(Plane_3( 1, 0, 0,-1), Nef_polyhedron::EXCLUDED);
Nef_polyhedron N_pl = N_1 - N_2; // a plane slice
Nef_polyhedron N_empty(Nef_polyhedron::EMPTY);

CGAL_assertion(N_1.interior() == N_2);
CGAL_assertion(N_2.interior() == N_2);
CGAL_assertion(N_1.closure() == N_pl);
CGAL_assertion(N_2.closure() == N_pl);
CGAL_assertion(N_1.boundary() == N_pl);
CGAL_assertion(N_2.boundary() == N_empty);
}

It's really a surprise for me to get ALL OF THE ASSERTIONS FAILED!
If it should be the correct behavior, my understanding is COMPLETELY
wrong.

Could anybody help me with understanding these methods?

Thanks.

Max



Archive powered by MHonArc 2.6.16.

Top of Page