I'm able to get the delaunay triangulation from CGAL using the following example code
How can I extract the polygonal outline (ie, the boundary edges, which can be non-convex) that forms the edges of this 2D triangulation?
You can check is_constraint(edge) or the Constraint iterator.
Related
My 3D mesh contains T-vertices. I want to keep all vertices, but automatically subdivide triangles's edges that run through/past such a vertex.
Here's an
image showing triangles with t-vertices, and after the tessellation
that I'm looking for.
I started implementing some code but really think this must already exist.
The question is if your input mesh consist on plain triangles (in which case you can't have neighbors, because you can have several neighbors by each edge) or your mesh consist on "triangle shaped polygons".
If your input are triangles, meshlab won't solve your problem.
If you have polygons, you can use the "convert mesh into pure triangles" filter.
Does CGAL only support Constrained Delaunay Triangulation (CDT) for Planar Straight Line Graph (PSLG) now?
What about a curve boundary, like a circle or ellipse? I tried to discretize the curve boundary manually, but the element quality is not satisfactory.
Thanks
I'm using CGAL 2D Delaunay triangulation to define a terrain. I can't use the terrain class because my triangulation has constraints and they can't be used on terrain or 3D triangulations. (That's what I see so far, since there are no terrain properties or 3D triangulation classes). Due to the constraints I'm using the make_conforming_delaunay_2 function to refine the triangulation. I have a problem when using this function. Everything is compiling and running OK, but the problem is with the results:
The function is inserting some points out of any existing triangle face. Is this correct?
Since it is a terrain I need the elevation of these inserted points. Is there any way to make CGAL tell me what triangle face these inserted points are in, so that I could calculate its elevation? I expected the points only in existing triangles faces.
Is there anyway even in a 2d triangulation to use 3D points? (So that the interpolated points will come with the elevation already calculated.)
You can use the class CGAL::Projection_traits_xy_3 like in this example.
Trying to calculate the surface area of a convex hull in 3D, using CGAL. I have looked at the user manual (http://doc.cgal.org/latest/Convex_hull_3/index.html#Chapter_3D_Convex_Hulls) and have not found any material covering this. I have tried to use polygon_area_2d to calculate the area of the convex hull facets, but have not been successful. Has anybody successfully calculated the area of a 3D convex hull/any suggestions?
Using this example, you compute a triangulation of the convex hull. Them iterating over all the facets of the polyhedron, you can compute the area of each triangle and get the result.
See also this function
I have a mesh (close to polygon soup) with texture coordinates. I'd like to use CGAL for various operaitons on this mesh; most specifically the Naf_polyhedron class. I can "thicken" each triangle to make sure it's manifold and acceptable as a Naf, but I don't know how to carry the texture coordinates through the operations so they are preserved for vertices, and interpolated for cut edges.
Also, a single "point" may have multiple texture coordinates, as the texture coordinate is a function of both "face" and "point."
Are there examples or documentation for how to do this? Or does CGAL not support this in a mostly-built-in fashion?