Grasshopper

algorithmic modeling for Rhino

Hi,

Could you explain what iA and iB parameters means in MCX - multiple intersection curves battery?

What is more, how to get a data tree, that shows points indexes that each curve contains, such as:

{0}

1

2

{1}

2

4

{2}

4

3

{3}

2

0

{4}

0

4

{n} - curve index

n - point index

Is it possible to do something familiar wit MCX output parameters?

Thank you.

Views: 2165

Replies to This Discussion

They are the indices of the two curves that intersect. So iA tells you which was the first curve, iB tells you which curve it intersected, tA tells you where on the first curve the intersection happened and tB where on the second curve.

--

David Rutten

david@mcneel.com

According to your explanation it goes like this:

Curve with an index of 0 intersects with curve index 2, but why then it again says that index of 0 intersects with index 2? 

Is it possible to get a data tree that shows index of a curve and then a list of intersected curves in one list?

Thank you in advance,

Petras

 Just interested why the data is repeated, such as:

0 from right list and 2 from left, then again 0 and 2. This is because it calculates intersection 0 with 2 and 2 with 0 ?

It says it twice because curve 0 intersect curve 2 two times.

For every intersection this component finds, it tells you the point, the first curve index, the second curve index, the first curve parameter and the second curve parameter.

--

David Rutten

david@mcneel.com

You can make a list of all unique intersections like this:

I'm still working on a good way to turn it into a datatree.

--

David Rutten

david@mcneel.com

Can't think of a quick way to turn it into a DataTree. Maybe someone else has a good idea. This is the long way around:

--

David Rutten

david@mcneel.com

Attachments:

Thank you very much. This data tree made my script more fast:)

It would be nice to have this data tree in the battery MCX itself.

Have a nice day:)

Dear Marcus,

I would like to ask why I have different output from David Rutten definition.

As it work not in a way I would like to. Could you help me once more?

Here the printscreen of Davids and your output:

Davids script is correct and I am using the same input curves. It works very well, as I get clean results, in the end part of the script. But somehow your script does not have equal result to David's written as 1st curve intersects with 3 curves (including the curve itself), but not all 4.

Here is the script. I am in a middle of process, but the script has no errors and it works fine.

I am just wondering if you could help me to shorten data tree script with only only python script.

Attachments:

What is more, I see that there are 5 curves in your example file. But the list shows 5th, 6th and 7th curves, while the list length is only 5, from 0 to 4 th curve.

Got it. It is quite clear and cool. David script shows different data. 

But I think, the script you made is maybe much more useful, what I am want to do:)

Thanks:)

I am just wondering if you could help me split this list of points indexes into sub-lists for getting  clean lines between intersection of separate rectangles like picture to the right. 

I made the right image with a bit tricky script, that struggles to finish other things... Maybe this requires simple sorting of points, as all points goes "clockwise" of every curve perimeter.

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