With the new versions of GH (6.00x) there's data paths, which make a
whole lot of components work in a much more desired manner by being
able to do separate operations depending on the path structure.  We're
still waiting on a number of components that allow us to take the
creation and manipulation of paths into our own hands, but there's a
work around that David suggested to me that will probably be useful
for some of you as well.  Its not a perfect way to make your own path
structure, but its better than nothing so here we go.

I'm going to use the example of making multiple lofts, as this is
something that people always tend to want to do.  If you're lucky to
have the output of a component create a path that does the multiple
lofts for you, then you're golden, but that typically isn't the case.
This post is about making multiple lofts directly from your curves by
creating your own path structure.

1. Split Your List - Separate out your curves so that each resulting
list of curves will be used for a single loft.  There are a number of
ways of doing this; Splitting lists, sublists, or the easiest, just
bringing your curves into grasshopper with separate "Curves"
parameters.

2. Assign Paths - Here's really where the work around happens.  The
Flatten component is meant to be used to take a tree of many branches
and make one singular branch from them.  The good news is that you
don't have to have an existing path structure to create a singular
branch path.  So for each list that you've created, add a Flatten
component and connect the curve list to the D node.  The next thing
you'll need to do is specify a path for each one of your Flatten
components.  It is important that you assign each one a unique
number.  Its not really important that they are sequential, but as
long as they're unique they'll be fine.  Right click on the P node
choose Set Path, and change the 0 to whatever number you want.

3. Join the Branches - Here's the second stage of the work around.
The Merge component will honor any path structure that you have within
the data you input.  It will merge data with the same path, but if the
paths are different, then they will just assemble that into a single
stream.  As long as the path numbers that we've specified in the
previous step are unique, then they will all be assembled into one
stream with their paths intact.  You can use Merge or Merge Multiple
depending on how many lists you have.

4. Loft - All that's left now is to feed that merged stream into the
Loft component and you should have multiple lofts.

http://grasshopper3d.googlegroups.com/web/CreatePath_workaround.JPG?hl=en&gsc=UtVCBxYAAADXie_Bp502e3CvS6fTBnNElKW9gda2xEqp8GeRYGM_Dg

Hope this helps people out get a handle on paths.  At this point, this
isn't the optimal way to create paths, but it works and that's what
matters.  I haven't really played around with creating more complex
path structures. My initial thoughts are that it can be done, but
there won't really be too much use for them with how GH currently uses
paths.

Best,
Damien

Reply via email to