Questions tagged [cgal]

The Computational Geometry Algorithms Library (CGAL) is a software library that aims to provide easy access to efficient and reliable algorithms in computational geometry.

The goal of the CGAL Open Source Project is to provide easy access to efficient and reliable geometric algorithms in the form of a C++ library. CGAL is used in various areas needing geometric computation, such as: computer graphics, scientific visualization, computer aided design and modeling, geographic information systems, molecular biology, medical imaging, robotics and motion planning, mesh generation, numerical methods...

The CGAL library is primarily written in , but bindings using are provided by the CGAL bindings project (for example and bindings).

1299 questions
10
votes
2 answers

How to fix "Qt requires a C++17 compiler" error?

I installed with brew the CGAL C++ library. After doing cmake . in the first basic example , I do make and I got a sequence of errors, the first one and most important is: /usr/local/include/QtCore/qglobal.h:96:6: error: "Qt requires a C++17…
bob_bill
  • 103
  • 1
  • 4
10
votes
6 answers

What happened to the python bindings for CGAL?

I found the Computational Geometry Algorithms Library in my search for an algorithm to decompose a concave polygon into the minimum number of convex components. Links off the site and numerous google results indicate there are python bindings for…
Nick Retallack
  • 18,986
  • 17
  • 92
  • 114
9
votes
1 answer

CGAL 2D Delaunay Triangulation: How to get edges as vertex id pairs

I have a set of 2D points each with an associated id. (e.g. if the points are stored in an array, the id is the index into each point 0,....,n-1 ). Now I create a Delaunay triangulation of these points and want to list down all the finite edges. For…
911
  • 908
  • 8
  • 16
8
votes
2 answers

Is there a way to make this shortest path algorithm faster?

Using the CGAL lib, I'm trying to implement the Shortest Path methods. I've been kind of successful, but the time it takes to map a path is not nearly acceptable, taking up to 1.5 seconds running in Release. I'm aware that the input might be…
Alexandre Severino
  • 1,563
  • 1
  • 16
  • 38
8
votes
1 answer

CGAL - Retrieve Vertex Index After Delaunay Triangulation

I am computing the 2D delaunay triangulation of a few thousand points. Each point has more data associated with it beyond x and y coordinates. Therefore, I was wondering if it is possible to retrieve the index of each point so that I can access my…
socratic
  • 329
  • 2
  • 9
7
votes
1 answer

CGAL: Intersection between a segment and a polygon?

I have a set of polygons and I want to test intersection between it and a segment. I checked the manual but I cannot find a matching function. The intersection between points, lines, segments, triangles, planes do exist. And the intersection between…
Ivan Xiao
  • 1,919
  • 3
  • 19
  • 30
7
votes
3 answers

Bad lighting using Phong Method

I'm trying to make a cube, which is irregularly triangulated, but virtually coplanar, shade correctly. Here is the current result I have: With wireframe: Normals calculated in my program: Normals calculated by meshlabjs.net: The lighting works…
Alexandre Severino
  • 1,563
  • 1
  • 16
  • 38
7
votes
1 answer

Is clang's c++11 support reliable?

I ran into an interesting issue when trying to mix clang (Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn, Target: x86_64-apple-darwin14.0.0), c++11 and CGAL (via MacPorts). It seems that whether or not I call std::vector<>::reserve…
Alec Jacobson
  • 6,032
  • 5
  • 51
  • 88
7
votes
1 answer

PCL kd-tree implementation extremely slow

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…
ayan.c
  • 263
  • 2
  • 7
  • 17
7
votes
2 answers

Using CGAL to partition a non-simple polygon

Suppose that I have a non-simple polygon, how CGAL can help me to partition it into a set of simple polygons? For example, give a polygon represented by a sequence of 2D points: (1, 1) (1, -1) (-1, 1) (-1, -1) I wish to acquire two polygons;…
Wei-Fan Chiang
  • 273
  • 1
  • 7
6
votes
3 answers

CGAL versus VTK

What is the difference between the CGAL and the VTK libraries? Both incorporate a lot of the standard geometric algorithms. Can anyone list some application domains where the one is preferred over the other?
smilingbuddha
  • 14,334
  • 33
  • 112
  • 189
6
votes
1 answer

How do you install CGAL with QT5 on Ubuntu 18:04?

I have run: apt-get install -y libcgal-ipelets libcgal-dev libcgal-qt5-dev libcgal-demo But when I try and compile a simple CGAL program with cmake using: cmake_minimum_required(VERSION 3.1) project(test_cgal) #CGAL_Qt5 is needed for the drawing and…
nickponline
  • 25,354
  • 32
  • 99
  • 167
6
votes
2 answers

75:15: fatal error: stdlib.h: No such file or directory #include_next

I'm a beginner in working with CGAL libraries , I tried to run a combinatorial map example qt-creator on fedora after combiling CGAL: #include #include #include #include typedef…
n.m
  • 485
  • 1
  • 5
  • 15
6
votes
0 answers

How joining two Polygon_with_holes_2 on cgal

I have two polygons (Polygon_with_holes_2) how joining it into thirth Polygon_with_holes_2 I need general solution. Get any polygon_with_holes (or not if empty hole list but still polygon_with_holes structures) and joining it with other and get…
6
votes
2 answers

How to compute a point on a line in CGAL

Given a 3D line in CGAL, how do I compute a point on that line that is some known distance from an endpoint?
Tara Harris
  • 85
  • 10
1
2
3
86 87