Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compile CGAL for iOS / alternate 2D cad library?

I'm hoping to make use of CGAL in an iOS / iPad app. I'm a reasonably experienced iOS developer, but I haven't ever tried including a C++ library such as this one, and I haven't actually used CGAL before. Extensive research has shown it to be the best option for me (I need a free/open source license and a wide range of 2D geometry methods, including tangent/normal vectors at arbitrary points on a bezier, bezier offset, bezier intersection, etc. I'm particularly drawn to CGAL's "arrangements" which let you do boolean operations with closed spaces, though that feature is not a make-or-break feature). I am open to other alternatives, but I have looked into dozens of libraries to arrive at this one -- I'd prefer this discussion to be about CGAL than other suggestions, unless you have a particularly compelling reason to suggest another direction.

Ideally, I'm hoping someone can give me some step-by-step guidance on how to get to the "hello world" of CGAL in iOS.... generating a line between two points, perhaps. I don't need CGAL to do the rendering for me, but I'd also be open to suggestions from anyone who has attempted similar combinations of elements before. I'm using a current version of Xcode, and would like to stick with LLVM compiling (which CGAL in theory now supports).

like image 572
user1818745 Avatar asked Nov 12 '12 17:11

user1818745


People also ask

How do I compile a program using CGAL?

The file CGALConfig.cmake is installed by default in $CMAKE_INSTALLED_PREFIX/lib/cmake/CGAL. Similarly to CGAL and its libraries, compiling a program using CGAL is done in the usual two steps of configuration and building. The configuration process is also done using cmake (or cmake-gui) and requires a CMakeLists.txt file.

Is SourceForge affiliated with CGAL?

SourceForge is not affiliated with CGAL. For more information, see the SourceForge Open Source Mirror Directory . CGAL or the Computational Geometry Algorithms Library is a C++ library that gives you easy access to a myriad of efficient and reliable geometric algorithms.

Are demo files automatically built with CGAL libraries?

By default, these are not configured along with the CGAL libraries, unless you set the variables WITH_examples=ON and/or WITH_demos=ON. Additionally, even when configured with CGAL, they are not automatically built along with the libraries.

Where is the CGAL config file?

During configuration of the CGAL libraries a file named CGALConfig.cmake is generated in CGAL's root directory (in contrast to CGAL's source directory that has been used for installation).


1 Answers

CGAL does support Apple llvm/clang, but only on MacOS X, so far. The reason is that the internals of the CGAL kernel need a special support for the Floating Point Unit. That support was never tried so far for CPUs running iOS.

like image 72
lrineau Avatar answered Oct 03 '22 03:10

lrineau