Grasshopper

algorithmic modeling for Rhino

in a intersection brep &plane obtains duplicate curves.

I want to delete simmilar.

and I said similar because I assume they have different hash code.

how can I do it?

Im trying to override equals, but I don`t know how to implement the character to compare the object "planar curve"

by other hand I could do 

if (x1.equals(x2)) then F(x1) == F(x2).... but what could I use as x1 and x2 ?

thanks

Views: 366

Replies to This Discussion

Hi pepe,

are you supposed to get similar curves out of a brep|plane intersection?

Anyway, there is no method for testing curve equality. If the curves truly are equal, then you can check control-points, degrees and knot-vectors, but if the curves only appear similar to within some tolerance, you're going to have to actually compute the deviation.

Walk along curve A in small increments, find the closest point on curve B, measure the distance. Then repeat while walking along curve B. The largest distance measure you get will be indicative of the deviation. If the deviation is small then the curves are similar.

Another approach may be to loft the two curves (or use CreateEdgeSurface), then measure the area of the resulting loft. If the area is very small, the curves are similar. This is less typing for you, but it will most likely be slower.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

good clues !

clever.

thanks a lot!!

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