问题
With CGAL, Using any kernal, but preferably the Epeck, how can I safely merge two coplanar facets (of any degree) of a Polyhedron_3? Both facets are on the same Polyhedron_3 surface and already sharing one or more edges. The desired result is that the common edges are all removed, the two facets become a single facet, and no antennae or unconnected vertices remain after the operation. As an example, I would like to merge facets F1 and F2 shown in the diagram below, and have the edges denoted by HE1, HE2 and HE3 removed.
I want to achieve the same result as CGAL's join_facet, except that (I believe) join_facet
is only useful for joining facets which only have a single common edge. If there are more, join_facet
may create antennae, which causes subsequent operations on the polyhedron to fail.
Calculating whether the facets are coplanar is not part of the question, I can handle this myself.
The ultimate aim is to merge all facets of a triangulated polyhedron which are coplanar. I am assuming the best way to do this is to iteratively merge touching coplanar facets of the polyhedron. I will therefore also accept answers which explain alternative means to achieve the desired result.
回答1:
You can call the function join_loop if your facets have the number of edges.
来源:https://stackoverflow.com/questions/26231611/cgal-how-to-merge-two-coplanar-polyhedron-facets-with-more-than-one-common-ed