Grasshopper

algorithmic modeling for Rhino

Reffering Intersection points to Intersecting Curves

Hi everybody,

i am trying to refference intersection points to the curves which form the intersection.

sounds simple but:

the intersection points are created in rhino.
a can be seen in the definition, i use the Curve CP component to create the Closest Point from every intersection point to every curve.
in my first version i than check the Equality of these Closest Points to the original Rhino intersection points.
than i use this as a Cull Patern for deleting the list of Closest Points.

the second version isn´t much more exciting, i just changed the equality test into the question if the distance from the intersection point to the closest point equals 0.

so actually my output should be the same points as my rhino input point, with the (important) difference that they have the correct paths (meaning those of the grafted input curves).
as every intersection point "belongs" to two curves, every point should appear twice in this output list - which is what i want.
this doesn´t work however.
as you can see in the posted rhino-file and Grasshopper definition, i should get 46 points as output and i´m getting 43.

i a third version i tried to tackle this problem by using intersection points created in grasshopper rather than the input curves from rhino. that doens´t work eather.

the thing is, i had this working a couple of months ago, so yesterday i tried the old grasshopper version i used back than. didn´t help...

i´ve been trying to solve this for days now, so i would be really thankfull for every tip or solution proposition from you!

thanks!

thomas pearce

Views: 476

Attachments:

Replies to This Discussion

Hi Thomas,

Instead of checking for equality (D=0) try checking if D is smaller than... let's say 0.001. Should work.
Thanks Jacek!
It´s working now...
Is there an explanation for this? as I unterstand it, this means the equality component isn´t working like it should...?
thomas
The equality component is working fine. The problem is that some of the numbers GH displays as "0.0" are in fact a tiny little bit larger... in your case 2.2737367544323206E-13 for example.

Read David's detailed explanation of this issue here.
okay, i understand.
thanks again!
thomas

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service