On Wed, Oct 26, 2016 at 10:08 PM, Francesc Juhe <[email protected]> wrote:
> Yes, haven’t found issues caused by it directly, just seemed weird to pass 
> the other list to code below.
>
> Found it while looking into another issue I was having were faces 464 and 465 
> of Suzanne were not cut when intersected with a cube.
>
> Steps to reproduce:
> Default scene.
> Add suzanne.
> Add boolean modifier to suzanne, select difference with cube.
> Translate suzanne to Z +1.0
> suzanne disappears as long as those two faces are intersected.
>
> If I understand the code correctly, there seems to be a difference it the way 
> the next edge is selected because bm_face_split_edgenet_find_loop_pair is 
> separating wires and boundaries before testing the angle while 
> bm_face_split_edgenet_find_loop_walk doesn’t, it compares the angles of both 
> wires and boundaries, which normally would select the wire but in this case 
> selects the boundary and the face is not split.
>
> Fixed it with this code, but don’t know if you would consider it acceptable. 
> I considered separating lists like on find_loop_pair but for testing this was 
> the smallest modification I could think of.
>
> diff --git a/source/blender/bmesh/intern/bmesh_polygon_edgenet.c 
> b/source/blender/bmesh/intern/bmesh_polygon_edgenet.c
> @@ -386,6 +386,8 @@ walk_nofork:
>
>                         for (j = 0; j < STACK_SIZE(edge_order); j++) {
>                                 edge_order[j].angle = 
> angle_signed_on_axis_v3v3v3_v3(v_prev->co, v->co, edge_order[j].v->co, 
> face_normal);
> +                               /* give higher sorting priority to wire edges 
> */
> +                               edge_order[j].angle -= 10.0f * 
> bm_edge_flagged_radial_count(edge_order[j].v->e);
>                         }
>                         qsort(edge_order, STACK_SIZE(edge_order), 
> sizeof(struct VertOrder), BLI_sortutil_cmp_float_reverse);
>

Best report this in the tracker, its getting a bit detailed for the
general developer list.

Note that the angle can be offset by `pi * 2` (with some epsilon to
ensure no overlap) instead of 10.
_______________________________________________
Bf-committers mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-committers

Reply via email to