[Bf-blender-cvs] [91966c4] soc-2014-nurbs: Boolean subtraction implemented and tested.

Jonathan deWerd noreply at git.blender.org
Sat Jul 12 09:24:33 CEST 2014


Commit: 91966c427e71d9968493d7bde7067d7c4cc1a7ca
Author: Jonathan deWerd
Date:   Thu Jul 3 00:05:03 2014 -0400
https://developer.blender.org/rB91966c427e71d9968493d7bde7067d7c4cc1a7ca

Boolean subtraction implemented and tested.

===================================================================

M	source/blender/editors/curve/GridMesh.cpp
M	source/blender/editors/curve/GridMesh_GLUT_debug_tool.cpp

===================================================================

diff --git a/source/blender/editors/curve/GridMesh.cpp b/source/blender/editors/curve/GridMesh.cpp
index a7006f2..3a81cfa 100644
--- a/source/blender/editors/curve/GridMesh.cpp
+++ b/source/blender/editors/curve/GridMesh.cpp
@@ -621,7 +621,6 @@ known_corner_t GridMesh::label_interior_cell(int cell, int poly2, bool bool_SUB,
 				if (k && kin&KNOWN_CORNER(k-1)) {
 					found_known_corner = true;
 					interior = !(kin&KNOWN_CORNER_EXTERIOR(k-1));
-					if (bool_SUB) interior = !interior;
 					printf("   %i k_propagate->%i.interior:%i sub:%i\n",poly, kc_vert, int(interior),int(bool_SUB));
 					break;
 				}
diff --git a/source/blender/editors/curve/GridMesh_GLUT_debug_tool.cpp b/source/blender/editors/curve/GridMesh_GLUT_debug_tool.cpp
index f5f00bb..c528d0b 100644
--- a/source/blender/editors/curve/GridMesh_GLUT_debug_tool.cpp
+++ b/source/blender/editors/curve/GridMesh_GLUT_debug_tool.cpp
@@ -349,12 +349,17 @@ void GLUT_keyboard(unsigned char ch, int x, int y ) {
 		clip = 0;
 		glutPostRedisplay();
 	}
+	if (subj && ch=='k') {
+		gm->bool_SUB(subj);
+		subj = gm->v[subj].next_poly; // Subject was destroyed in trimming process
+		glutPostRedisplay();
+	}
 	if (subj && ch=='i') {
 		gm->insert_vert_poly_gridmesh(subj);
 		glutPostRedisplay();
 	}
 	if (subj && ch=='l') {
-		gm->label_interior_AND(subj);
+		gm->label_interior_SUB(subj);
 		gm->label_interior_freepoly(subj);
 		glutPostRedisplay();
 	}




More information about the Bf-blender-cvs mailing list