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: 2166

Replies to This Discussion

Dear Marcus,

I am very glad you made such an effort to develop the script. I do have kangaroo.

But the difficult part is that the script should remain its data tree, instead of flattening it.

I was working with a script for a while. I uploaded both .3dm and .gh files. The script I made works fine, but I want to optimize as much as possible. (As I want to later to combine it with processing while playing with moving objects, so the script needs to be as fast as possible). And I see that your pyhton scripts could make things much easier. The concept about the script is similar to paper sharp bending. Imagine there are bunch of polygon sheets, and when they cross, their corners bend vertically in 90 degree. Quite simple in description, but took a few days to script it. Anyway I uploaded it.

The issue I would like to ask you, if there is a possibility to script these lines without culling duplicate lines. It is the same idea of keeping data tree of points that belongs to certain curve. But in this case lines instead of points.

Here is the link to animation I made with this script:

https://vimeo.com/85115102

Best,

Petras

Attachments:

But do you have some time to script lines that have initial data tree as points do without deleting duplicate lines? Leaving the data structure, makes the output ready for further development. That would be a big help for me.

Hi Petras,

I can't help you with your project.
But here is a small contribution on keeping the data tree the same in cases of intersection points, lines from those points, and indexes:

Data tree paths correspond to the indexes of the initial rectangles (I markede them in the photo bellow).
An empty branch will be added if a certain rectangle does not intersect with the others (like in case of rectangle "4"):

Attachments:

Hi Marcus,

I think your python knowledge is quite advanced, have been beating me by a mile. I am sure you will definitively get the data trees too, once you read this topic.

Dear Marcus,

I am very grateful for your big help. I manage to do everything I need with your script. Thanks:) I saw that intersection function is also rewritten.

Could you recommend any source to start learning python?

Thanks, again. I uploaded the script that works perfectly with python battery.

Best,

Petras.

Attachments:

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service