River Tool

   1940   0   0
User Avatar
Member
14 posts
Joined: March 2017
Offline
Been creating a tool that will create a river for a terrain. A part of my network makes the input curve always go downward by running a simple previous point position wrangle through a for each loop:

vector pos = 0;
pos = point(0, “P”, (@ptnum-1));
if (pos.y < @P.y)
{
@P.y = pos.y;
}

This works just as intended, however, only when the points of the input curve are below the origin (@P.y=0).
I have got round this by transforming the curve before the loop and transforming back by attribute (@xform) afterwards but can anyone explain why this was necessary? Cant for the life of me figure out why.
Image Not Found

I have included a hip file

Attachments:
CurveAlwaysDown.hiplc (117.5 KB)

  • Quick Links