SMS: Structural geology algorithms: