add self intersection check
add thickness and sharp checks