Grasshopper

algorithmic modeling for Rhino

Intersection Events of Two Identical but Offset Curves

I don't know whether it is simple, but I simply fail to write/build a solution that is rock solid. For two identical, but offset curves intersecting each other I just want to keep the selected/green points. Right now I use something like "if abs(tA-tB) < max_t than keep point". But no matter how large max_t is there are always curves/distances for which this approach doesn't work...

Views: 1020

Replies to This Discussion

It seems to me the ones you want to keep are the ones where the T parameters on each curve will be relatively close to each other, while the ones you want to discard will have comparatively larger T value deltas between tA and tB. Try this:

ah on second read I see this is exactly the approach you were trying to begin with. Can you show some examples where this approach is failing?

maybe a tangent vector angle comparison tested against a threshold would work?

Hi Marcus, interesting question, but I think you meant a moved (translated) copy of the curve instead of an offset curve. It turns out to be quite challenging indeed... Here's my (not very fail-safe) attempt.

(Too bad I can't understand Python yet, your script seems to work okay too. Somehow I get strange results when I try your screenshot method (see second attached image))

Attachments:

That's cool Marcus.
But I'm wondering for what reason you need to find these points.
Couldn't you just create a loft surface between the curves to get the pen stroke effect? (Surface will flip when direction changes.) Or even just extrude the one curve in wanted direction?


Okay, that's a valid reason too:)
I'm confused too about what we're doing/aiming for.
In the image you attached just now, it seems you are rotating the pen (the stroke end lines aren't parallel), I thought you didn't want that.
Could you upload the definition (including some curves you want to work with) in order to clear the confusion please?
I've attached what I thought we were doing. (Oh man~)

Ehhhh I've attached...

Attachments:

you're getting different results doing that than using the tA and tB straight out of the single component!? seems like a serious bug...

Doesn't your version do the same as the mine which uses only one ccx? What am I missing?

 Important elegant work, yours lately, thanks fighter, literally "drawing" distinctions.

"Draw a distinction. Call it the first distinction." - G.Spencer-Brown (The Laws of Form, 1969)

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service