Automatic mesh generation over intersecting surfaces