Having trouble with sweep accuracy in general

Hi,
I am having a bit of a problem with ‘sweep2’. I have tried to prepare the two rail curves as meticulously as I can, using ‘setpt’ to force all curve points to the required height. Zero for bottom rail, and 10 for the top. When I ‘sweep2’ and attempt to cap the resulting polysurface, only the bottom is capped. Error is ‘one attempted object is still open’. Now, I only actually want the bottom to be capped, but I need to know that the top is planar so that I can mirror, extrude it, etc. If I carry on as it is now, I end up with gaps between surfaces. Can anyone tell me how I can track down where the problem is? I suspect sweep2 has altered the position of some points but perhaps something else. Also, how do I ensure that the exact height between the rails is actually maintained? Do I need more sweep objects (lines in this case)? With this surface it should be exactly 10mm all round.
Thanks,
Alan

sweep issue surface.3dm (501.5 KB)

Well, you didn’t succeed. At least one of your points is not at 10 mm.

You don’t need to individually set each point. You can just select the whole curve and use setpt on that. Using Setpt on the whole curve is equivalent to using setpt on all the points at once.

One way to find out where the curve is not planar would be to use setpt on the curve with copy=yes and then use crvdeviation to find out where its not planar.

OK, I got it to cap by examining closely the areas circled. I had used ‘setpt’ on the entire curves but missed one of the hard corners (Although no idea why it went out slightly…). All OK now.