I am creating a model of a road by sweeping a cross-section along a curve. The Cross-section is perfectly horizontal, it looks something like this:

- Code: Select all
`5-----4 1-----0`

| |

3------------------------------2

Where the numbers are the vertex numbers of this polygonal NURBS curve.

The sweeping curve starts about 50 cm to the right of vertex 0 at the exact same height as vertices 0, 1, 4 and 5. This curve smoothly defines the curvature of the road and it also changes height. The last vertex in the sweeping curve is 10 meters below the first point.

When I apply the sweep, the various cross-sections of the resulting mesh are no longer horizontal! The height of vertex 0 is different from the height of vertex 5. I could understand this behaviour if the sweeping curve was twisted along it's own axis, but it isn't. The y-axis at each point is perfectly vertical.

Do you understand what I'm trying to say? If so, do you have any suggestions on how to make sure that the cross-section curve only gets rotated around the y-axis during the sweep operation?

Another thing, if I extract the u curves from the sweeped mesh, they do not line up to the original mesh!?! I would want these curves to generate the exact same mesh when using the cross-section mesh constructor on them.