Subject: CGAL users discussion list
List archive
- From: Nader SALMAN <>
- To:
- Subject: Re: [cgal-discuss] error in using CGAL::grid_simplify_point_set
- Date: Tue, 08 Dec 2009 18:43:10 +0100
Hi Tina, thank you for your interest in CGAl and for using the PSP package. here is how you should do it in general : // kernel typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; // Simple geometric types typedef Kernel::FT FT; typedef Kernel::Point_3 Point; typedef Kernel::Vector_3 Vector; // Point with normal vector stored in a std::pair. typedef std::pair<Point, Vector> PointVectorPair; typedef std::vector<PointVectorPair> PointList; CGAL::grid_simplify_point_set(points.begin(), points.end(), CGAL::First_of_pair_property_map<PointVectorPair>(), cell_size); in your case it would be : // simplification by clustering using erase-remove idiom double cell_size = 0.001; points.erase(CGAL::grid_simplify_point_set(points.begin(), points.end(), CGAL::First_of_pair_property_map<PointVectorPair>(), cell_size), points.end()); // Optional: after erase(), use Scott Meyer's "swap trick" to trim excess capacity std::vector<Point>(points).swap(points); Hope this helped! Cheers, Nad. Nader SALMAN Geometrica Lab, Byron Y308 INRIA Sophia Antipolis (FRANCE) Tel: +33(0)4 9238 7161 Fax: +33(0)4 9715 5395 http://www-sop.inria.fr/members/Nader.Salman tina rumi a écrit : Hi all, |
- [cgal-discuss] error in using CGAL::grid_simplify_point_set, tina rumi, 12/08/2009
- Re: [cgal-discuss] error in using CGAL::grid_simplify_point_set, Nader SALMAN, 12/08/2009
- Re: [cgal-discuss] error in using CGAL::grid_simplify_point_set, Nader SALMAN, 12/08/2009
- Re: [cgal-discuss] error in using CGAL::grid_simplify_point_set, tina rumi, 12/08/2009
- Re: [cgal-discuss] error in using CGAL::grid_simplify_point_set, tina rumi, 12/08/2009
- Re: [cgal-discuss] error in using CGAL::grid_simplify_point_set, Laurent Saboret, 12/09/2009
- Re: [cgal-discuss] error in using CGAL::grid_simplify_point_set, Nader Salman, 12/09/2009
- Re: [cgal-discuss] error in using CGAL::grid_simplify_point_set, tina rumi, 12/09/2009
- Re: [cgal-discuss] error in using CGAL::grid_simplify_point_set, Nader SALMAN, 12/10/2009
- Re: [cgal-discuss] error in using CGAL::grid_simplify_point_set, tina rumi, 12/10/2009
- Re: [cgal-discuss] error in using CGAL::grid_simplify_point_set, Nader SALMAN, 12/11/2009
- Re: [cgal-discuss] error in using CGAL::grid_simplify_point_set, tina rumi, 12/11/2009
- Re: [cgal-discuss] error in using CGAL::grid_simplify_point_set, tina rumi, 12/09/2009
- Re: [cgal-discuss] error in using CGAL::grid_simplify_point_set, Nader Salman, 12/09/2009
- Re: [cgal-discuss] error in using CGAL::grid_simplify_point_set, tina rumi, 12/08/2009
- Re: [cgal-discuss] error in using CGAL::grid_simplify_point_set, Nader SALMAN, 12/08/2009
- Re: [cgal-discuss] error in using CGAL::grid_simplify_point_set, Nader SALMAN, 12/08/2009
Archive powered by MHonArc 2.6.16.