Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-08-11 18:50:28 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-08-11 18:55:52 +0400
commit0fe70b5e2871bd82d868614548fd62d81f1873c3 (patch)
treeaa4a3d98231ca0db7d536fb2105980def184b2fa /extern/carve/carve-util.h
parentce960028a4c086553959684c7a9930145225c1ce (diff)
Fix T41360: Crash on Boolean Modifier
The issue was caused by the wrong attributes maps in certain circumstances after union intersections. Namely issue might have happen when more than one iteration of union was happening and it was caused by the fact that new faces might be allocated on the same address as freed face from the old mesh. Didn't find a nicer fix for this apart from correcting the whole attributes map after each union step. We could try removing attributes for the meshes which are getting deleted, but in asymptotic it's gonna to give exactly the same complexity as the current approach.
Diffstat (limited to 'extern/carve/carve-util.h')
-rw-r--r--extern/carve/carve-util.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/extern/carve/carve-util.h b/extern/carve/carve-util.h
index 0b509aa3cab..3edf1bb1c02 100644
--- a/extern/carve/carve-util.h
+++ b/extern/carve/carve-util.h
@@ -70,9 +70,15 @@ void carve_getRescaleMinMax(const carve::mesh::MeshSet<3> *left,
carve::geom3d::Vector *min,
carve::geom3d::Vector *max);
-bool carve_unionIntersections(carve::csg::CSG *csg,
+typedef void (*UnionIntersectionsCallback) (const carve::mesh::MeshSet<3> *left,
+ const carve::mesh::MeshSet<3> *right,
+ void *userdata);
+
+void carve_unionIntersections(carve::csg::CSG *csg,
carve::mesh::MeshSet<3> **left_r,
- carve::mesh::MeshSet<3> **right_r);
+ carve::mesh::MeshSet<3> **right_r,
+ UnionIntersectionsCallback callback,
+ void *user_data);
bool carve_checkPolyPlanarAndGetNormal(const std::vector<carve::mesh::MeshSet<3>::vertex_t> &vertex_storage,
const int verts_per_poly,