Hi Marc,

I’m doing something related, which requires large numbers of flips (and other moves) on Delaunay Triangulations.

What I’ve done is written a class which contains a Triangulation_3 as well as other containers of cells, facets, edges, and vertices.

I use the container (i.e. a vector) of edges to determine the edge -> facet flip locations, and the container of facets to determine the facet -> edge flip locations.

I make copies of this class to perform proposed moves; the copy constructors take care of the various containers.

That gives you the triangulation and iterator (but look at Ranges, which are coming in C++20).

I’d been using Boost::optional to provide the semantics that Expected<T,E> is supposed to provide, that is, return a T or an exception E (except that option types return a T if the move succeeds or null if it fails). However, this seems to be not recommended, so I’m probably going to use simple error codes and wait for Zero overhead deterministic failures.

Dear all,

I am trying to achieve the following: given a Triangulation_3 T, enumerate all triangulations that can be reached from T by a flip. The problem is that T.flip(C) (where C is either an Edge or a Facet) changes T, so that creating other flips starting from T is cumbersome.

Concretely, I am iterating over Edges or Facets. Flipping will invalidate the iterator. But I also cannot use the iterator (which is a Face or Edge of T) on a copy of T.

One way out would be a method for generating a copy of T that also provides a handle to a given Cell in T. But I cannot see any method doing this.

Any help would be appreciated.

Thanks,

Marc

--

You are currently subscribed to cgal-discuss.

To unsubscribe or access the archives, go to

https://sympa.inria.fr/sympa/info/cgal-discuss