Bug fixes for concave foundation shapes.
Merge branch 'develop'