Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Create Delaunay 3D

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Create Delaunay 3D


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Create Delaunay 3D
  • Date: Mon, 23 Jan 2012 08:48:12 +0100

On 01/22/2012 10:23 AM, Gropi wrote:
Hello everybody,

I'm new in developing with cgal library. Actualy I try to develop a
solution for university where I want to create a convex hull based on
the Delaunay algorithem.

And there is my problem. I successfully build the example solution for
the convex_hall 3d but when I try to append this code sniped to my
solution I will always get a compiler error and I nearly get freak
out.

I figured out that the error will occur when I try to add the
following source code:

Delaunay T;
for (unsigned int i = 0; i< points.size(); ++i)
T.insert(punkte[i]);

So I looked up at the manuel and I shout add a Point_3 via insert to
the Delaunay but wenn I try this I allways get this error message:

dynamic_hull_3d.obj : error LNK2019: Verweis auf nicht aufgelöstes
externes Symbol ""public: void __thiscall
boost::detail::tss::cleanup(void *)"
For this one you need to link with boost_thread.


for the english gays of u:
Unresolved external symbol to public: void __thiscall
boost::detail::tss::cleanup(void *)

I know that the boost library will work fine because I can build the
example solution with cmake.

If I try to add the point via

T.insert(punkte.begin(), punkte.end());

I will get the following error Message:

error C2664: 'CGAL::internal::CC_iterator<DSC,Const>
CGAL::Delaunay_triangulation_3<Gt>::insert(const CGAL::Point_3<R_>
&,CGAL::internal::CC_iterator<DSC,Const>)': failed to convert
Parameters 1 from 'std::_Vector_iterator<_Ty,_Alloc>' to 'const
CGAL::Point_3<R_> &'
For this one a minimal but complete example might help giving what is
wrong.

Sebastien.


Currently I work in Visual Studio 2008.

I hope you can help me :)

Here is my complete source code:

#include<CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include<CGAL/point_generators_3.h>
#include<CGAL/Delaunay_triangulation_3.h>
#include<CGAL/Polyhedron_3.h>
#include<CGAL/convex_hull_3_to_polyhedron_3.h>
#include<CGAL/algorithm.h>

#include<list>
#include<vector>

typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_3 Point_3;
typedef CGAL::Delaunay_triangulation_3<K> Delaunay;
typedef Delaunay::Vertex_handle Vertex_handle;
typedef CGAL::Polyhedron_3<K> Polyhedron_3;

vector<cg_vektor> dynamic_hull_3d::compute_hull(const Matrixhelper&
matrixhelper)
{
std::vector<cg_vektor> points = matrixhelper.get_alle_punkte();
std::vector<Point_3> punkte;

for (unsigned int i = 0; i< points.size(); ++i)
punkte.push_back(Point_3((double)points[i].get_x(),
(double)points[i].get_y(), (double)points[i].get_z()));

Delaunay T;
for (unsigned int i = 0; i< points.size(); ++i)
T.insert(punkte[i]);

std::list<Vertex_handle> vertices;
T.incident_vertices(T.infinite_vertex(), std::back_inserter(vertices));

vector<cg_vektor> returnvalue;

return returnvalue;
}

With best regards
Gropi





Archive powered by MHonArc 2.6.16.

Top of Page