Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Extended polyhedra & nef_polyhedra

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Extended polyhedra & nef_polyhedra


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Extended polyhedra & nef_polyhedra
  • Date: Fri, 15 Feb 2013 07:09:14 +0100
  • Organization: GeometryFactory

On 02/14/2013 05:14 PM, Chris Theis wrote:
Hi Sebastien,

my problem actually starts when I do the following:

CGAL::Polyhedron_3<Kernel,CItemsEx> TestPoly; //
CItemsEx is derived from Polyhedron_items_3 and extends vertices, faces& halfedges
CGAL::Nef_polyhedron_3<Kernel> TestSolid( TestPoly );

as long as I use

CGAL::Polyhedron_3<Kernel, CGAL::Polyhedron_items_3> TestPoly;

it's ok. I found that the constructor of nef-polyhedra accepts only standard
Polyhedron_3 objects without an extended items classifier. I wanted to use the
extended items in order to have a convenient way to calculate and store normals
for vertices, faces& halfedges as shown in one of the examples.

Could I see what is CItemEx?

In principle I do not necessarily need nef-polyhedra if there is another
convenient way to do intersections, differences and unions of Polyhedron_3
objects. By definition all of my polyhedra should be closed. The only other
two requirements that I have is that I have to test if a point is included in
my polyhedron (and nef-polys provide a nice way to do this) and an
intersection query for rays.

So if there is a different way to achieve this without using nef-polys then
I'll also be glad to give it a try.

You can use the AABB_tree for those tasks.
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/AABB_tree/Chapter_main.html

Sebastien.


I'm completely new to CGAL so I'm grateful for any information!

Cheers
Chris


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


[mailto:]
On Behalf Of Sebastien Loriot (GeometryFactory)
Sent: 14 February 2013 17:01
To:

Subject: Re: [cgal-discuss] Extended polyhedra& nef_polyhedra

Do you have a minimal example showing the issue?

Depending on what you need, you might be interested by the corefinement
plugin in the Polyhedron demo that performs boolean operations on Polyhedra
directly (select the two polyhedra in the A/B column). The constraint is that
the intersection polylines between the polyhedra are closed (including the
boundaries)

Sebastien.

On 02/14/2013 03:36 PM, Chris Theis wrote:
Hello,

I'm currently trying to implement a module which needs to perform
boolean operations on polyhedra.
In general I'm using a class which is derived from CGAL::Polyhedron_3
for managing my solids and for the boolean ops I would like to convert
the polyhedra to nef_polyhedra and then back.

If I do something like this:

CSGPolyhedron<Kernel, CGAL::Polyhedron_items_3> TestPoly;
CGAL::Nef_polyhedron_3<Kernel> TestSolid( TestPoly );

then the compiler is happy. However, I have extended my polyhedron
items so my actual conversion would look like:

CSGPolyhedron<Kernel, CItemsEx> TestPoly;
CGAL::Nef_polyhedron_3<Kernel> TestSolid( TestPoly );

CItemsEx is derived from CGAL::Polyhedron_items_3 and handles the
information for vertex& face normals. However, when I'm using my
extended items then the compiler starts complaining:

snc_structure.h(174): error C2903: 'Halffacet' : symbol is neither a
class template nor a function template ....and many more error
messages

I could trace this problem back to the use of the extended items. In
principle I would not need the extended functionality within the nef
polyhedra. But I don't know how to do the conversion of my extended
polyhedron to the nef_polyhedron. The available constructors do not
seem to work.

Is there any other way to do this? I'd greatly appreciate any hint in
this direction because I would really like to keep my extended items
for the polyhedra.

Thanks a lot
Chris




--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Extended-polyhedra-nef-polyhe
dra-tp4656726.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