cgal

CGAL 2D APOLLONIUS diagram for Weighted Voronoi - How to generate and get the faces and vertices?

≡放荡痞女 提交于 2020-06-24 10:51:25
问题 I'm trying to generate weighted voronoi based on apollonius diagram. I'm using CGAL library. I couldn't find good example of how to get faces and vertices from apollonius. I have following typedefs: typedef double NT; typedef CGAL::Cartesian< NT> KernelCartes; typedef CGAL::Ray_2<KernelCartes> Cartes_Ray; typedef CGAL::Line_2<KernelCartes> Cartes_Line; typedef CGAL::Segment_2<KernelCartes> Cartes_Segment; typedef std::list<Cartes_Ray> Cartes_RayList; typedef std::list<Cartes_Line> Cartes

CGAL, Cropped voronoi diagram confined in a rectangle

大憨熊 提交于 2020-01-12 03:53:06
问题 I'm using CGAL with Qt to draw Voronoi diagram. I used CGAL::Voronoi_diagram_2<DT,AT,AP> since I need the faces. This is the example code: for(Face_iterator f = VD.faces_begin(); f != VD.faces_end(); f++) { Ccb_halfedge_circulator ec_start = (f)->ccb(); Ccb_halfedge_circulator ec = ec_start; do { if (!ec->has_source()) { } else QpolyF << QPointF(((Halfedge_handle)ec)->source()->point().x(), ((Halfedge_handle)ec)->source()->point().y()); } while ( ++ec != ec_start ); VectPolygon.push_back

CGAL 4.7 Arrangement of Bezier curves crashes on some inputs

半世苍凉 提交于 2020-01-06 02:51:42
问题 I am using the Arrangements package of CGAL 4.7 (64-bit, on Windows) to make 2-d arrangements of Bezier curves for a research project. Unfortunately, I keep experiencing crashes on some -usually (near) degenerate- input, when inserting Bezier curves. As a simple example I have added the content of two data files that can be read by the Bezier_curve example project provided with CGAL 4.7 (found in .../CGAL-4.7/examples/Arrangement_on_surface_2). The example crashes for me if I feed it either

CGAL Linking Error on Mac OS X

风流意气都作罢 提交于 2020-01-04 04:34:05
问题 I installed cgal with macports: $ sudo port install cgal Then building my sample code with cmake: $ cgal_create_CMakeLists -s out $ cmake . $ make cmake returns succesfully with: -- Requested component: MPFR -- Requested component: GMP -- Boost version: 1.54.0 -- Configuring done -- Generating done -- Build files have been written to: [...] But as soon as I try to use the Exact_predicates_exact_constructions_kernel_with_sqrt kernel in my .cpp file, make fails in the linking stage with the

How to include CGAL in CLion/Linux Project

若如初见. 提交于 2020-01-03 07:01:41
问题 I'm relatively new to C++ Cmake and Clion and I've been struggling with installing CGAL for my project under Clion (which I run on Ubuntu Gnome). I could not find similar issues here or elsewhere and have been blocked for over a week now so I'd greatly appreciate some help. I installed CGAL Cmake GUI, run the make and the install. With the following CMakeList.txt in Clion : cmake_minimum_required(VERSION 3.5) project(AGRAN) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -frounding-math")

Insertion of weighted point with info in CGAL regular triangulation

巧了我就是萌 提交于 2020-01-01 19:37:13
问题 I'm facing a problem that I hope some others have faced before because I can't find a way out ! I have a regular triangulation in CGAL in which I wish to insert some weighted points with info std::pair<myweightpoint, myinfo> one by one and to get the handle to the vertex ( Vertex_handle ) once it is inserted ! The thing is that there is no such function. It exists several functions to insert : Vertex_handle Regular_triangulation::insert ( const Weighted_point & p ) ; That returns a Vertex

CGAL doesn't recognize type

淺唱寂寞╮ 提交于 2019-12-25 09:26:10
问题 For my thesis project I am dependent on a bunch of CGAL code written by another student a year ago. Unfortunately, I can't get the code to compile due to errors. These errors were probably not experienced by the previous student, so they probably are more related to my setup than the code itself, but I have no idea what the direct cause is. The errors are in the file CCBSegmentCalculator.h. The code is as follows: #pragma once #include "bezier_arrangement.h" //Circulates around a PL

CGAL static_cast failing

允我心安 提交于 2019-12-25 08:33:48
问题 For my thesis I am using some CGAL code written by another student a year ago. I cannot get it to build, however. The function that is giving errors is the following: std::set<Curve_handle> originatingCurves(PL_Arrangement arrangement, VertexHandleSet vertices) { std::set<Curve_handle> curves; for (Vertex_handle vertex : vertices) { auto heStart = vertex->incident_halfedges(); auto heCurrent = vertex->incident_halfedges(); do { Halfedge_handle handle = static_cast<Halfedge_handle>(heCurrent);

simplify combinatorial map using CGAL

大兔子大兔子 提交于 2019-12-25 03:02:29
问题 I want to simplify or edge collapse a mesh read from .off file as a combinatorial map using CGAL std::ifstream ifile(fileName.toStdString().c_str()); if (ifile) { CGAL::load_off(lcc, ifile); lcc.display_characteristics(std::cout)<<", is_valid="<<CGAL::is_valid(lcc)<<std::endl; } namespace SMS = CGAL::Surface_mesh_simplification ; SMS::Count_stop_predicate<LCC> stop(lcc.number_of_halfedges()/2 - 1); int r = SMS::edge_collapse (lcc ,stop ,CGAL::parameters::halfedge_index_map(get(CGAL::halfedge

Substract closed mesh from surface (CGAL?)

ぃ、小莉子 提交于 2019-12-24 19:06:33
问题 I have the following problem, best described with the picture below. I have a surface in 3D, so it can have vertical overlap and is a non-closed mesh. And I have an object which I want to subtract from it. The green+yellow area is the original surface, the red lines outline a sphere (as triangulated mesh, not a primitive). The yellow area is the part of the surface intersecting the sphere that needs to be removed from the original surface. The green area is the result of the subtraction: the