From 7782970300ad391143f17aa0d0b5607a56e666ce Mon Sep 17 00:00:00 2001 From: Jonathan deWerd Date: Thu, 3 Jul 2014 11:43:16 -0400 Subject: Bugfix: inadvertant bool_SUB->bool_UNION fix for trimming verts that start in a grid cell but not in any of its polygons. --- source/blender/editors/curve/GridMesh.cpp | 1 + source/blender/editors/curve/GridMesh_GLUT_debug_tool.cpp | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/curve/GridMesh.cpp b/source/blender/editors/curve/GridMesh.cpp index 3a81cfa4489..99f855af068 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 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 c528d0bfdcc..e1059bd6e70 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); + } } -- cgit v1.2.3