Yes, that is the basic idea. You also have the normals available to determine facing angle, and can do occlusion testing. The SDK Triangle object provides the polygon index which can then be used to look up neighbor edges, vertices and polygons (if needed).
If you test the intersection point and triangle using barycentric coordinates, they’ll tell you which direction to travel next if the intersection is outside the triangle. That information will help you reduce/eliminate further ray-plane tests for other triangles on the mesh and other points on your slicing line/plane. The first few triangles will be the most expensive, but should get faster and faster as more triangles are eliminated from testing. Even on large meshes, this shouldn't take too long on modern hardware. If you want to get smart, you can treat it like a render and build a tree for faster lookups for more targeted ray casting, but that will likely only pay off for meshes with significant polygon counts. The priority of the picking aspect of your tool is precision and reliability, not speed. While what I suggest is quite a bit slower than supercover, it also provides better results and gives you more information to work with to make your tool more robust. Just my opinion, but I don't think a user will complain much if picking edges takes a half second vs. milliseconds, but they will definitely complain if picking misses edges or picks the wrong edges or doesn't slice the mesh exactly right. A reliable tool that gets it right the first time is always more valuable than a tool that runs in 1000x faster but produces wrong results. Just ask any artist who has to work to 3:00 am every night. Proof of that is Autodesk products. How many people are happy using Maya or 3DSMax and all their bugs? Modelers are usually extremely picky about placement and orientation of edges. If they have to reapply the tool multiple times to get them where they want them, they probably won't use the tool for long. Matt Date: Mon, 1 May 2017 09:09:18 +0300 From: Andrew Prostrelov <prostre...@gmail.com> Subject: Re: Another rip question To: "Official Softimage Users Mailing List. https://groups.google.com/forum/#!forum/xsi_list" <softimage@listproc.autodesk.com> Oh. I see, so the idea is to get both intersections. The fact that we have more than one intersection tell us that one of this intersection is on a front side and others are on a back side. So we can operate with a Z or a simple distance value. Ok. Also triangle gave us a plane and we can operate with a Plane to Plane intersection. If intersection Parameter is out of u=1, v=1 range we get out of triangle range. Well that's all variations i see so far. ------ Softimage Mailing List. To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com with "unsubscribe" in the subject, and reply to confirm.