[Bf-blender-cvs] [7782970] soc-2014-nurbs: Bugfix: inadvertant bool_SUB->bool_UNION fix for trimming verts that start in a grid cell but not in any of its polygons.
Jonathan deWerd
noreply at git.blender.org
Sat Jul 12 09:24:34 CEST 2014
Commit: 7782970300ad391143f17aa0d0b5607a56e666ce
Author: Jonathan deWerd
Date: Thu Jul 3 11:43:16 2014 -0400
https://developer.blender.org/rB7782970300ad391143f17aa0d0b5607a56e666ce
Bugfix: inadvertant bool_SUB->bool_UNION fix for trimming verts that start in a grid cell but not in any of its polygons.
===================================================================
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 3a81cfa..99f855a 100644
--- a/source/blender/editors/curve/GridMesh.cpp
+++ b/source/blender/editors/curve/GridMesh.cpp
@@ -797,6 +797,7 @@ void GridMesh::label_interior_freepoly(int poly) {
int over_poly = poly_for_cell(x,y);
std::set<int> inside; // The set of polygons we are currently inside
for (int p=over_poly; p; p=v[p].next_poly) {
+ if (!point_in_polygon(x, y, p)) continue;
if (inside.count(p)) {
inside.erase(p);
} else {
diff --git a/source/blender/editors/curve/GridMesh_GLUT_debug_tool.cpp b/source/blender/editors/curve/GridMesh_GLUT_debug_tool.cpp
index c528d0b..e1059bd 100644
--- a/source/blender/editors/curve/GridMesh_GLUT_debug_tool.cpp
+++ b/source/blender/editors/curve/GridMesh_GLUT_debug_tool.cpp
@@ -500,8 +500,12 @@ void GLUT_motion(int x, int y) {
void GLUT_passive(int x, int y) {
float sx,sy,dist;
glut_coords_2_scene(x,y,&sx,&sy);
- int v = closest_vert(sx,sy,&dist);
- if (dist<.1) printf("Vertex near cursor: %i\n",v);
+ int vert = closest_vert(sx,sy,&dist);
+ if (dist<.1) {
+ GreinerV2f &v = gm->v[vert];
+ int ie=v.is_entry, ir=v.is_interior, is=v.is_intersection;
+ printf("Hover vert: %i is_entry:%i is_interior:%i is_intersection:%i\n",vert,ie,ir,is);
+ }
}
More information about the Bf-blender-cvs
mailing list