The function insert_point inserts a given point into a given arrangement. It uses a given point-location object to locate the given point in the given arrangement. If the point conincides with an existing vertex, there is nothing left to do; if it lies on an edge, the edge is split at the point. Otherwise, the point is contained inside a face, and is inserted as an isolated vertex inside this face. By default, the function uses the ``walk along line'' point-location strategy - namely, an instance of the class Arr_walk_along_line_point_location<Arrangement_2<Traits,Dcel> >. In either case, the function returns a handle for the vertex associated with the point.

#include <CGAL/Arrangement_2.h>

template<typename Traits, typename Dcel, typename PointLocation>
typename Arrangement_2<Traits,Dcel>::Vertex_handle
insert_point ( Arrangement_2<Traits,Dcel>& arr,
typename Traits::Point_2 p,
PointLocation pl = walk_pl)


If provided, pl must be attached to the given arrangement arr.