[Bf-committers] BMesh split face edge net

Campbell Barton ideasman42 at gmail.com
Wed Oct 26 05:20:37 CEST 2016


On Sat, Oct 22, 2016 at 9:15 PM, Francesc Juhe <fjuhec at gmail.com> wrote:
> Hi,
>
> I have been going through BMesh boolean code the last days and I found this:
>
> https://developer.blender.org/diffusion/B/browse/master/source/blender/bmesh/intern/bmesh_polygon_edgenet.c;fd4caafc53a1c2558f1a27eeaecffb130a146ff4$164
>
>   /* attempt one boundary and one wire, or 2 boundary */
>   if (edges_wire_len == 0) {
>     if (edges_boundary_len > 1) {
>       e_pair[1] = BLI_SMALLSTACK_POP(edges_boundary);
>
>       if (edges_boundary_len > 2) {
> *******
>>>>>        BLI_SMALLSTACK_SWAP(edges_search, edges_wire);
> *******
>       }
>     }
>     else {
>       /* one boundary and no wire */
>       return false;
>     }
>   }
>   else {
>     e_pair[1] = BLI_SMALLSTACK_POP(edges_wire);
>     if (edges_wire_len > 1) {
>       BLI_SMALLSTACK_SWAP(edges_search, edges_wire);
>     }
>   }
>
> I think the first BLI_SMALLSTACK_SWAP(edges_search, edges_wire) should be BLI_SMALLSTACK_SWAP(edges_search, edges_boundary)
>

Thanks for the report, fixed
https://developer.blender.org/rBa1f137767fe7bf7213543a54e1e73e8cc5f29f07

Although its not so bad, I couldn't get this to cause an actual error
since the function splits off closed regions until there are none
remaining.


More information about the Bf-committers mailing list