cgal

Is clang's c++11 support reliable?

江枫思渺然 提交于 2019-12-21 12:41:50
问题 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 will determine whether my program will even compile. I've trimmed down the problem into a minimal example (as minimal as CGAL examples get): #include <vector> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/AABB_tree.h>

Customizing CGAL Kernel with my own Point class

亡梦爱人 提交于 2019-12-20 05:21:27
问题 I would like to use a custom Point class with the CGAL constrained delaunay triangulation. However, with the following MyPoint class (which should behave the exact same as a CGAL::Point_2 no?) I get segmentation faults. It works perfectly if I set the Point_2 typedef inside MyKernel to CGAL::Exact_predicates_inexact_constructions_kernel::Point_2. What am I doing wrong? template<class P> struct MyPoint : public P { MyPoint() : P() {} MyPoint(const MyPoint& p) : P(p) {} MyPoint( int x, int y) :

Customizing CGAL Kernel with my own Point class

末鹿安然 提交于 2019-12-20 05:21:22
问题 I would like to use a custom Point class with the CGAL constrained delaunay triangulation. However, with the following MyPoint class (which should behave the exact same as a CGAL::Point_2 no?) I get segmentation faults. It works perfectly if I set the Point_2 typedef inside MyKernel to CGAL::Exact_predicates_inexact_constructions_kernel::Point_2. What am I doing wrong? template<class P> struct MyPoint : public P { MyPoint() : P() {} MyPoint(const MyPoint& p) : P(p) {} MyPoint( int x, int y) :

compile a simple test with CGAL

删除回忆录丶 提交于 2019-12-19 10:24:28
问题 I have just installed CGAL with brew on a mac system. Now I'm exciting to try it with a simple and minimal example. Ho can I compile it with g++? I want to compile this sample file with: gcc namefile.cpp -lCGAL -I/usr/local/include/CGAL and I get a lot of errors... (too many to paste it here I think) as example file I'm using File: examples/Arrangement_on_surface_2/sweep_line.cpp #include <CGAL/Cartesian.h> #include <CGAL/MP_Float.h> #include <CGAL/Quotient.h> #include <CGAL/Arr_segment

What's a good library to do computational geometry (like CGAL) in a garbage-collected language?

こ雲淡風輕ζ 提交于 2019-12-18 12:59:12
问题 I need a library to handle computational geometry in a project, especially boolean operations, but just about every feature is useful. The best library I can find for this is CGAL, but this is the sort of project I would hesitate to make without garbage collection. What language/library pairs can you recommend? So far my best bet is importing CGAL into D. There is also a project for making Python bindings for CGAL, but it's very incomplete. 回答1: I would still recommend to proceed with Python

Impossible to draw because CGAL_USE_BASIC_VIEWER is not defined

对着背影说爱祢 提交于 2019-12-13 09:34:44
问题 I tried the following example of draw_polyhedron: https://doc.cgal.org/latest/Polyhedron/Polyhedron_2draw_polyhedron_8cpp-example.html but there is the following error : Impossible to draw because CGAL_USE_BASIC_VIEWER is not defined. I tryied to add #define CGAL_USE_BASIC_VIEWER but the error is still existing 回答1: I solved it by adding to ‍‍‍‍‍ .pro file: QMAKE_CXXFLAGS +=-DCGAL_USE_BASIC_VIEWER LIBS+=-DCGAL_USE_BASIC_VIEWER 来源: https://stackoverflow.com/questions/53150670/impossible-to

CGAL: How to merge two (coplanar) polyhedron facets with more than one common edge?

一笑奈何 提交于 2019-12-13 07:35:24
问题 With CGAL, Using any kernal, but preferably the Epeck, how can I safely merge two coplanar facets (of any degree) of a Polyhedron_3? Both facets are on the same Polyhedron_3 surface and already sharing one or more edges. The desired result is that the common edges are all removed, the two facets become a single facet, and no antennae or unconnected vertices remain after the operation. As an example, I would like to merge facets F1 and F2 shown in the diagram below, and have the edges denoted

Algorithm to compute set of bins bounded by a discrete contour

北战南征 提交于 2019-12-13 05:24:50
问题 On a discrete grid-based plane (think: pixels of an image), I have a closed contour that can be expressed either by: a set of 2D points (x1,y1);(x2,y2);(x3,y3);... or a 4-connected Freeman code, with a starting point: (x1,y1) + 00001112... I know how to switch from one to the other of these representations. This will be the input data. I want to get the set of grid coordinates that are bounded by the contour. Consider this example, where the red coordinates are the contour, and the gray one

3d surface triangulation of an open surface with CGAL

人走茶凉 提交于 2019-12-12 14:20:07
问题 I'm a newbie to CGAL library. However, I think it's a very suitable package for what I want to do. I have a set of points representing a 3D surface (as shown in figure 1). I want to fit a 3d triangulation on this surface. The surface is not closed and therefore does not occupy a volume. The code provided in poisson_reconstruction_example.cpp seems appropriate for this job. But the problem is that as a part of poisson_reconstruction algorithm it closes the ends and underneath of the surface to

configure: error: CGAL library not found

断了今生、忘了曾经 提交于 2019-12-12 13:32:25
问题 My ultimate goal is to get python package graph_tool working on my system and also on ipynb if possible. I have already brew install graph-tool , as indicated here, but that's still insufficient. So I follow Anaconda instructions here, and I make decent progress, until the CGAL Library could not be found. Note: to comply with the Anaconda instructions, I installed anaconda3 and created a new conda environment (named py36env ) to conda install all the required packages (packages that must also