Grasshopper

algorithmic modeling for Rhino

Hi,

how can i get rid of the endpoints and leave only the intersection point? 

I have been trying to work with the lists and remove equal values but i got lost...

Thanks, 

Ziv

Views: 3683

Attachments:

Replies to This Discussion

The Simple answer would be to create a set of all the points and then remove the end points from it using the Set Difference Component.

However a better approach would be to only try and intersect the curves once and thus avoid intersecting them with themselves. This approach is both more efficient with processing but also you can identify which curve intersects with which curve by the resulting data structure.

The methodology is to create a list of the first four curves A,B,C,D

Then create a combination of the last four curves in four lists where each list decreases in length.

B,C,D,E

C,D,E

D,E

E

therefore you intersect A with B,C,D,E

B with C,D,E (As A and B were intersected above they don't need to be done again.)

C with D,E

D with E

and there is no need for E to be done as it appears in every list above.

Whts the expression you wrote inside C of the series?

and what is it for?

Thank's

ziv.

The List Length is 5 but I only want the series to go up to 4 so the expression is as shown in the Yellow tool tip in the image "C-1".

....

One thing I didn't show in the image is the series actually starts at 1 not 0 by default. (S=1)

The results are you want to shift the curves by 1, 2, 3 and 4 whilst the wrapping flag remains on False therefore shortening the list.

I did evrything you told me to do, i understand what you were doing with the list but i dont get th same result...

can you take alook into my file?

Thank's.

Attachments:

With corrections attached.

The first Shift component needs to be S=-1 to get the First 4 curves A,B,C,D(,E) otherwise you get (A,)B,C,D,E

And the Series component needs to start at 1.

I hope this is clearer.

Attachments:

Thank's!!!

I feel like i'm back in kindergarden counting intersections...

and about that, you mentioned erlyer that you can figur out throgh the data structure whitch curves are intersecting. 

I'm looking into the lists and and icant figure out the structure, i'ts differnet then the oreginal structure (10 items VS 11 items...).

eventually i want to create a list of curves and the number of intersections it has.

is it possible?

don't forget that when curves do not intersect there will be a null result and thus gets placed at the branch level above the other results

Hi Danny,

sorry for the delay... 

I was looking at the lists and the way that i understand it is that it shuld have had 10 values (4+3+2+1).

it seems as if i have one extra null at the first group.

do you know whrere is it coming from?

Thanks,

ziv.

I agree with your assessment. I will ask David to look in to it as there would seem to be a bug based on this. I've tried a few different orders of curves and there seems to always be an extra null value even when it produces an intersection. All misses seems to be fine and all hits seem to be fine but when you have a curve with hits and misses there is a null value for every hit.

Here's a file to demonstrate all intersection possibilities.

Attachments:

Thank's!

I Think i'm onto a salution, ill add it up as soon as i get it wokrin'...

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service