CGAL Boolean Operations

From K-3D

Jump to: navigation, search

As of version 0.7, K-3D uses CGAL for 3D boolean operations.

Installation

Only CGAL 3.3.1 is supported. You can download the source from here. Because the K-3D polyhedra are not stored using exact number types, some harmless assertions in the CGAL code fail. For best results, these assertions need to be removed by applying a patch. The installation procedure is as follows:

  • Make sure you have the GMP and MPFR libraries and development files installed.
  • Extract the CGAL 3.3.1 source
  • cd to the CGAL-3.3.1 directory
  • Download the patch to the CGAL-3.3.1 directory
  • execute "patch -p0 < cgal-3.3.1-k3d.diff" in the CGAL-3.3.1 directory
  • As root, install to i.e. /usr/local: "./install_cgal --prefix=/usr/local"

Issues

  • On complex objects with many faces, CGAL sometimes returns an error. This will either be solved together with the CGAL people, or the error case will have to be detected and solved by triangulating the input
  • Polyhedra with non-planar faces (up to a threshold) or non-solid polyhedra are not supported. The user should be notified when an invalid input is used

Screenshots


Personal tools