e.g. reconstruct(points, triangles, boundary_nodes) should serve the same purpose as Triangulation(points, triangles, boundary_nodes) currently does.
For reconstruct(points, triangles), this should build an unconstrained triangulation with boundary_nodes=get_vertices(get_convex_hull(points)), assuming all points are in the triangulation.
Some useful helper functions needed to get this right are:
find_missing_points: Finds the points in points that are not a vertex in triangles, so that we can get the correct convex_hull (which I don't believe currently allows you to do skip_points, so we might need to be careful here...).
find_boundary: Given (points, triangles), this will find the boundary nodes for you. This would be useful for constrained triangulations. One issue with this is that this function would need to somehow (1) find all the individual connected components of the boundaries so that we know where to put all the ghost vertices and (2) it needs to somehow sort the boundary edges found so that the individual boundary curves are correctly oriented.
Could be nice to have the option to pass segments too
e.g.
reconstruct(points, triangles, boundary_nodes)
should serve the same purpose asTriangulation(points, triangles, boundary_nodes)
currently does.For
reconstruct(points, triangles)
, this should build an unconstrained triangulation withboundary_nodes=get_vertices(get_convex_hull(points))
, assuming all points are in the triangulation.Some useful helper functions needed to get this right are:
find_missing_points
: Finds the points inpoints
that are not a vertex intriangles
, so that we can get the correctconvex_hull
(which I don't believe currently allows you to doskip_points
, so we might need to be careful here...).find_boundary
: Given(points, triangles)
, this will find the boundary nodes for you. This would be useful for constrained triangulations. One issue with this is that this function would need to somehow (1) find all the individual connected components of the boundaries so that we know where to put all the ghost vertices and (2) it needs to somehow sort the boundary edges found so that the individual boundary curves are correctly oriented.Could be nice to have the option to pass
segments
too