Grasshopper

algorithmic modeling for Rhino

Hi all, I'm a novice with grasshopper and I must be missing something about trees. The thing is I'm stuck.

I want to intersect some planes with some curves.

in one hand, I have a couple of groups of planes, each group in a branch. in the other hand, The 2 sets of curves I want to be intersected with, which are in another tree, organized in 2 branches aswell.

I want the planes of each branch of the first tree to intersect with the curves of their corresponding branch of the second tree.

    Tree 1                                                                 Tree 2
    First branch of planes        intersect with             first branch of curves
    second branch of planes    intersect  with             second branchof curves

and so on...

Note: Curves can self intersect or being cut more than once by the same plane.


I can only obtain the desired result when i do it one by one, mean, selecting each branch at a time. Can anyone help? Many thanks in advance.

Views: 1216

Attachments:

Replies to This Discussion

Hi Gunther,

I must be missing something about trees.

most people do you are in very good company.

This would be my approach:

The top version is centered around getting the points grouped in terms of which curve they are associated with and the bottom version is the other way around i.e. which plane they are associated with.

Attachments:

Hi Gunther, hi Danny,

is cross referencing yielding the wanted results here?

Attachments:

i thought that at first too. i believe Gunther only wants the first branch of the first tree with the first of the second etc.

something that got me confused.

wasn't these two supposed to give same results? (hope this is not lack of sleep hitting me)

cheers

alex

I believe the second one checks all the curves with both lists of planes. that's why there are more results.

As for the [CrossRef], the only problem imo, is the output data structure. It is just the points for each curve (each list of curves after [Pshift]) and there are no secondary branches to indicate the planes. I guess it depends on the next step of the definition...

Well that is what cross reference does too. all posible compinations of the curves with planes.

I think cross reference creates all combinations of curves in {0} with planes in {0} and curves in {1} with planes in {1} but doesn't mix different branches (it keeps the tree structure).

yes. came to my senses finally.

It does. And I agree with you about the structure which is why I tend to generate the CR by myself as I can get a handle on what comes from where a bit easier.

True,

I tried to do this starting with [CrossRef] and then rebuilding the tree and it was such a messy definition:

By the time I got around it you had already answered with a simple and to-the-point def. :)

Hmm, if you leave the planes' tree intact (don't flatten) it does give the same results. But what is the difference between ShiftPaths and TrimTree besides the sign of the integer?...

Thank you all guys. Danny, you saved my day, I'm a bit busy and overwehelmed at the moment to analyze ,understand what you did, and take the time to reply properly.

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