davedjohnson Posted October 10, 2005 Share Posted October 10, 2005 I wrote a simple SOP to find and delete duplicate polygons. We run into these occasionally because of over-eager merge SOPs, but mostly because we're getting data from CATIA and other CAD programs that aren't that careful about the modeling. It works fine for what we need, but I'd appreciate any feedback from you guys as to ways I might speed it up a bit. Thanks, Dave SOP_DelDupPolys.zip Quote Link to comment Share on other sites More sharing options...
sibarrick Posted October 10, 2005 Share Posted October 10, 2005 Great thanks for sharing Dave, I was just about to do this exact same thing myself so I'll definetely take a look, you might have just saved me a heap of time. Cheers. Quote Link to comment Share on other sites More sharing options...
sibarrick Posted October 10, 2005 Share Posted October 10, 2005 Just tried this on the thing want it for and I had to fuse the geometry first before it would zap all the duplicates, so it might be worth offering that as an option. Otherwise it worked great, seemed pretty quick for what I gave it. Cheers Quote Link to comment Share on other sites More sharing options...
davedjohnson Posted October 11, 2005 Author Share Posted October 11, 2005 I don't think that you should have to fuse the points to make it work. If I take some geometry and run it through a duplicate SOP and then feed that into the DelDupPolys, it finds all the geometry the second time through. And the evaluation is checking to see if the points are in the same place, not whether the poly is using the same (fused) points. What version of Houdini did you compile it under? I was using 7 something. Dave Quote Link to comment Share on other sites More sharing options...
sibarrick Posted October 11, 2005 Share Posted October 11, 2005 Did it under H8. I could send you my test piece of geometry if you like. I put it down to an accuracy thing, if the points are within tolerance you would say the polys were dups but they won't be removed unless the points are fused. My piece of test geometry didn't come from multiple merges or copies so some small errors in point positions must have crept in. Quote Link to comment Share on other sites More sharing options...
davedjohnson Posted October 11, 2005 Author Share Posted October 11, 2005 Ah yes. It only find exact duplicates. If you want to use some tolerance, a fuse SOP seems like an easy solution. For what we want, I only want to find exact matches. If you want to make another version of the SOP to add in tolerances, it shouldn't be hard. Let me know if you do and how you do it. Dave Quote Link to comment Share on other sites More sharing options...
sibarrick Posted October 11, 2005 Share Posted October 11, 2005 Just add these lines, the first does a fuse the second removes degemerate polys int test = gdp->fastConsolidatePoints(0.001); test = gdp->cleanData(); Quote Link to comment Share on other sites More sharing options...
edward Posted October 11, 2005 Share Posted October 11, 2005 I think you guys want to make the tolerance as a parameter to the SOP right? It could default to 0 even for backwards compatibility. Quote Link to comment Share on other sites More sharing options...
sibarrick Posted October 11, 2005 Share Posted October 11, 2005 Indeed, I was just leaving that to the reader since it's fairly trivial. I was actually thinking that you would only have it as an option to toggle on if it was needed, but I guess 0 means no consolidation so that would work too. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.