Thanks a lot for your answer.

Regards,

Eric Lombardi

==============================================================

LIRIS, UMR 5205

Laboratoire d'InfoRmatique en Image et Systèmes d'information

Université Claude Bernard Lyon 1, bâtiment Nautibus

43 boulevard du 11 novembre 1918, 69622 Villeurbanne cedex

Le 25/02/2020 à 13:21, Mael a écrit :

> 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,

>>

--

You are currently subscribed to cgal-discuss.

To unsubscribe or access the archives, go to

https://sympa.inria.fr/sympa/info/cgal-discuss