By the way, I will go back to the **quadrangulate **discussion we had a while, my geometry comes triangulated as it comes from a game engine and doesn’t keep quads.
In the end, I replaced the dissolve node by a wrangle in the node and it runs way faster, I basically recreate polygons myself. I will put it there if someone needs it
It might not work with all cases, works in mine, though
“` int ordered_poly[]; int shared_pts[]; int vtx_tmp[];
// Get the edge group from the first input int pts[] = expandedgegroup(0, “long_edge”);
// Loop through the point pairs making up the edges for (int i = 0; i < len(pts); i += 2) { // Get positions of the two points for the current edge int first_hedge = pointedge(0, pts[i], pts[i+1]); int first_prim = hedge_prim(0, first_hedge); int second_hedge = hedge_nextequiv(0, first_hedge); int second_prim = hedge_prim(0, second_hedge); int vtx1[] = primpoints(0, first_prim); int vtx2[] = primpoints(0, second_prim); shared_pts = array(pts[i], pts[i+1]); // get unique points int p_shared_a = shared_pts[0]; int p_shared_b = shared_pts[1]; vtx_tmp = vtx1; removevalue(vtx_tmp, shared_pts[0]); removevalue(vtx_tmp, shared_pts[1]); int p_unique_0 = vtx_tmp[0]; vtx_tmp = vtx2; removevalue(vtx_tmp, shared_pts[0]); removevalue(vtx_tmp, shared_pts[1]); int p_unique_1 = vtx_tmp[0]; // Find winding int idx_a = find(vtx1, p_shared_a); int idx_b = find(vtx1, p_shared_b); if((idx_a + 1) % 3 == idx_b){ ordered_poly = array(p_unique_0, p_shared_a, p_unique_1, p_shared_b); } else { ordered_poly = array(p_unique_0, p_shared_b, p_unique_1, p_shared_a); } // put prims to delete in a group setprimgroup(0, "__to_del", first_prim, 1); setprimgroup(0, "__to_del", second_prim, 1); // Create polygon int new_poly = addprim(0, "poly"); foreach(int p; ordered_poly){ addvertex(0, new_poly, p); } } “`