Skip to Content.
Sympa Menu

cgal-discuss - RE: [cgal-discuss] Help with conversion of Polyhedron 3 to Nef Polyhedron 3.

Subject: CGAL users discussion list

List archive

RE: [cgal-discuss] Help with conversion of Polyhedron 3 to Nef Polyhedron 3.


Chronological Thread 
  • From: Chris Theis <>
  • To: "" <>
  • Subject: RE: [cgal-discuss] Help with conversion of Polyhedron 3 to Nef Polyhedron 3.
  • Date: Sun, 17 Feb 2013 17:13:33 +0000
  • Accept-language: en-GB, en-US

Hi,

try to replace

CGAL::Polyhedron_3<NefKernel,CGAL::Polyhedron_items_with_id_3 >
PolyhedralSurface;

with

CGAL::Polyhedron_3<NefKernel,CGAL:: Polyhedron_items_3 > PolyhedralSurface;

I think you cannot (yet) convert polyhedra with extended item traits into nef
polyhedral.

Cheers
Chris

-----Original Message-----
From:


[mailto:]
On Behalf Of trblair
Sent: 17 February 2013 02:18
To:

Subject: [cgal-discuss] Help with conversion of Polyhedron 3 to Nef
Polyhedron 3.

Hi, I'm try to use the interface between Polyhedron 3 and Nef Polyhedron 3
but I'm getting an error that says the method doesn't exist. Here is the
code I'm using, pretty much right out of the examples, followed by the build
error. Am I missing something in the PolyhedralSurface typedef? Thanks in
advance.

#include <CGAL/Simple_cartesian.h>
#include <CGAL/Gmpz.h>
#include <CGAL/Homogeneous.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Polyhedron_incremental_builder_3.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/Polyhedron_items_with_id_3.h>
#include <CGAL/Nef_polyhedron_3.h>

typedef CGAL::Homogeneous<CGAL::Gmpz> NefKernel; typedef
CGAL::Polyhedron_3<NefKernel,CGAL::Polyhedron_items_with_id_3 >
PolyhedralSurface; typedef CGAL::Nef_polyhedron_3<NefKernel> Nef_polyhedron;

Nef_polyhedron nefA;
Nef_polyhedron nefB;

std::string CGAL_Boolean_Subtraction(BASE_GEOMETRY geometryA, BASE_GEOMETRY
geometryB){

PolyhedralSurface polyA = buildPolyhedron(geometryA);
PolyhedralSurface polyB = buildPolyhedron(geometryB);

if(polyA.is_closed()){
nefA(polyA);
}
if(polyB.is_closed()){
nefB(polyB);
}
nefA -= nefB;

}



Build error:

CGAL_Boolean_Opperations.cpp: In function ‘std::string
CGAL_Boolean_Subtraction(BASE_GEOMETRY, BASE_GEOMETRY)’:
CGAL_Boolean_Opperations.cpp:18:19: error: no match for call to
‘(Nef_polyhedron {aka CGAL::Nef_polyhedron_3<CGAL::Homogeneous&lt;CGAL::Gmpz>
>}) (PolyhedralSurface&)’
CGAL_Boolean_Opperations.cpp:21:19: error: no match for call to
‘(Nef_polyhedron {aka CGAL::Nef_polyhedron_3<CGAL::Homogeneous&lt;CGAL::Gmpz>
>}) (PolyhedralSurface&)’
make[2]: *** [build/Debug/GNU-Linux-x86/CGAL_Boolean_Opperations.o] Error 1








--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Help-with-conversion-of-Polyhedron-3-to-Nef-Polyhedron-3-tp4656744.html
Sent from the cgal-discuss mailing list archive at Nabble.com.

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss





Archive powered by MHonArc 2.6.18.

Top of Page