cgal

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

人走茶凉 提交于 2019-12-10 11:24:10
问题 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 ------

/usr/include/c++/7/cstdlib:75:15: fatal error: stdlib.h: No such file or directory #include_next <stdlib.h>

房东的猫 提交于 2019-12-10 10:28:16
问题 I've c++ qt project using opengl and CGAL but I've the following error : /usr/include/c++/7/cstdlib:75:15: fatal error: stdlib.h: No such file or directory #include_next <stdlib.h> I searched about the problem and most of solutions about -DENABLE_PRECOMPILED_HEADERS=OFF I use it at .pro file and it doesn't solve the problem . .pro file : QT += core gui opengl QT += xml greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = try_gui TEMPLATE = app DEFINES += QT_DEPRECATED_WARNINGS #DEFINES +=

Link error with libCGAL-vc120-mt-sgd-4.5.1.lib and cant seem to find or build it

℡╲_俬逩灬. 提交于 2019-12-09 23:18:21
问题 Hey I'm a bit of a noob when it comes to CGAL and CMake but I've gotten to the point where everything seems to be running except for this link error: LINK : fatal error LNK1104: cannot open file 'libCGAL-vc120-mt-sgd-4.5.1.lib' trouble is I cant seem to find a reference to this lib anywhere am I building wrong? I can see a 'libCGAL-vc120-mt-gd-4.5.1.lib' in my cgal lib dir which links fine. I'm not sure what the difference between gd and sgd is though and how to make it. Any help is

CGAL surface mesh - removing face

半腔热情 提交于 2019-12-09 02:26:28
Does the remove_face method change the mesh indices? I get a segmentation fault with this code: auto face_iterator = m.faces_around_target(m.halfedge(v3)); for (auto i=face_iterator.begin(); i!=face_iterator.end(); i++) { m.remove_face(*i); } According to my understanding of the documentation, as long as I don't call collect_garbage the faces are only marked as removed., therefore no changes to indices. What is happening? Does remove_face, also remove the face halfedges\ makes them point to null_face? It does not seem to do so, and I don't understand why not.. Thank you. The face is indeed

How can I get the index of the Nearest Point when I use CGAL::K_neighbor_search to do the Nearest Neighbor Search?

风格不统一 提交于 2019-12-08 13:07:30
问题 I am using CGAL's K_neighbor_search module to do the nearest neighbor search problem. It's nice and easily to use. The example code shows that given a query point, it can find the nearest neighbor point from a set of points as well as the distance. However, I can only get the nearest neighbor point itself. I don't know how to get the index of the point found by the algorithm. For example, I use the following code, std::list<Point_d> points; Tree tree(points.begin(), points.end()); Neighbor

Angles of triangles of a 3D mesh using #CGAL

不羁岁月 提交于 2019-12-08 08:59:50
问题 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 回答1: 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

CGAL: Point on the line?

强颜欢笑 提交于 2019-12-08 08:13:10
问题 I've encountered a strange thing in CGAL. I have a line and a point that is supposed to be on this line. This code typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel; int main( ) { CGAL::Line_2<Kernel> l(0.2, 1.0, -1.4); std::cout << l.has_on(CGAL::Point_2<Kernel>(-3.0, 2.0)) << std::endl; std::cout << l.y_at_x(-3.0).exact() << std::endl; return 0; } Produces output: 0 36028797018963967/18014398509481984 OK, maybe the Exact_predicates_exact_constructions_kernel is not good

CGAL surface mesh - removing face

会有一股神秘感。 提交于 2019-12-08 05:20:57
问题 Does the remove_face method change the mesh indices? I get a segmentation fault with this code: auto face_iterator = m.faces_around_target(m.halfedge(v3)); for (auto i=face_iterator.begin(); i!=face_iterator.end(); i++) { m.remove_face(*i); } According to my understanding of the documentation, as long as I don't call collect_garbage the faces are only marked as removed., therefore no changes to indices. What is happening? Does remove_face, also remove the face halfedges\ makes them point to

Representing a LiDAR surface using the 3D Delaunay Triangulation as basis?

安稳与你 提交于 2019-12-08 03:14:58
问题 I would like to represent a surface, with 3D Delaunay Triangulation. The vertices must be my original input data, a LiDAR point cloud from an urban area. So, the surface must adjust/adapt the input information. Actually, what I need to do is the following: I have a 3D point cloud (x, y, z) from an urban area; I need to represent the surface of this area; I would like to do a 3D delaunay triangulation (I did with CGAL and I got the tetrahedrons) and identify only the triangles that represent

CGAL: convex hull of points with info

一曲冷凌霜 提交于 2019-12-08 02:41:34
问题 I have a vector of 2D points (N elements) in the plane. I want to make the convex hull of these points. After that, I want to retrieve the vector index of each vertex in the convex hull, how can I do this? I know that, there is such possibility for triangulation by making use of vector<pair<Point_2, unsigned> > , but when I use paired point in making convex hull, it produces a bunch of errors. This is the related piece of code that I use: #include <iostream> #include <CGAL/Exact_predicates