bug fixes

end condition for ruled surface discretization
shape insertion