Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] can someone help me for the using of " Arrangement_2::Vertex_handle"?
Chronological Thread
- From: Sebastien Loriot <>
- To:
- Subject: Re: [cgal-discuss] can someone help me for the using of " Arrangement_2::Vertex_handle"?
- Date: Wed, 17 Mar 2021 14:29:23 +0100
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-hdrordr: A9a23:YqiIZKAVZofxLnXlHemk55DYdL4zR+YMi2QD+khtRXVuHvCwuNupmJ0guCPcrDoKQnkvlZShNcC7L0/0zpJ+7YkPMbrKZmCP01eAFp1o7ofp3lTbdBHWy+g1781dT5Q=
- Ironport-phdr: A9a23:UGFlCxWTQovqEckB5IonstNQbj7V8Ky1UjF92vIco4ILSbyq+tHYBGea288FpGHAUYiT0f9Yke2e6/mmBTVRp8/a6ztTKNRlbFwssY0uhQsuAcqIWwXQDcXBSGgEJvlET0Jv5HqhMEJYS47UblzWpWCuv3ZJQk2sfQV6Kf7oFYHMks+5y/69+4HJYwVPmTGxfa5+IA+5oAnMssQam5ZuJ6g/xxfGpnZEZ/ldyH91K16Ugxvy/Nq78oR58yRXtfIh9spAXrv/cq8lU7FWDykoPn4s6sHzuhbNUQWA5n0HUmULiRVIGBTK7Av7XpjqrCT3sPd21TSAMs33SbA0Ximi77tuRRT1hioLKyI1/WfKgcF2kalVog+upwZnzoDJfo+VOvpwcKDTc9wUSmVOXNpeWSNaD4OgbIYCFfYNMfpWooT/oVYFsBuwBROrBOPq0jJGm2H50rYg3OQ6DQHG3RIvH9QTu3rSq9X1LqYSUeepzKLVyjjDdPdW2TDn6IjJdRAhveuAXbd0ccfKxkkvEhnKjlSUqYD/IzyV0eENvnGd4uF9Wu2hl3QppBttojiz2MgskI/Ji5oIx17K6Sh03Zs4KN24RUJlb9CpEZ9dui6eOoZqQM4vQmVltiY6xLAGtpO2cyYHxZY5yxPBafGKfIqF7w/tWuqMJzpzmXxreLW6hxmo8EigzPXxVs+u31lRtSVFlsfDumoR2BzU78iKTOZ28ES52TuXyQzf9uVJLVo3mKfbMZIt36A8m5kJvUnMHSL6gFv6g7WKekk5/+Wn9fjrba/jq5OCK4N4lwTzP6o0lcChHeg1NxYCUHWF9eug0bDu/0P0T6lEjvAzkqTUtJ7aKMceq6O5DQ9ZzoYu5hCiBDm8ytsYh2MILFdddRKHkYfpP1bOLej9DfilglSslC5nxv7DPrH8G5nNIHfOnbT7cbZy7E5czwUzzdRB6J5OFr4BJ/fzVlfwtNzeEBA5LxS5z/j7BNh5zI8TWmKCDrWEPK/MslKE/O0iLuqUaI8Qojn9Kvwl5/D0jX8+nF8QZbKp3Z8QaHCiH/RmJFmZbWDpgtcFCmoKsQ8+Q/briF2GSzJce3GyX6ck6jEhFI2mFZvDRpyqgLGZwCi7EYdZZmRfBl+REHfobJmLW+oXaCKJOcJhiTwFVb25S4A7zx2utQn6y6BmLuXO4CEYu4jjh5BJ4LjYmhg2sDB1FM+AyHqlTmdun2pOSSVl8rp4pBlGx12KyrR5jvoQMdtJ5vRVGlMhMZnGzutmTdX2cg3Ed9aNDl2hR4P1UnkKUtstzopWMA5GENK4g0WbtwKaRoQNnrnOP6Qat6LR23+ZD8N0ynKDy6x4yld6Eo1AMmqpgqM5/A/WVdahu3XcrL6jcOEn5ACI7H2KpUKBuUhZVEh7VqCXBRg3Vg7ttd38o3j6YfqrALUjPBFGzKaqJa5Da9mvhlJDFq6LBQ==
vertex_handles is a function so it should be arr.vertex_handles().
This gives you a range so you need to iterate over the container and
call the function for each vertex.
Something like:
for (Vertex_const_handle v : arr.vertex_handles())
{
print_incident_halfedges(v);
}
Best,
Sebastien.
On 3/17/21 2:24 PM, Aomandeyi ( via cgal-discuss Mailing List) wrote:
my codes are as follow , i don't sure the parameters of
"print_incident_halfedges()" is "arr.vertex_handles" or not.
------------------------------------------------------------
#include <CGAL/Cartesian.h>
#include <CGAL/Arr_non_caching_segment_traits_2.h>
#include <CGAL/Arrangement_2.h>
typedef int Number_type;
typedef CGAL::Cartesian<Number_type> Kernel;
typedef CGAL::Arr_non_caching_segment_traits_2<Kernel> Traits;
typedef Traits::Point_2 Point;
typedef Traits::X_monotone_curve_2 Segment;
typedef CGAL::Arrangement_2<Traits> Arrangement;
template <typename Arrangment>
void print_incident_halfedges(typename Arrangement::Vertex_const_handle v)
{
if (v−> is_isolated()) {
std::cout << "The vertex (" << v−> point() << ") is isolated"
<<
std::endl;
return;
}
}
int main()
{
Point p1(1, 1), p2(1, 2), p3(2, 1);
Segment cv[] = { Segment(p1, p2) , Segment(p2, p3) , Segment(p3, p1)
};
Arrangement arr;
insert(arr, &cv[0], &cv[sizeof(cv) / sizeof(Segment)]);
print_incident_halfedges(arr.vertex_handles);
return 0;
}
----------------------------------------------------------
--
Sent from: http://cgal-discuss.949826.n4.nabble.com/
- [cgal-discuss] can someone help me for the using of " Arrangement_2::Vertex_handle"?, Aomandeyi, 03/17/2021
- Re: [cgal-discuss] can someone help me for the using of " Arrangement_2::Vertex_handle"?, Sebastien Loriot, 03/17/2021
- Re: [cgal-discuss] can someone help me for the using of " Arrangement_2::Vertex_handle"?, Aomandeyi, 03/19/2021
- Re: [cgal-discuss] can someone help me for the using of " Arrangement_2::Vertex_handle"?, Sebastien Loriot, 03/17/2021
Archive powered by MHonArc 2.6.19+.