Subject: CGAL users discussion list
List archive
- From: Nuno Pessanha Santos <>
- To: "" <>
- Subject: RE: [cgal-discuss] Convex_hull_3 - CGAL
- Date: Thu, 24 Oct 2013 16:22:53 +0100
- Importance: Normal
Thanks Sebastien.
Another question,I hope the final one.
When I make:
CGAL::convex_hull_3(points.begin(), points.end(), poly);
std::vector<Point_3> chull_points(poly.points_begin(), poly.points_end());
It´s not suppose to access the point 0 coordinate X by the:
std::cout << chull_points[0].x;
This gives me the error:
"error C3867: 'CGAL::Point_3<R_>::x': function call missing argument list; use '&CGAL::Point_3<R_>::x' to create a pointer to member"
Thanks.
Nuno Pessanha Santos
> Date: Thu, 24 Oct 2013 16:51:32 +0200
> From:
> To:
> Subject: Re: [cgal-discuss] Convex_hull_3 - CGAL
>
> The only way to do it for now I think is to use the Delaunay
> triangulation.
> Note that it will take more time to compute than the other function.
> (I'll add a todo for adding this in a future release)
>
> Build the triangulation following this example:
> http://doc.cgal.org/latest/Triangulation_3/index.html#Triangulation_3UsingtheBoostTransformIterator
>
> Then something like this should work (not tested):
>
> struct Chull_indices
> {
> void operator()(Delaunay::Vertex_handle vh) const
> {
> m_indices.push_back(vh->info());
> }
>
> std::vector<std::size_t> m_indices;
> };
>
> Chull_indices chull_indices;
>
> T.adjacent_vertices(T.infinite_vertex(),
> boost::make_function_output_iterator(chull_indices)
> );
>
> for( std::size_t i : chull_indices.m_indices)
> std::cout << i << std::endl;
>
> Sebastien.
>
> On 10/24/2013 04:12 PM, Nuno Pessanha Santos wrote:
> > Hi,
> >
> > Thanks Sebastien for your answer.
> >
> > I only need the index of the points, example:
> >
> > Original Point Cloud:
> > point 1
> > point 2
> > point 3
> > point 4
> >
> > Convex Hull:
> > point 3
> > point 4
> >
> > I want to read the 3 and 4, to make them correspond in my further
> > processing.
> >
> > Thanks.
> >
> > Nuno Pessanha Santos
> >
> >
> >
> >
> > > Date: Thu, 24 Oct 2013 07:11:37 +0200
> > > From:
> > > To:
> > > Subject: Re: [cgal-discuss] Convex_hull_3 - CGAL
> > >
> > > On 10/24/2013 05:31 AM, Nuno Pessanha Santos wrote:
> > > > Hi,
> > > >
> > > > I am starting to use CGAL, and maybe this is a stupid question but I
> > > > need some help.
> > > >
> > > > When you use the function "CGAL::convex_hull_3(points.begin(),
> > > > points.end(), Polyhedron_3 poly);" you obtain the polyhedron poly.
> > > >
> > > > How can I read the obtained vertices or the points index that are
> > > > contained in the convex hull? I see so many examples but none of them
> > > > could help me in my task.
> > >
> > > Is the following what you are looking for?
> > >
> > > Polyhedron_3 poly;
> > > CGAL::convex_hull_3(points.begin(), points.end(), poly);
> > > std::vector<Point_3> chull_points(poly.points_begin(),
> > poly.points_end());
> > >
> > >
> > > Sebastien
> > >
> > > >
> > > > Thanks
> > > >
> > > > Nuno Pessanha Santos
> > > >
> > > >
> > >
> > >
> > > --
> > > You are currently subscribed to cgal-discuss.
> > > To unsubscribe or access the archives, go to
> > > https://sympa.inria.fr/sympa/info/cgal-discuss
> > >
> > >
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>
>
> From:
> To:
> Subject: Re: [cgal-discuss] Convex_hull_3 - CGAL
>
> The only way to do it for now I think is to use the Delaunay
> triangulation.
> Note that it will take more time to compute than the other function.
> (I'll add a todo for adding this in a future release)
>
> Build the triangulation following this example:
> http://doc.cgal.org/latest/Triangulation_3/index.html#Triangulation_3UsingtheBoostTransformIterator
>
> Then something like this should work (not tested):
>
> struct Chull_indices
> {
> void operator()(Delaunay::Vertex_handle vh) const
> {
> m_indices.push_back(vh->info());
> }
>
> std::vector<std::size_t> m_indices;
> };
>
> Chull_indices chull_indices;
>
> T.adjacent_vertices(T.infinite_vertex(),
> boost::make_function_output_iterator(chull_indices)
> );
>
> for( std::size_t i : chull_indices.m_indices)
> std::cout << i << std::endl;
>
> Sebastien.
>
> On 10/24/2013 04:12 PM, Nuno Pessanha Santos wrote:
> > Hi,
> >
> > Thanks Sebastien for your answer.
> >
> > I only need the index of the points, example:
> >
> > Original Point Cloud:
> > point 1
> > point 2
> > point 3
> > point 4
> >
> > Convex Hull:
> > point 3
> > point 4
> >
> > I want to read the 3 and 4, to make them correspond in my further
> > processing.
> >
> > Thanks.
> >
> > Nuno Pessanha Santos
> >
> >
> >
> >
> > > Date: Thu, 24 Oct 2013 07:11:37 +0200
> > > From:
> > > To:
> > > Subject: Re: [cgal-discuss] Convex_hull_3 - CGAL
> > >
> > > On 10/24/2013 05:31 AM, Nuno Pessanha Santos wrote:
> > > > Hi,
> > > >
> > > > I am starting to use CGAL, and maybe this is a stupid question but I
> > > > need some help.
> > > >
> > > > When you use the function "CGAL::convex_hull_3(points.begin(),
> > > > points.end(), Polyhedron_3 poly);" you obtain the polyhedron poly.
> > > >
> > > > How can I read the obtained vertices or the points index that are
> > > > contained in the convex hull? I see so many examples but none of them
> > > > could help me in my task.
> > >
> > > Is the following what you are looking for?
> > >
> > > Polyhedron_3 poly;
> > > CGAL::convex_hull_3(points.begin(), points.end(), poly);
> > > std::vector<Point_3> chull_points(poly.points_begin(),
> > poly.points_end());
> > >
> > >
> > > Sebastien
> > >
> > > >
> > > > Thanks
> > > >
> > > > Nuno Pessanha Santos
> > > >
> > > >
> > >
> > >
> > > --
> > > You are currently subscribed to cgal-discuss.
> > > To unsubscribe or access the archives, go to
> > > https://sympa.inria.fr/sympa/info/cgal-discuss
> > >
> > >
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>
>
- [cgal-discuss] Convex_hull_3 - CGAL, Nuno Pessanha Santos, 10/24/2013
- Re: [cgal-discuss] Convex_hull_3 - CGAL, Sebastien Loriot (GeometryFactory), 10/24/2013
- RE: [cgal-discuss] Convex_hull_3 - CGAL, Nuno Pessanha Santos, 10/24/2013
- Re: [cgal-discuss] Convex_hull_3 - CGAL, Sebastien Loriot (GeometryFactory), 10/24/2013
- RE: [cgal-discuss] Convex_hull_3 - CGAL, Nuno Pessanha Santos, 10/24/2013
- Re: [cgal-discuss] Convex_hull_3 - CGAL, Sebastien Loriot (GeometryFactory), 10/24/2013
- Re: [cgal-discuss] Convex_hull_3 - CGAL, Philipp Moeller, 10/24/2013
- RE: [cgal-discuss] Convex_hull_3 - CGAL, Nuno Pessanha Santos, 10/24/2013
- RE: [cgal-discuss] Convex_hull_3 - CGAL, Nuno Pessanha Santos, 10/24/2013
- Re: [cgal-discuss] Convex_hull_3 - CGAL, Sebastien Loriot (GeometryFactory), 10/24/2013
- RE: [cgal-discuss] Convex_hull_3 - CGAL, Nuno Pessanha Santos, 10/24/2013
- Re: [cgal-discuss] Convex_hull_3 - CGAL, Sebastien Loriot (GeometryFactory), 10/24/2013
Archive powered by MHonArc 2.6.18.