Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Spatial searching - Radius search with Surface_mesh

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Spatial searching - Radius search with Surface_mesh


Chronological Thread 
  • From: Mael <>
  • To:
  • Subject: Re: [cgal-discuss] Spatial searching - Radius search with Surface_mesh
  • Date: Tue, 25 Feb 2020 13:21:27 +0100
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=None ; spf=None
  • Ironport-phdr: 9a23:rdkZmh1vsTCxFDxssmDT+DRfVm0co7zxezQtwd8ZsesWLP7xwZ3uMQTl6Ol3ixeRBMOHsq4C2rCd6P2ocFdDyKjCmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSizexfLx/IA+yoAnPucUbj4tvIbstxxXUpXdFZ+tZyWR0KFyJgh3y/N2w/Jlt8yRRv/Iu6ctNWrjkcqo7ULJVEi0oP3g668P3uxbDSxCP5mYHXWUNjhVIGQnF4wrkUZr3ryD3q/By2CiePc3xULA0RTGv5LplRRP0lCsKMSMy/WfKgcJyka1bugqsqQFhzY7aYI+bN/Rwca3SctwYWWVMRdxeWzBbD46mc4cCAegMMOBFpIf9vVsOqh6+CBGrCuz11DBIgmL90Ko/0+s7Dw7G2BYsH8gJsHTJo9T6KqMSXfqxzKbS1jrMdO1Z1Czy6IfWdRAhpO+DXa5qccvRx0kgDR/KjkmXqYz/PzKZzPgCs2+e7+d5U++klmApqwZ0oje1x8csjJHEho0UylDY9SV53Z06KcekR058ZN6pFoZbuSKCN4ZuX88vQWJltDw0x7EYo5K2eCoHxI45yxLCa/GLa4yF7g75WOqMPDt1h2hpdK+wihu260StxOPxWtGo3FpQsiZJiMXAumoR2xHV98OKVP99/lq62TaTyQ/T8PxKIUE1lKXFM5Mt3rg9nYcJv0vZBC/5gkD2gbeWdko6/uio7Pzqbqjpq5OGMo90jRzyPr4rmsOlAOQ4NhECX2+G+eSgzrHj+lP5QLVQgv0wjKbZrIjWJcUdpqGnHw9Yypsv5hS8Aju83tkUg2MLIVZHdR6dkYTlJlHDLOj9DfilglSslDlrx+rBPr3kGpjNK2LMn6nlfbpn8U5czxczzN9B6JJQEL0BJOj8VVTqu9PGFRI5PBK7w+HiCNpjyoMeQ2KOAqGDP6zOrV+I4fgvIumWaIAJvzb9LuAp5+Tygn8hhV8dYa6p0IMLZ3C3BPtmJ1yVbmftgtcaDWgKoxE+TPfxhV2ZUT9TYm6yULgm6jE6DoKmF4bDSZq3jLyPxie3BphWZmdbBV+SCXrobICEW+sUaC6LJc9hjyAEWaChS4A/0RGusxf3y6JjLuXO+iwXq4jj2dpx6uDXjx0y9SZ7A96a02GTT2F4hGUISCEq3KxnoEx9zEmM0bRgjvBED9Bf++lFXhsgOZLA1+B6Ecz9WhrdfteVT1arWsmpAT4rQdI12tMBfkd9G86+gRDexCqqGKQYl72NBJwu86LTxWL9J8hnyyWO6K50hFYvRo5DNHatm7Vk3wnVHY/A1UuDxIiwcqFJ+SfA8C/XyGODuAdCVxNgXKGDWXkVbEb+otn+407eVa6gAL87NRFQj8WFL/0ZOZXSkVxaSaK7a5zlaGWrljLoXEra9va3dIPvPl4l8mDFEkFeylIc8HGDOBQkFymoqH7ZFi0oHlXqMRu1oLtO7UijR0px9DmkKkho1r674BkQ36XORP4U278YojYvoj5oG0ysmdnRDojY/lczTOBnedo4pWx/+yfZugh6ZMHydvwkg1lHNQF+vker0AhrTIJekY4soW94lAc=

Hello,

Sorry for the late answer.

The problem comes from your line:

  CGAL::Fuzzy_sphere<Traits> fz(query, radius, epsilon);

Calling that constructor means that you default construct the traits. With that particular traits class, it will default-construct your vertex-point map and things will go sour.

You should write instead:
  Traits traits(vppmap); // possibly factorized at a higher level because it's also used in the tree
  CGAL::Fuzzy_sphere<Traits> fz(query, radius, epsilon, traits);

and things will run fine. This works for Polyhedron because the default constructed vpm accesses the correct data.

I will modify the example so it's more natural to change the graph type.

Best,
Mael

On 12/02/2020 11:21, Eric Lombardi wrote:

Hello,

I'm looking for a way to do a radius search with Surface_mesh that returns a list of vertex descriptors.

The following example do what I want with Polyhedron_3:


"https://github.com/CGAL/cgal/blob/releases/CGAL-4.14.2/Spatial_searching/examples/Spatial_searching/searching_polyhedron_vertices_with_fuzzy_sphere.cpp"

I tried to change this example to make it work with Surface_mesh. The code compiles, but there is a runtime error:

  terminate called after throwing an instance of
  'CGAL::Assertion_exception'
    what():  CGAL ERROR: assertion violation!
  Expr: parray_ != NULL
  File: ~/CGAL-4.14.2/include/CGAL/Surface_mesh/Properties.h
  Line: 576

The same error occurs with CGAL-4.14.2 and CGAL-5.0.1.


The source code is attached (radius_search.cpp). The "#if" at line 16 toggles between Polyhedron_3 and Surface_mesh.


What is wrong with Surface_mesh with this code ?


Regards,




Archive powered by MHonArc 2.6.18.

Top of Page