[GRASS-dev] v.delaunay3d error

Hello Martin,

I’m getting this error when compiling your v.delaunay3d addon with CGAL 4.13:

main.cpp:106:11: error: cannot convert ‘DelaunayTriangulation* {aka CGAL::Delaunay_triangulation_3CGAL::Epick}’ to 'Triangulation {ask CGAL::Triangulation_3CGAL::Epick*}’ in assignment
T = new DelaunayTriangulation(points.begin(), points.end());

Maybe, simple type casting, but I’m not a C++ expert. Any idea?

Regards,

Huidae

···

Huidae Cho, Ph.D., GISP, PE (MD), CFM, M.ASCE
Open Source GIS Developer, GRASS GIS Development Team

On Thu, Dec 20, 2018 at 6:39 PM Huidae Cho <grass4u@gmail.com> wrote:

Hello Martin,

I'm getting this error when compiling your v.delaunay3d addon with CGAL 4.13:

main.cpp:106:11: error: cannot convert 'DelaunayTriangulation* {aka CGAL::Delaunay_triangulation_3<CGAL::Epick>*}' to 'Triangulation* {ask CGAL::Triangulation_3<CGAL::Epick>*}' in assignment
    T = new DelaunayTriangulation(points.begin(), points.end());

Maybe, simple type casting, but I'm not a C++ expert. Any idea?

Perhaps you can get some ideas from this example?

https://github.com/CGAL/cgal/blob/master/Triangulation_3/examples/Triangulation_3/simple_triangulation_3.cpp

Markus

I tried static_cast, but it didn’t work (not sure why). C-style casting and reinterpret_cast worked though.

Huidae

···

Huidae Cho, Ph.D., GISP, PE (MD), CFM, M.ASCE
Open Source GIS Developer, GRASS GIS Development Team

Hi,

st 26. 12. 2018 v 15:16 odesílatel Huidae Cho <grass4u@gmail.com> napsal:

I tried static_cast, but it didn't work (not sure why). C-style casting and reinterpret_cast worked though.

thanks for fix. Martin

--
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa