Auto-repair Bad Surfaces?

I’m using Rhino 6 to fix a bad complex organic surface model.
It has over 100 bad surfaces and 1 bad polysurface.
Is there any way to automatically fix these?
I found one link in this forum that says ‘no’.
Just want to make sure.
If I have to ‘slog through’ all bad surfaces, then I need to know all the commands I can use to do it.
Can anybody direct me to a pdf or summary of all the commands that people use to fix bad surfaces?
I’m accustomed to doing this with meshes not surfaces, so any help is appreciated.

From the FAQ:

Most surfaces can be fixed by extracting the trim curve, then retrimming with that extracted curve.
Some will probably need to be point edited so they fit better before joining.

This script might get you part of the way there - it tries to untrim, extend slightly the surface edges and then re-trim the surfaces. Do a SelBadObjects, then run the script. It will tell you how many were successfully retrimmed and are now valid.

It only works on surfaces, not polysurfaces, so you will need to explode the bad polysurface. Note also that when joining the valid re-trimmed surfaces back together, they might go bad again - that means the geometry in and around the joined areas needs to be modified, as the surfaces cannot be successfully joined without becoming bad. (4.0 KB)

Oh, and of course, the question needs to be asked - why did these surfaces go bad in the first place?

Thanx for that white paper.
Also, thanx for the tip.

Thanx for the script!
Yes, you’re correct, we need to see why the surfaces are bad in the first place.
Unfortunately I can’t know that b/c this was an exported model from another CAD software.
It was so poorly made that I had to re-work about 50% of it to get the surfaces to join well. You wouldn’t believe how bad some of them terminated at multi-vertex connections!