Grasshopper

algorithmic modeling for Rhino

Hi Everyone,

while Debuging

Rhino.Geometry.Intersect.Intersection.MeshRay(BaseMesh, ray, out faceIndicies);

I got a result I didn't understand. How can a Face Index be negative? Later in the Code I get an exception when trying to retrieve the face by

BaseMesh.Faces[index]

(With "index" being -1)

Thanks

- Martin

Views: 619

Replies to This Discussion

It looks like a bug but I'm not entirely sure where yet. The index is set to -1 in the intersection event constructor but the comments in the C++ code indicate that it should always be set once an intersection is found. Can you post a mesh and a ray that give you negative indices?

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Hi David,

thank you for the quick response. Attached a mesh, which throws the error. I create a rays from the point in the global X direction.

Thanks,

Martin

Something went wrong with the upload. Here's the file.

- Martin

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service