[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44104] trunk/blender/intern/boolop/intern /BOP_CarveInterface.cpp: Carve: improved handling of meshes with interesting manifolds

Sergey Sharybin sergey.vfx at gmail.com
Tue Feb 14 10:43:49 CET 2012


Revision: 44104
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44104
Author:   nazgul
Date:     2012-02-14 09:43:35 +0000 (Tue, 14 Feb 2012)
Log Message:
-----------
Carve: improved handling of meshes with interesting manifolds

Unioning of intersecting manifold tried to perform as little union operations
as possible, but there were some not totally correct assumption which lead to
cases when unioning of manifolds of some mesh might be happened when one of
mesh sets already had got intersecting manifolds.

This commit corrects this incorrect behavior.

Discovered this when was looking into #30175: Boolean Difference causes 2.62 RC1 crash.

Modified Paths:
--------------
    trunk/blender/intern/boolop/intern/BOP_CarveInterface.cpp

Modified: trunk/blender/intern/boolop/intern/BOP_CarveInterface.cpp
===================================================================
--- trunk/blender/intern/boolop/intern/BOP_CarveInterface.cpp	2012-02-14 07:54:12 UTC (rev 44103)
+++ trunk/blender/intern/boolop/intern/BOP_CarveInterface.cpp	2012-02-14 09:43:35 UTC (rev 44104)
@@ -43,6 +43,9 @@
 using namespace carve::geom;
 typedef unsigned int uint;
 
+static void Carve_unionIntersections(MeshSet<3> **left_r, MeshSet<3> **right_r,
+                                     carve::interpolate::FaceAttr<uint> &oface_num);
+
 #define MAX(x,y) ((x)>(y)?(x):(y))
 #define MIN(x,y) ((x)<(y)?(x):(y))
 
@@ -276,6 +279,10 @@
 				left = right;
 			}
 			else {
+				/* there might be intersections between manifolds of one operand and another mesh which isn't
+				 * taking into accound in Carve_getIntersectedOperand because of optimization purposes */
+				Carve_unionIntersections(&left, &right, oface_num);
+
 				MeshSet<3> *result = csg.compute(left, right, carve::csg::CSG::UNION, NULL, carve::csg::CSG::CLASSIFY_EDGE);
 
 				delete left;




More information about the Bf-blender-cvs mailing list