Deborah R. Fowler

Wrangle Node Example - Candy Roof

Posted Feb 12 2018 Updated April 24 2026 light/dark

Suppose that you have made a roof using the add node method as seen here. What if you wanted to add candy (or shingles/tiles) to the roof?

There are many ways to approach this problem. I will briefly describe a few here and their pros and cons:

In the example file

Example File CandyRoof.hipnc
you will see the second and third approaches. Most importantly, the calculation of the angle is using the point wrangle.

Note that besides calculating the angle, I also calculate the length of the hypotenuse to be used to make the placement evenly distributed on the surface. (It is distance not len function, as len gives the length of a vector (3) - note length function will give the magnitude).

Note that you do not have to set this to a point attribute. You could leave it as a details attribute and retrieve it using the detail function

detail("../pointwrangle1", "angle", 0)

This is seen in my other example file on this page.