Is there a nifty way to select coincident faces/surfaces? I’ve tried using the Select Duplicate tool but Rhino isn’t seeing these surfaces as duplicates (it’s an imported STEP file). I can’t think of a smarter/quicker way than doing it piece by piece.
If they’re not EXACT geometrical duplicates, then Rhino will not find them with SelDup, unfortunately. There are a few ways script-wise to test for “near-dup” with varying degrees of speed/reliability, unfortunately, I only have such a script running for curves right now, but I can look into creating a simple one for surfaces.
Thanks, Mitch. I’d love to try a script at some point (I really should learn how to do them myself one of these days). No great hurry though - I went through the component and selected the surfaces manually and it actually didn’t take that long. I really just wanted to check that I wasn’t missing an obvious way of doing it.
I expected SelDup to work as the majority of the surfaces do look like exact copies (it’s an injection moulding with an over-moulded part). Not sure why it doesn’t see them as duplicates - perhaps the STEP conversion does something to them.
Well, SelDup is VERY persnickety. Imagine if you have a point object that has coordinates 0,0,0 and another one that has coordinates 0,0,1.0e-10, they will not be considered duplicates by SelDup even if the difference is way, way below file tolerances. This is the classic problem, when objects have gone through some translation process, even if they were exact duplicates to begin with, it is possible some floating-point “fuzz” got into some of the numbers along the line (it only takes one) and for Rhino it’s no longer an exact copy.
The scripted solution is to iterate through all the objects and check various criteria - that they fit in the same bounding box, have the same edge lengths, degrees, number of control points, etc. within a reasonable tolerance. All this checking can get pretty slow if you have large amounts of objects.
I assumed that the translation was probably the reason why SelDup didn’t work. Although most of the surfaces appear identical to the eye I’m sure there are variations. In fact, you can see differences in some, which I think must be due to the STEP coming from a solid modeller. It looks as if fillets have been applied to two separate parts rather than just copying the surfaces as we would in Rhino (for an over-moulded part).
I’m sure the script would be quicker than doing it manually, maybe, maybe not. I think it took about 30 minutes in this case so not too bad. It was a good opportunity to check the geometry anyway so not wasted time.
You can try this script out on your next project… Will try to find “near-dup” surfaces within a user given tolerance. Within tolerance, they need to have the same bounding box size, area, edge count, total edge length, U and V degrees (can be reversed) and one point in the middle of the surface domain… With 2000 surfaces, takes about 3 seconds to run here. With 10K, will take a minute or so. Currently checks all visible, selectable single surfaces, does not check joined polysurfaces.
Thank-you, Mitch. Much appreciated. It should be much faster than I thought - certainly faster than doing it manually. I’ll give a try as soon as I can. Cheers!
OK, if you run into errors or things you think should work but don’t (likely), let me know. You can also PM me a file sample to test if things go astray.
Here is a revised version with a bit more checking, it may be a bit slower than the first, but it should eliminate some false positives (such as a surface mirrored in place).