From 83617d24d536ec234bbe53b8b0fbcb76e7b5b3ee Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 30 Jan 2014 18:32:23 +0600 Subject: 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 --- extern/carve/patches/interpolator_reorder.patch | 12 ++++++++++++ extern/carve/patches/series | 1 + 2 files changed, 13 insertions(+) create mode 100644 extern/carve/patches/interpolator_reorder.patch (limited to 'extern/carve/patches') diff --git a/extern/carve/patches/interpolator_reorder.patch b/extern/carve/patches/interpolator_reorder.patch new file mode 100644 index 00000000000..867297fef7d --- /dev/null +++ b/extern/carve/patches/interpolator_reorder.patch @@ -0,0 +1,12 @@ +diff -r e82d852e4fb0 include/carve/interpolator.hpp +--- a/include/carve/interpolator.hpp Wed Jan 15 13:16:14 2014 +1100 ++++ b/include/carve/interpolator.hpp Fri Jan 31 18:55:05 2014 +0600 +@@ -219,7 +219,7 @@ + interpolator->edgeDivision(csg, orig_edge, orig_edge_idx, v1, v2); + } + +- Hook(Interpolator *_interpolator, const carve::csg::CSG &_csg) : interpolator(_interpolator), csg(_csg) { ++ Hook(Interpolator *_interpolator, const carve::csg::CSG &_csg) : csg(_csg), interpolator(_interpolator) { + } + + virtual ~Hook() { diff --git a/extern/carve/patches/series b/extern/carve/patches/series index d579cdaf277..30937b4b9cf 100644 --- a/extern/carve/patches/series +++ b/extern/carve/patches/series @@ -5,3 +5,4 @@ mingw.patch gcc46.patch clang_is_heap_fix.patch strict_flags.patch +interpolator_reorder.patch -- cgit v1.2.3