Tim, I hadn't tried ortho lines before; I was testing on slanted lines. I tried what you said (6 horizontal lines drawn with ortho on) and that worked in Bricscad. It also worked with vertical lines. And it worked when I drew one horizontal line and copied it 5 times.
But when I rotated the 6 lines to an arbitrary angle, or when I drew one slanted line and copied it 5 times, then it didn't work on the full 6, only on 4 of them.
After saving a file with 2 copies of the 6 horizontal lines, then it only worked on one of the copies. With the other copy, it would only work on 4 of them, even though they were horizontal!
It got much weirder after that, as I tried to find a pattern -- copying the sets of lines, saving new files and re-opening them, etc. I tried it for probably 2 hours, with results far too complex to describe. I even found it working on 6 slanted lines in many cases. I kept thinking I'd found the pattern, but then the next test disproved it. At one point I thought it was working on 4 or 6 lines but not on 5, but that pattern didn't hold up consistently. I tried lincreasing the tolerance, all the way up to 0.1, and I tried adding that tolerance to the tests for endpoint matching, but that didn't seem to change anything.
In the attached file, the 6 sets of 6 lines are all copies of the same set. The original set is at the lower left. Every time I open this file, the routine works on 5 of the sets, but not on the horizontal set at the lower right. When I try it on the jumble of lines at the far right, nothing happens. If I just select the 5 slanted lines at the bottom of the jumble, only 2 of the lines get consolidated, leaving 4 lines. Then selecting those 4 lines works. But with the 6 horizontals at the lower right, nothing gets converted when I select all 6. If I select 4 of them, that works, and then I can select it with the other 2 and that works.
Is this what you meant about dragging you down into the depth of hell?
--Anthony