cgal

Linking error with CGAL

百般思念 提交于 2019-12-08 02:21:42
问题 I have CGAL installed on my Mac OS X (10.8.4). I have successfully incorporated aspects of CGAL into previous C++ programs to compute the convex hull of a 3D point cloud. However, now I am trying to include other parts of CGAL for computing surface meshes, converting them to polyhedra, and so on. When I do that, the program compiles just fine, but then I receive linking errors that I don't understand. Here is my linking command following compilation: c++ -O2 -I/usr/local/include -I/usr

How to create a CMakeLists.txt for a project containing CGAL and VTK libraries

混江龙づ霸主 提交于 2019-12-08 00:25:28
问题 I've written a small programm for evaluating sientific data (3D surface mesh). I do all the geometric calculations with functions provided by the vtk library. The vtkBooleanOperationPolyDataFilter is no robust and crashes randomly. So i decided to performe the boolean operations with functions of the cgal library (tested with some sample data -> no stability problems). Now I want to merge this two projects together. The vtk project CMakeLists.txt: cmake_minimum_required(VERSION 2.8) PROJECT

Angles of triangles of a 3D mesh using #CGAL

耗尽温柔 提交于 2019-12-07 13:14:26
I would like to know if it is possible to compute the angles of triangles of a 3D mesh (represented with a graph) using a function of CGAL ? Thanks If you have a non-degenerated triangle with three points a , b , and c , the angle of triangle, the cosine of the angle at a is the scalar product of two vectors divided by their lengths: CGAL::Vector_3<K> v1 = b - a; CGAL::Vector_3<K> v2 = c - a; double cosine = v1 * v2 / CGAL::sqrt(v1*v1) / CGAL::sqrt(v2 * v2); where K is the type of kernel that you are using for the points. The angle itself in radius can be computed by: double angle = std::acos

How to print the faces of a Voronoi diagram?

[亡魂溺海] 提交于 2019-12-07 08:58:50
问题 Code bellow assumes input is points, not line segments (which is wrong). Following this 2D Voronoi Diagram Adaptor example, I am trying to write a program which takes as input line segments and prints the vertices of the faces of the Voronoi diagram. Here is my attempt (keeping includes/typedefs of the example): // standard includes #include <iostream> #include <fstream> #include <cassert> // includes for defining the Voronoi diagram adaptor #include <CGAL/Exact_predicates_inexact

Share CGAL's geometry between processes in C++

房东的猫 提交于 2019-12-07 07:13:10
问题 I'm looking for the fastest way to send CGAL's geometry between processes (C++). Lets assume, that we have 2 processes - A and B. Process A is generating geometry and process B is displaying it. I want to connect them in the fastest awailable way. The geometry is of CGALs Polyhedron type. I know I can use shared memory, but then I've got some problems: When I want to copy geometry from process A to shared memory I can use streaming Polyhedron to/from OFF format, but I’m not interested in it,

How to create a CMakeLists.txt for a project containing CGAL and VTK libraries

天大地大妈咪最大 提交于 2019-12-06 13:30:21
I've written a small programm for evaluating sientific data (3D surface mesh). I do all the geometric calculations with functions provided by the vtk library. The vtkBooleanOperationPolyDataFilter is no robust and crashes randomly. So i decided to performe the boolean operations with functions of the cgal library (tested with some sample data -> no stability problems). Now I want to merge this two projects together. The vtk project CMakeLists.txt: cmake_minimum_required(VERSION 2.8) PROJECT(calcporosity) find_package(VTK REQUIRED) include(${VTK_USE_FILE}) add_executable(calcporosity MACOSX

CGAL 4.4 Arrangement insert(arr,curve) crashes with some curves

柔情痞子 提交于 2019-12-06 09:33:04
I tried to use Arrangement from CGAL, but for not clear reasons program crashes for some curves in CGAL 4.4 (not such problem in previous versions 4.3). Look at simple overview of problem, curve is outline of letter D, converted into line segments: dDouble dpts { 16.261, 95.267, ... 95.267, 16.261, 95.267}; dPoint pts = ... // converting to exact points with 3 decimal places Curve_2 cu = Curve_2(pts.begin(), pts.end()); insert(arr, cu); // <---- here crash, supposed bug in CGAL 4.4 ------ Furthermore insert() also output empty line to stdout. I provide full example with cmake config file and

PCL kd-tree implementation extremely slow

白昼怎懂夜的黑 提交于 2019-12-06 06:03:22
问题 I am using Point Cloud Library (PCL) based C++ implementation of kd-tree nearest neighbour(NN) searching. The data set contains about 2.2 million points. I am searching NN points for every other point. The search radius is set at 2.0. To fully compute that, it takes about 12 hours! I am using windows 64 bit machine with 4GB RAM. Is it very common for kd-tree searching? I wonder if there is any other c++ library for 3D point cloud data, which is faster. I heard about ANN C++ library & CGAL,

How to print the faces of a Voronoi diagram?

只谈情不闲聊 提交于 2019-12-05 16:13:34
Code bellow assumes input is points, not line segments (which is wrong). Following this 2D Voronoi Diagram Adaptor example, I am trying to write a program which takes as input line segments and prints the vertices of the faces of the Voronoi diagram. Here is my attempt (keeping includes/typedefs of the example): // standard includes #include <iostream> #include <fstream> #include <cassert> // includes for defining the Voronoi diagram adaptor #include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Delaunay_triangulation_2.h> #include <CGAL/Voronoi_diagram_2.h> #include

Surface parametrization

对着背影说爱祢 提交于 2019-12-05 01:15:52
问题 I am trying to get a parametrized surface on a surface mesh (which is read from a STL format file.). I read some examples about parametrization provided by CGAL examples directory. I get to know that seam line should be provided in order to get a parametric surface on a arbitrary surface. But still I don't get how to make seam line. The below is my code so far. In summary, What I want to know is, 1) When CGAL::Parameterization_mesh_feature_extractor is used, how can I get vertices on the