Ever want to divide a grid up diagonally? Here is one quick way to do it.

warning – this technique is only for flat polygon grids.

Achieving this task is all about group compositing and how to combine groups to select specific parts of geometry.

First create a grid set the connectivity parameter to triangles and leave the rest of the parameters at default values it’s a good point to start testing from.

Base Grid

Next drop down a group sop below the grid and set it to edge group, turn off the default group and turn on group by edges. In the new menu that appears turn on group by edge length, since we know that on a square grid the diagonal line of the triangle is always going to be the longest we can use edge length as a filter to isolate those edges. You could setup the parameter manually but an expression would make your life a lot easier when changing grid scale. Lucky it’s an easy one, get your grid size divided by grid divisions and you have the edge length of the horizontal and vertical line segments if the high and width is the same. Now multiple it slightly higher and you will have all group with all the diagonal lines.

Diagonal line group

Slight problem inverting the group would give all the orthogonal edges  but it would include the boundary edges are part of the group but they shouldn’t be included because dissolving them would break the grid. So the boundary needs its own group to composite with. Drop down another group node and set it to edge and turn of everything else and right at the bottom select group by  unshared edges.

Now that we have our groups its time for the compositing to begin. Use a group combine to first invert the diagonal group and the subtract the boundary group form the diagonal group.

It should look like this

Now use a dissolve node selecting the diagonal group and that’s it you done! Just the diagonal lines are left.

Try switching to Alternating Triangles to get a chain link fence pattern.

enjoy

Leave a Reply

Your email address will not be published. Required fields are marked *