Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Problems with remove() for regular triangulation.

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Problems with remove() for regular triangulation.


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Problems with remove() for regular triangulation.
  • Date: Mon, 24 Feb 2020 10:02:30 +0100
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:yQnroRfpR6Ev5/gEoZ6IreRNlGMj4u6mDksu8pMizoh2WeGdxcW7Yh7h7PlgxGXEQZ/co6odzbaP7+awCCdZu8jJmUtBWaIPfidNsd8RkQ0kDZzNImzAB9muURYHGt9fXkRu5XCxPBsdMs//Y1rPvi/6tmZKSV3wOgVvO+v6BJPZgdip2OCu4Z3TZBhDiCagbb9oIxi6sArcutMVjIZmJao91wXFr3pVcOlK2G1kIk6ekBn76sqs5pBo7j5eu+gm985OUKX6e7o3QLlFBzk4MG47+dPmuwDbQQSA+nUTXGMWkgFVAwfe9xH1Qo3xsirhueVj3iSRIND7Qqo1WTSm6KdrVQPohSIaPDM37G3blsp9h79drRm8pRJw3pTUbZmIOvRgcKPTfdAUS2RPUcleVSNOHoyyYpATD+cCJ+tUs5XxqlUMoBa4GAKiBPnvyjhNhnLu06E0zvouHhrc0ww7A9IOsWrbrNPoP6kUVuC11qjIzTLfb/hL3Tvz6ZbHchckof6SQbJwa8rQx0k1GAzZklWQrpblPjOQ2ugDrmOW6PFgVeaoi249qgFxpSSvyt0pionNnY8VxVXE+j94wIYxP9G3VEl7Ydu9HZZWqiqUOYx2QsY4TGFpviY30rsGtoSgcycRzJQo2QTTZOCAc4iN5B/oSeWfIS9giX57ZL6ygwy+/Eugx+HmS8W4zlVHojBKn9TNrnwByQbc5tSaRvZ44EitxSyA2gXN5u1YPEw5kKXWJ4A/zbIsk5cesFjMHiH1lUjzjKKbdVgo9vSt5unlbLXmqJGcOopphQ7iMakjlMqyCvkiPAcURWiU4+G82aXj/ULnRLVKieU7kqzDv5DbIcQXv6C4AwpI3oo65RayADar3M4XnXkAK1JFdxaHgJbzN17SJ/D4CO+zg1WqkDh12/DLJqPtDonJI3TZk7rsfaxx51NCxAcw19xS6JNZBqkEIP3pW0/xsNLYDgU+Mwyx2+vnE9F91oQEWWKOBa+ZLLnesVqM5u80LOmMYZUauDf5K/Q/+/Huino5lUcHfaa1xZsXdGy4HvN+LkqFbnrjmNMBHX4XsQo/V+zllECCUSVIZ3upRKI95jQ7CJq8AovZR4CthqaB3CahEZFMaGBGEAPELXC9fIqNX7IAaTmZP9R6uj0CT7moDYE7hj+0swqvgYFqJOPP5iwVs9rH08J04PGb1T4/8jl5E96M/WiGU2ZujyJCD2st2KdloEthjFKH+ad9iv1cU9dU4qUaAU8BKZfAwrkiWJjJUQXbc4LREQf0cpCdGTg0C+kJ7ZoLakd5Fc+li0majSWvCr4R0beMAc5tq/+O7z3KP894jk3++uwhgl0hGJYdMGSngutg8lGWCdKX1UqekKmueOIX2yufrD7fn1rLh1lRVUtLaYuARWoWPxKEotHw50eERLirW+wq

Try to add an assertion with map_point_handler.count(one_p)!=0 to make sure the key belong to the map + you should remove any element from your map as soon as a vertex is removed.

Sebastien.

On 2/22/20 2:43 PM, Frank Dz wrote:
typedef CGAL::Regular_triangulation_vertex_base_3<K>
Vb0; // this should
be added.
typedef CGAL::Triangulation_vertex_base_with_info_3<int, K, Vb0> Vb;
typedef CGAL::Regular_triangulation_cell_base_3<K>
Cb;
typedef CGAL::Triangulation_data_structure_3<Vb, Cb> Tds;
typedef CGAL::Regular_triangulation_3<K, Tds>
labeled_RT;
typedef labeled_RT::Vertex_handle
labeled_rt_Vertex_handle;

...
// then I insert weighted point into the RT.
int index;
map<Weighted_point, labeled_rt_Vertex_handle> map_point_handler;
for (auto p : Point_set) {
labeled_rt_Vertex_handle vhandle2 = RT.insert(pole);
vhandle2->info() = index;
index ++;
map_point_handler[p] = vhandle2; // I want to map the point
to handle
}
labeled_rt_Vertex_handle vhandle22 = map_point_handler[one_p];
quick_test_RT.remove(vhandle22);

=====================================
The enviroment is VS15 on windows machine, release, 64bit.
Then I got this error:
<http://cgal-discuss.949826.n4.nabble.com/file/t376165/error1.jpg>

Exception thrown at 0x00007FF677B167DC in Shape_abstract.exe: 0xC0000005:
Access violation reading location 0x0000000002BF7956.

The vs jumps to:
<http://cgal-discuss.949826.n4.nabble.com/file/t376165/error2.jpg>

I wonder if my usage of 'map' is wrong?

Thanks!






-----
be open, be creative, be critical
--
Sent from: http://cgal-discuss.949826.n4.nabble.com/




Archive powered by MHonArc 2.6.18.

Top of Page