Polyhedron_3 number of volume

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Polyhedron_3 number of volume

antoineL
Hello,

In order to know how many separate volume my Polyhedron_3 have, i do this :

   Polyhedron_3 myPolyhedron;
   Nef_polyhedron nef (myPolyhedron);
   size_t number = nef.number_of_volumes();

There is a way to know this information without the  Nef_polyhedron
trnaformation ?

Thanks,
Antoine




--
Sent from: http://cgal-discuss.949826.n4.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


Reply | Threaded
Open this post in threaded view
|

Re: Polyhedron_3 number of volume

Laurent Rineau (CGAL/GeometryFactory)
On Tuesday, February 19, 2019 3:32:42 PM CET antoineL wrote:

> Hello,
>
> In order to know how many separate volume my Polyhedron_3 have, i do this :
>
>    Polyhedron_3 myPolyhedron;
>    Nef_polyhedron nef (myPolyhedron);
>    size_t number = nef.number_of_volumes();
>
> There is a way to know this information without the  Nef_polyhedron
> trnaformation ?

It is probably the same as computing the number of connected components. See
the examples here:

https://doc.cgal.org/4.13/Polygon_mesh_processing/index.html#title46

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory           http://www.geometryfactory.com/
Release Manager of the CGAL Project       http://www.cgal.org/




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