Grasshopper

algorithmic modeling for Rhino

Hi,

 

I lost the path structure on this tree while calculating intersection points. I'm not sure why.

 

Now I am trying to split this tree into different paths (see the screenshot).

 

The branches should be split according to the first number in the path. There should be 37 branches in all. It doesn't matter that they are different lengths.

 

I'm pretty sure it's the path mapper, but no idea where to start.. If anyone can help, amazing..

S.

Views: 1812

Attachments:

Replies to This Discussion

What you need to do is put {A;B;C;D} and {A;B;C;D;E} (on a new line) in the Left hand side of the Path Mapper Editor and {A;B;C;D} x2 in the Right. (separate line for each) see Image.

This should but everything that is at level E for Each A together on Level D. You will have Nulls and empty branches.

Thanks! I suddenly understand how it works.. I was thinking of it in terms of how to put everything at A level..

 

Although I haven't covered this topic yet. Have you had a chance to see this post: link?

Hi Danny,

I hope you're going to continue with your Path Mapper examples at some point as the info in the link has been very helpful.  The subject has been much easier to understand via your detailed examples being embedded in a single .ghx file.

 

Thanks.

 

Chris

Thanks Chris,

I do hope to continue it in the very near future. Also I was toying with the idea of putting together some ghx files for each tab. Attached is a start, what do you think?

 

Attachments:

I had a look at the post and in the forum. The logic behind the data organisation makes sense. I was having problems understanding the syntax

{A...etc}.

 

Two questions: Why doesn't it work if it's just {A;B;C;D;E} > {A;B;C;D}, without repeating the line?

 

I see it deletes all the branches with only 4 paths, so you have to specify all the possibilities (branches with levels A to E, and A to D), but not sure why A to D isn't included when A to E is specified?

 

Second question, which is slightly off topic, is why did the curve-line intersection lose the path structure? Both trees had 38 branches.. I've uploaded a screenshot. Just to understand the way it works a bit better..

 

Thanks for your (amazingly quick!) help :)

Attachments:

Why doesn't it work if it's just {A;B;C;D;E} > {A;B;C;D}, without repeating the line?

The Path mapper will ignore a structure that it doesn't match. This enables you to treat each one separately.

For example.

 If you have two lists of points.

   List A            List B

{0;0;0}(0)    {0;0}(0)

{0;0;1}(0)    {0;1}(0)

                   {0;2}(0)

                   {0;3}(0)

                   {0;4}(0)

And you want to merge the two lists so that the two points in list A are the end points.

Merge Lists Results:

{0;0}(0)

{0;0;0}(0)

{0;0;1}(0)

{0;1}(0)

{0;2}(0)

{0;3}(0)

{0;4}(0)

Because of their path structures the order is wrong from a simple merge so Flattening now is out of the question.

Path Mapper

{A;B}    --> {A;B+1}

{A;B;C} --> {A;C*6}

---------------------

Results:

{0;0}    --> {0;0+1} = {0;1}

{0;1}    --> {0;1+1} = {0;2}

{0;2}    --> {0;2+1} = {0;3}

{0;3}    --> {0;3+1} = {0;4}

{0;4}    --> {0;4+1} = {0;5}

{0;0;0} --> {0;0*6} = {0;0}

{0;0;1} --> {0;1*6} = {0;6}

Now with the Path Structures similar when they are re-ordered the results will have the two points of list A as the end points. 

Question 2

why did the curve-line intersection lose the path structure? Both trees had 38 branches.

Both trees had 38 Paths but Tree A had more Items, 147 compared to 38 in Tree B.

So you get this happening:

{0;0;0;0;0;0}(0) compared to {0;0;0;0}(0) results: Null {0;0;0;0;0;0}(0)

                                                             Base result paths on longest

{0;0;1;0;0;0}(0) compared to {0;0;0;1}(0) results: Null {0;0;1;0;0;0}(0)

{0;0;2;0;0;0}(0) compared to {0;0;0;2}(0) results: Yes {0;0;2;0;0;0;0}(0)

                                                            Add a branch to contain result

{0;0;3;0;0;0}(0) compared to {0;0;0;3}(0) results: Yes {0;0;3;0;0;0;0}(0)

{0;0;3;0;0;0}(1) compared to {0;0;0;3}(0) results: No   {0;0;3;0;0;0;1}(0)

{0;0;4;0;0;0}(0) compared to {0;0;0;4}(0) results: Yes {0;0;4;0;0;0;0}(0)

{0;0;4;0;0;0}(1) compared to {0;0;0;4}(0) results: Yes {0;0;4;0;0;0;1}(0)

{0;0;5;0;0;0}(0) compared to {0;0;0;5}(0) results: Yes {0;0;5;0;0;0;0}(0)

{0;0;5;0;0;0}(1) compared to {0;0;0;5}(0) results: Yes {0;0;5;0;0;0;1}(0)

{0;0;5;0;0;0}(2) compared to {0;0;0;5}(0) results: Yes {0;0;5;0;0;0;2}(0)

...... etc

 

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service