Rework carve integration into boolean modifier
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 30 Jan 2014 12:32:23 +0000 (18:32 +0600)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 13 Feb 2014 11:16:53 +0000 (17:16 +0600)
commit83617d24d536ec234bbe53b8b0fbcb76e7b5b3ee
tree1db7504aefb527fefb9fa5c1beb7115fa16b5950
parent51efa8a1f53f230b72210289483dae66f01de51a
Rework carve integration into boolean modifier

Goal of this commit is to support NGons for boolean modifier
(currently mesh is being tessellated before performing boolean
operation) and also solve the limitation of loosing edge custom
data layers after boolean operation is performed.

Main idea is to make it so boolean modifier uses Carve library
directly via it's C-API, avoiding BSP intermediate level which
was doubling amount of memory needed for the operation and which
also used quite reasonable amount of overhead time.

Perhaps memory usage and CPU usage are the same after all the
features are implemented but we've got support now:

- ORIGINDEX for all the geometry
- Interpolation of edge custom data (seams, crease)
- NGons support

Triangulation rule is changed now as well, so now non-flat
polygons are not being merged back after Carve work. This is
so because it's not so trivial to support for NGons and
having different behavior for quads and NGons is even more
creepy.

Reviewers: lukastoenne, campbellbarton

Differential Revision: https://developer.blender.org/D274
32 files changed:
extern/carve/CMakeLists.txt
extern/carve/bundle.sh
extern/carve/carve-capi.cc [new file with mode: 0644]
extern/carve/carve-capi.h [new file with mode: 0644]
extern/carve/carve-util.cc [new file with mode: 0644]
extern/carve/carve-util.h [new file with mode: 0644]
extern/carve/include/carve/interpolator.hpp
extern/carve/patches/interpolator_reorder.patch [new file with mode: 0644]
extern/carve/patches/series
intern/CMakeLists.txt
intern/bsp/CMakeLists.txt [deleted file]
intern/bsp/SConscript [deleted file]
intern/bsp/extern/CSG_BooleanOps.h [deleted file]
intern/bsp/intern/BOP_CarveInterface.cpp [deleted file]
intern/bsp/intern/BOP_Interface.h [deleted file]
intern/bsp/intern/BSP_CSGException.h [deleted file]
intern/bsp/intern/BSP_CSGMesh.cpp [deleted file]
intern/bsp/intern/BSP_CSGMesh.h [deleted file]
intern/bsp/intern/BSP_CSGMesh_CFIterator.h [deleted file]
intern/bsp/intern/BSP_MeshPrimitives.cpp [deleted file]
intern/bsp/intern/BSP_MeshPrimitives.h [deleted file]
intern/bsp/intern/CSG_BooleanOps.cpp [deleted file]
intern/container/CMakeLists.txt
intern/container/CTR_TaggedIndex.h [deleted file]
intern/container/CTR_TaggedSetOps.h [deleted file]
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/SConscript
source/blender/blenlib/BLI_polyfill2d.h
source/blender/modifiers/CMakeLists.txt
source/blender/modifiers/SConscript
source/blender/modifiers/intern/MOD_boolean.c
source/blender/modifiers/intern/MOD_boolean_util.c