Carve booleans library integration
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 16 Jan 2012 16:46:00 +0000 (16:46 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 16 Jan 2012 16:46:00 +0000 (16:46 +0000)
commite81f2853c8785b0a84ecebf7c4db433af434c5c8
treef3145e592452e5d2cb2d162ec53813f0e552a2fe
parentc150d0084f0e1cf86f063d993b31d02fc3e9c71f
Carve booleans library integration
==================================

Merging Carve library integration project into the trunk.

This commit switches Boolean modifier to another library which handles
mesh boolean operations in much stable and faster way, resolving old
well-known limitations of intern boolop library.

Carve is integrating as alternative interface for boolop library and
which makes it totally transparent for blender sources to switch between
old-fashioned boolop and new Carve backends.

Detailed changes in this commit:

- Integrated needed subset of Carve library sources into extern/
  Added script for re-bundling it (currently works only if repo
  was cloned by git-svn).
- Added BOP_CarveInterface for boolop library which can be used by
  Boolean modifier.
- Carve backend is enabled by default, can be disabled by WITH_BF_CARVE
  SCons option and WITH_CARVE CMake option.
- If Boost library is found in build environment it'll be used for
  unordered collections. If Boost isn't found, it'll fallback to TR1
  implementation for GCC compilers. Boost is obligatory if MSVC is used.

Tested on Linux 64bit and Windows 7 64bit.

NOTE: behavior of flat objects was changed. E.g. Plane-Sphere now gives
      plane with circle hole, not plane with semisphere. Don't think
      it's really issue because it's not actually defined behavior in
      such situations and both of ways might be useful. Since it's
      only known "regression" think it's OK to deal with it.

Details are there http://wiki.blender.org/index.php/User:Nazg-gul/CarveBooleans

Special thanks to:

- Ken Hughes: author of original carve integration patch.
- Campbell Barton: help in project development, review tests.
- Tobias Sargeant: author of Carve library, help in resolving some
                   merge stoppers, bug fixing.
145 files changed:
CMakeLists.txt
build_files/scons/tools/btools.py
extern/CMakeLists.txt
extern/SConscript
extern/carve/CMakeLists.txt [new file with mode: 0644]
extern/carve/LICENSE.GPL2 [new file with mode: 0644]
extern/carve/SConscript [new file with mode: 0644]
extern/carve/bundle.sh [new file with mode: 0755]
extern/carve/files.txt [new file with mode: 0644]
extern/carve/include/carve/aabb.hpp [new file with mode: 0644]
extern/carve/include/carve/aabb_impl.hpp [new file with mode: 0644]
extern/carve/include/carve/carve.hpp [new file with mode: 0644]
extern/carve/include/carve/cbrt.h [new file with mode: 0644]
extern/carve/include/carve/classification.hpp [new file with mode: 0644]
extern/carve/include/carve/collection.hpp [new file with mode: 0644]
extern/carve/include/carve/collection/unordered.hpp [new file with mode: 0644]
extern/carve/include/carve/collection/unordered/boost_impl.hpp [new file with mode: 0644]
extern/carve/include/carve/collection/unordered/fallback_impl.hpp [new file with mode: 0644]
extern/carve/include/carve/collection/unordered/libstdcpp_impl.hpp [new file with mode: 0644]
extern/carve/include/carve/collection/unordered/std_impl.hpp [new file with mode: 0644]
extern/carve/include/carve/collection/unordered/tr1_impl.hpp [new file with mode: 0644]
extern/carve/include/carve/collection/unordered/vcpp_impl.hpp [new file with mode: 0644]
extern/carve/include/carve/collection_types.hpp [new file with mode: 0644]
extern/carve/include/carve/colour.hpp [new file with mode: 0644]
extern/carve/include/carve/config.h [new file with mode: 0644]
extern/carve/include/carve/convex_hull.hpp [new file with mode: 0644]
extern/carve/include/carve/csg.hpp [new file with mode: 0644]
extern/carve/include/carve/csg_triangulator.hpp [new file with mode: 0644]
extern/carve/include/carve/debug_hooks.hpp [new file with mode: 0644]
extern/carve/include/carve/djset.hpp [new file with mode: 0644]
extern/carve/include/carve/edge_decl.hpp [new file with mode: 0644]
extern/carve/include/carve/edge_impl.hpp [new file with mode: 0644]
extern/carve/include/carve/exact.hpp [new file with mode: 0644]
extern/carve/include/carve/face_decl.hpp [new file with mode: 0644]
extern/carve/include/carve/face_impl.hpp [new file with mode: 0644]
extern/carve/include/carve/faceloop.hpp [new file with mode: 0644]
extern/carve/include/carve/geom.hpp [new file with mode: 0644]
extern/carve/include/carve/geom2d.hpp [new file with mode: 0644]
extern/carve/include/carve/geom3d.hpp [new file with mode: 0644]
extern/carve/include/carve/geom_impl.hpp [new file with mode: 0644]
extern/carve/include/carve/gnu_cxx.h [new file with mode: 0644]
extern/carve/include/carve/heap.hpp [new file with mode: 0644]
extern/carve/include/carve/input.hpp [new file with mode: 0644]
extern/carve/include/carve/interpolator.hpp [new file with mode: 0644]
extern/carve/include/carve/intersection.hpp [new file with mode: 0644]
extern/carve/include/carve/iobj.hpp [new file with mode: 0644]
extern/carve/include/carve/kd_node.hpp [new file with mode: 0644]
extern/carve/include/carve/math.hpp [new file with mode: 0644]
extern/carve/include/carve/math_constants.hpp [new file with mode: 0644]
extern/carve/include/carve/matrix.hpp [new file with mode: 0644]
extern/carve/include/carve/mesh.hpp [new file with mode: 0644]
extern/carve/include/carve/mesh_impl.hpp [new file with mode: 0644]
extern/carve/include/carve/mesh_ops.hpp [new file with mode: 0644]
extern/carve/include/carve/mesh_simplify.hpp [new file with mode: 0644]
extern/carve/include/carve/octree_decl.hpp [new file with mode: 0644]
extern/carve/include/carve/octree_impl.hpp [new file with mode: 0644]
extern/carve/include/carve/pointset.hpp [new file with mode: 0644]
extern/carve/include/carve/pointset_decl.hpp [new file with mode: 0644]
extern/carve/include/carve/pointset_impl.hpp [new file with mode: 0644]
extern/carve/include/carve/pointset_iter.hpp [new file with mode: 0644]
extern/carve/include/carve/poly.hpp [new file with mode: 0644]
extern/carve/include/carve/poly_decl.hpp [new file with mode: 0644]
extern/carve/include/carve/poly_impl.hpp [new file with mode: 0644]
extern/carve/include/carve/polyhedron_base.hpp [new file with mode: 0644]
extern/carve/include/carve/polyhedron_decl.hpp [new file with mode: 0644]
extern/carve/include/carve/polyhedron_impl.hpp [new file with mode: 0644]
extern/carve/include/carve/polyline.hpp [new file with mode: 0644]
extern/carve/include/carve/polyline_decl.hpp [new file with mode: 0644]
extern/carve/include/carve/polyline_impl.hpp [new file with mode: 0644]
extern/carve/include/carve/polyline_iter.hpp [new file with mode: 0644]
extern/carve/include/carve/rescale.hpp [new file with mode: 0644]
extern/carve/include/carve/rtree.hpp [new file with mode: 0644]
extern/carve/include/carve/spacetree.hpp [new file with mode: 0644]
extern/carve/include/carve/tag.hpp [new file with mode: 0644]
extern/carve/include/carve/timing.hpp [new file with mode: 0644]
extern/carve/include/carve/tree.hpp [new file with mode: 0644]
extern/carve/include/carve/triangulator.hpp [new file with mode: 0644]
extern/carve/include/carve/triangulator_impl.hpp [new file with mode: 0644]
extern/carve/include/carve/util.hpp [new file with mode: 0644]
extern/carve/include/carve/vcpp_config.h [new file with mode: 0644]
extern/carve/include/carve/vector.hpp [new file with mode: 0644]
extern/carve/include/carve/vertex_decl.hpp [new file with mode: 0644]
extern/carve/include/carve/vertex_impl.hpp [new file with mode: 0644]
extern/carve/include/carve/win32.h [new file with mode: 0755]
extern/carve/lib/aabb.cpp [new file with mode: 0644]
extern/carve/lib/carve.cpp [new file with mode: 0644]
extern/carve/lib/convex_hull.cpp [new file with mode: 0644]
extern/carve/lib/csg.cpp [new file with mode: 0644]
extern/carve/lib/csg_collector.cpp [new file with mode: 0644]
extern/carve/lib/csg_collector.hpp [new file with mode: 0644]
extern/carve/lib/csg_data.hpp [new file with mode: 0644]
extern/carve/lib/csg_detail.hpp [new file with mode: 0644]
extern/carve/lib/edge.cpp [new file with mode: 0644]
extern/carve/lib/face.cpp [new file with mode: 0644]
extern/carve/lib/geom2d.cpp [new file with mode: 0644]
extern/carve/lib/geom3d.cpp [new file with mode: 0644]
extern/carve/lib/intersect.cpp [new file with mode: 0644]
extern/carve/lib/intersect_classify_common.hpp [new file with mode: 0644]
extern/carve/lib/intersect_classify_common_impl.hpp [new file with mode: 0644]
extern/carve/lib/intersect_classify_edge.cpp [new file with mode: 0644]
extern/carve/lib/intersect_classify_group.cpp [new file with mode: 0644]
extern/carve/lib/intersect_common.hpp [new file with mode: 0644]
extern/carve/lib/intersect_debug.cpp [new file with mode: 0644]
extern/carve/lib/intersect_debug.hpp [new file with mode: 0644]
extern/carve/lib/intersect_face_division.cpp [new file with mode: 0644]
extern/carve/lib/intersect_group.cpp [new file with mode: 0644]
extern/carve/lib/intersect_half_classify_group.cpp [new file with mode: 0644]
extern/carve/lib/intersection.cpp [new file with mode: 0644]
extern/carve/lib/math.cpp [new file with mode: 0644]
extern/carve/lib/mesh.cpp [new file with mode: 0644]
extern/carve/lib/octree.cpp [new file with mode: 0644]
extern/carve/lib/pointset.cpp [new file with mode: 0644]
extern/carve/lib/polyhedron.cpp [new file with mode: 0644]
extern/carve/lib/polyline.cpp [new file with mode: 0644]
extern/carve/lib/tag.cpp [new file with mode: 0644]
extern/carve/lib/timing.cpp [new file with mode: 0644]
extern/carve/lib/triangulator.cpp [new file with mode: 0644]
extern/carve/mkfiles.sh [new file with mode: 0755]
extern/carve/patches/files/config.h [new file with mode: 0644]
extern/carve/patches/files/random.hpp [new file with mode: 0644]
extern/carve/patches/includes.patch [new file with mode: 0644]
extern/carve/patches/mesh_iterator.patch [new file with mode: 0644]
extern/carve/patches/series [new file with mode: 0644]
extern/carve/patches/strict_flags.patch [new file with mode: 0644]
extern/carve/patches/win32.patch [new file with mode: 0644]
intern/boolop/CMakeLists.txt
intern/boolop/SConscript
intern/boolop/intern/BOP_BSPNode.cpp
intern/boolop/intern/BOP_BSPNode.h
intern/boolop/intern/BOP_BSPTree.cpp
intern/boolop/intern/BOP_CarveInterface.cpp [new file with mode: 0644]
intern/boolop/intern/BOP_Edge.cpp
intern/boolop/intern/BOP_Face.h
intern/boolop/intern/BOP_Indexs.h
intern/boolop/intern/BOP_Interface.cpp
intern/boolop/intern/BOP_MathUtils.cpp
intern/boolop/intern/BOP_Merge.h
intern/boolop/intern/BOP_Merge2.h
intern/boolop/intern/BOP_Mesh.h
intern/boolop/intern/BOP_Segment.cpp
intern/boolop/intern/BOP_Segment.h
intern/boolop/intern/BOP_Splitter.cpp
intern/boolop/intern/BOP_Triangulator.cpp
source/blender/modifiers/intern/MOD_boolean.c
source/creator/CMakeLists.txt