I am looking for a polygon merge library.
Polygons are made up of floating points.
Does anyone know of a merge library that supports floating point?
Browse for 3 days
Related
We need a tool to compute the distance between two triangulated surface meshes. And we are only allowed to use the CGAL to solve the problem.
I only found the API computing the distance from a point to a surface in AABB tree package, and some relevant APIs in Surface_mesh_shortest_path package. But I still can't fix my problem. Is there any tool in CGAL could fix my problem? Thanks!
You posted that as an issue and we converted it into a discussion, and told you that there is the Hausdorff distance function in the Polygon Mesh Processing package. You did not react, so what is wrong about this answer?
I'm trying to use Polygonal Surface Reconstruction with building point cloud to create simplified building models.
I did first tests with this CGAL code example and got first promising results.
As an example, I used this point cloud with vertex normals correctly oriented and got the following result from PSR. Some faces are clearly inverted (dark faces with normals pointing inside the watertight mesh and therefore not visible).
I was wondering if there a way to fix this face orientation error. I've noticed orientation methods on Polygon mesh but I don't really know to apply them to the resulting PSR surface mesh. As far as logic is concerned making normal point outwards should not be too complicated I guess.
Thanks in advance for any help
You can use the function reverse_face_orientations in the Polygon mesh processing package.
Note that this package has several functions that can help you to correct/modify your mesh.
I have 3 sets of point cloud that represent one surface. I want to use these point clouds to construct triangular mesh, then use the mesh to represent the surface. Each set of point cloud is collected in different ways so their representation to this surface are different. For example, some sets can represent the surface with smaller "error". My questions are:
(1) What's the best way to evaluate such mesh-to-surface "error"?
(2) Is there a mature/reliable way to convert point cloud to triangular mesh? I found some software doing this but most requests extensive manual adjustment.
(3) After the conversion I get three meshes. I want to use a fourth mesh, namely Mesh4, to "fit" the three meshes, and get an "average" mesh of the three. Then I can use this Mesh4 as a representation of the underlying surface. How can I do/call this "mesh to mesh" fitting? Is it a mature technique?
Thank you very much for your time!
Please find below my answers for point 1 and 2:
as a metric for mesh-to-surface error you can use Hausdorff distance. For example, you could use Libigl to compare two meshes.
To obtain a mesh from a point cloud, have a look at PCL
Since CGAL 4.3, Arr_polyline_traits_2 has the ability to reverse the direction of X_monotone_curves. Does this mean I can break up a Polyline into X_montone_curves to generate a General_Polygon_2?
In the book CGAL Arragements and their applications. I've read that you needed to use Segments, not Polylines. Is this still the case? Is the book is out of date?
While the book provides information that does not exist in the manual, it is already a bit out of date, at least with respect to polylines, and will get even more so when CGAL 4.7 comes out.
With CGAL 4.6 you can create a general polygon the boundary of which comprises x-monotone polylines. This is possible due to the flexibility you mention, that is, a polyline can be directed from left to right or vise versa
With CGAL 4.7, the next coming release, you will be able create a general polygon the boundary of which comprises x-monotone polycurve, which are piecewise curves that are not necessarily linear, such as conic arcs, circular arcs, Bezier curves, line segments, or even other polycurves.
I have a set of points in 3D that lie on a surface and I also have the normals at every point.
I would like to generate a surface triangulation with this information. In addition I could tell the algorithm to use what points lie on the boundary if that is needed.
So, I have quite a bit of information:
* points
* normals
* boundary
How do I triangulate a surface with this information using vtk?
A surface reconstruction algorithm is like using a bomb for this problem since I have all this information that I would like to use. This information comes from a simulation so I know the surface exists and that is quite smooth.
I would like the answer to be cast in terms of either what vtk function to use and if available (and that would be great) examples using this function.
Thank you so much in advance.
You can use the vtkSurfaceReconstruction filter to create a surface from a set of 3D points.
You could try the point cloud library
Point Cloud Library
Just the 3D points would be good enough. Since you know that your surface is smooth, you can perform a Delaunay triangulation of the points (vtkDelaunay3D) and apply a subdivision filter for smoothening (vtkButterflySubdivisionFilter).
Delaunay3D triangulation