as the title says I use the above method to get intersection points with the bodies in my model. What confuses me is the number of intersections found. My input model is essentially a box made of four boards. Sending the ray in direction (0, 0, 1) I expect to get 4 intersections with 2 bodies. What I get is 84 intersections. Drawing them in a sketch shows 6 points in total, of which 2 are on the models bounding box while the remaining 4 points are where I expected them.
The question is now, what is the reason that there are so many more intersections? Internally the 3d model is represented by faces, edges and vertices, so the ray may intersect more times. But I guess there must be a more detailled explanation.
My parameters are:
double radius = 1;
int hitcount = swModelDocExt.RayIntersections(bodies.ToArray(), (object)rayVectorOrigins, (object)rayVectorDirections, (int)(swRayPtsOpts_e.swRayPtsOptsTOPOLS| swRayPtsOpts_e.swRayPtsOptsENTRY_EXIT | swRayPtsOpts_e.swRayPtsOptsNORMALS), (double)radius, (double)1, true);
Thanks a lot.