Grasshopper

algorithmic modeling for Rhino

Hi! Is there an easy component that tests whether a brep is completely enclosed, intersecting, outside another brep? Assuming both are closed.

If not, what would be the steps to test that while still maintaining the structure at the end? If I deconstruct all the breps and test it vertice by vertice?

Thanks,

Tim

Views: 2018

Replies to This Discussion

Hi Tim,

there's not as far as I know. It's not good enough to only test vertices, or even just edges, you'll have to perform the expensive intersection.

The steps required are such:

  • Test for intersections. If you find any, you know they are intersecting, if there are no intersections, it's either A-inside-B, B-inside-A or they are not nested.
  • Test a point on A for inclusion in B. If it's inside, the entire brep A will be inside B.
  • Test a point on B for inclusion in A. If it's inside, the entire brep B will be inside A. If it's outside, A and B are completely disjoint.

Hey, forgot to say that works great!

Thanks for the simple logic :)

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service