Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Joining Faces for any Mesh - What's the Most Fitting Data Structure?
Chronological Thread
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Joining Faces for any Mesh - What's the Most Fitting Data Structure?
- Date: Fri, 28 Feb 2020 10:49:56 +0100
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:HlbBDBbhxzBmHQItZO7uSpL/LSx+4OfEezUN459isYplN5qZpsy/bR7h7PlgxGXEQZ/co6odzbaP7+axCSdYvN6oizMrTt9lb1c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUhrwOhBoKevrB4Xck9q41/yo+53Ufg5EmCexbal9IRmrogjdrM0bjIhtJqotyhbCv2dFdflRyW50Kl2fmArx6N2t95B56SRQvPwh989EUarkeqkzUKJVAjc7PW0r/cPnrRbMQxeB6XsaSWUWjwFHAxPZ4xHgX5f+qTX1u+xg0ySHJ8L2TLQ0WTO/76d3TRLjlSkKOyIl/GzRl8d9ir9QrhC8qBxl24PafZ+bNPR+cK3ec90VS2VOUcRNWCJOGY68c4gCAvAdMepEoYTwpV0Dpga+Cwm2A+PvzydFinHr06IkyOsuCxrG3BAhH90QtnTfsdP7NKAIUeC0y6nI0SjIY/dX1zjj74jIdw4uoe2WXbNwccTe01UgFx/CjlWKqY3pOj2Z3fkKvmiA6+pgUvivi28gqwFtuDSvw8Msh5LGhoIQ0F/E9CF5zJwpKt2/TU52eNipG4ZeuSGdMot5WMIiQ2dwtSkmxb0Jo5q7cDINyJQ9yB7Tc/qHfJKT7R34UOaePy10i25ieLK6nxqy8E6gyvf9VsauylpKoDBFn9/RvX4Ozxze8taLRud580u72juC1xrf5vxaLU03j6bWKp4szqYumpUJrUjPAyr7l1vqgKCMc0go5PSk5/nib7jpuJOTKZN4hwT/P6sylMyyAuE1PwgNUmSG5eix0b/u/UP3QLVEi/A5j7XWvZPUKMkdu6W3GRVa0pw55Ba6Fzqm0MoXnX0ALF9dfRKIlYnpO1XXLPH2CPeznk2gkDlqyv3GJLHhDZLNLn/MkLflY7lx8VJTyA02zdxH5pJUDK8OIO7rV0PvqNDVCgU1Pg+0zur9FdlxyIATVXiOD6KZKK/StEWH5uMrI+mCfo8VvzP9JuA+5/7qin85g14dfa613ZcNbXC4Gu9rI0qcYXX2g9cBFX0GsRY5TOzvkFGCSyJcZ26uX6Ig4TE2EJ6pDYjZSYCpmbCOwSa7HoZKaWBbEVCMCmzld56EWvcJcCKdONVtkj0CVbi7So8uzwuitAHgy+kvE+zP5ydNtY7/zMMnoKrIhBQq/Hp1Cd6c2ieDVSZvj2YQTng32q545kdyw1PG3aljiOFDDo9u4ehUWDs3JYKJz/BmE8ugHUXab9KRQRCnRM+nCHc/VJUq0toWagF8HdulyRvM1i7vD74OnKGQH88I9ffX0HH1Ysp80H3bz7IJjl88Q8IJO3f1qLR48l2ZPIPDml6FlqusPYAbxi/K6C/D4meJuUxESh9eWK7ZWmoOJwGe+c/94VnDSKPoDLAPPQ5IyMrEIaxPPI66xW5aTevubYyNK1m6nH29UE7Rl+G8KbHycmBY5x3zTU0NkgQd53GDbFFsCSKoomaYBztrRwu2PhHctNJmoXb+dXcaigGHa0o7iuiw8x8RwOOZErYdgO9CtyAmpDF5Wl262oCOUobSl09aZKxZJOgFzhJfz2uA7l5yO5WhK+ZpgVtMKwk=
On 2/28/20 10:34 AM, Marc Alexa wrote:
Dear Sebastien,
your last paragraph sounds like you had code for triangulating planar 3D
polygons. If you have a constrained Delaunay triangulation for planar
polygons in 3D avoiding the projection into the plane I think this would be
very useful addition to CGAL. And I would be interested in the code in any
case.
That's indeed the case and when I find time I will integrate it into
CGAL. But for now the code is not clean enough to be publicly
distributed and I want to know with who I'm sharing it.
Best,
Sebastien.
Best,
Marc
On 26. Feb 2020, at 13:31, Sebastien Loriot (GeometryFactory)
<>
wrote:
In such a case the best way to proceed is to identify the set of faces
that defines an almost coplanar patch of faces and retriangulate it
directly.
You can achieve this by first find a plane for the fitting of the
patch boundary [1], then project the patch boundary points in 2D [2]
while keeping the relationship with the input vertices [3]. Then You can
triangulate that polygon [4], remove the patch faces [5] from the mesh
and refit the new one extracted from the 2D triangulation [6].
For the projection step you should use a kernel with exact
constructions such as CGAL::Exact_predicates_inexact_constructions_kernel.
More precisely,
the Plane_3 should be from that Kernel and input points provided to
the to_2d() member function can be converted on the fly using
Cartesian_converter [7].
I have a more complicated version of that code that does not use any explicit
projection but it is not yet ready to be publicly distributed.
If you contact me in private and can share your affiliation and some
details of your usage scenario, we'll see how we can get you a copy.
Best regards,
Sebastien.
[1]
https://doc.cgal.org/latest/Principal_component_analysis/index.html#Chapter_Principal_Component_Analysis
[2]
https://doc.cgal.org/latest/Kernel_23/classCGAL_1_1Plane__3.html#a24c55e9e8c0250c70f377cba0d66f330
[3]
https://doc.cgal.org/latest/Triangulation_2/Triangulation_2_2info_insert_with_pair_iterator_2_8cpp-example.html
[4]
https://doc.cgal.org/latest/Triangulation_2/Triangulation_2_2polygon_triangulation_8cpp-example.html
[5]
https://doc.cgal.org/latest/BGL/group__PkgBGLEulerOperations.html#gacfae7ff8e782da55b941e4487e86c738
[6]
https://doc.cgal.org/latest/BGL/group__PkgBGLEulerOperations.html#gaa386d0cdef3b5d6ef43d6b503392dbcd
[7]
https://doc.cgal.org/latest/Kernel_23/classCGAL_1_1Cartesian__converter.html
On 2/24/20 8:03 PM, one_eyed_cat wrote:
Hello everyone,
I would like to reduce a model's complexity as much as possible by merging
adjacent, (nearly for an ε) coplanar faces. The model's surfaces can be
closed or contain holes. Currently. I am using a Polyhedron with plane
equations (like here
https://doc.cgal.org/latest/Polyhedron/Polyhedron_2polyhedron_prog_planes_8cpp-example.html
<https://doc.cgal.org/latest/Polyhedron/Polyhedron_2polyhedron_prog_planes_8cpp-example.html>
), iteratively iterating the halfedges and calling `join_facet`when needed
until there's nothing left to merge. However, I encounter problems like
antennas for more than one overlapping edge for adjacent facets or
overlapping edges in the same facet, ending up trying to merge with itself
in the merging process which makes me doubt my approach (examples appened).
I get the feeling I would have to consider a lot of factors and edge cases
if I am staying with `join_facet`. So I wonder if Polyhedron is really the
right class to use regarding the joining of any faces and not having exactly
coplanar surfaces.
If you could help a newcomer out with your experience, that would make my
day :)
Best regards
<http://cgal-discuss.949826.n4.nabble.com/file/t376194/resulting_antenna.jpg>
<http://cgal-discuss.949826.n4.nabble.com/file/t376194/overlapping.png>
--
Sent from: http://cgal-discuss.949826.n4.nabble.com/
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
- [cgal-discuss] Joining Faces for any Mesh - What's the Most Fitting Data Structure?, one_eyed_cat, 02/24/2020
- Re: [cgal-discuss] Joining Faces for any Mesh - What's the Most Fitting Data Structure?, Sebastien Loriot (GeometryFactory), 02/26/2020
- Re: [cgal-discuss] Joining Faces for any Mesh - What's the Most Fitting Data Structure?, Marc Alexa, 02/28/2020
- Re: [cgal-discuss] Joining Faces for any Mesh - What's the Most Fitting Data Structure?, Sebastien Loriot (GeometryFactory), 02/28/2020
- Re: [cgal-discuss] Joining Faces for any Mesh - What's the Most Fitting Data Structure?, Marc Alexa, 02/28/2020
- Re: [cgal-discuss] Joining Faces for any Mesh - What's the Most Fitting Data Structure?, Sebastien Loriot (GeometryFactory), 02/26/2020
Archive powered by MHonArc 2.6.18.