Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] clean a polyhedron

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] clean a polyhedron


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] clean a polyhedron
  • Date: Mon, 24 Aug 2020 08:50:15 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:ikVabhb0+Kthu1Y4a2lIwer/LSx+4OfEezUN459isYplN5qZps27bR7h7PlgxGXEQZ/co6odzbaP7ea5ADNLsc3JmUtBWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYdFRrlKAV6OPn+FJLMgMSrzeCy/IDYbxlViDanbr5+MRS7oR/MusULg4ZuJaU8xxXUqXZUZupawn9lK0iOlBjm/Mew+5Bj8yVUu/0/8sNLTLv3caclQ7FGFToqK2866tHluhnFVguP+2ATUn4KnRpSAgjK9w/1U5HsuSbnrOV92S2aPcrrTbAoXDmp8qlmRAP0hCoBKjU09nzchM5tg6JBuB+vugJxw4DUbo+WOvRxcKzSctEGSmRORctRSy9MD5mgY4cTAecMP+BVpJT9qVsUqhu+ABGhCO3yxDBWnXD5x7Y60/ggEQ7Y2gwrAtQAsHPOrNX0M6cSTf2+wK3JwzrdaPNW3Cny6JTSchEhof+DR65/cdbWyUk1FwLJi1ucopHiMjOO0uQNtHKb7+tnVeKzkWInrgVxryOgxscpkIbJh4YVxkrY+iV+xYY4PNu1Q1N0btC4CpVfrT2aN5doTcM4RWFloCQ3xLMYtZC1cyUHx4gqyhzRZvKHbYSF4gzvWeWNLTp2mX5oeq+yigq9/0W91uHwStW53VZXoydEj9TBtXIA2hjV58OaRPV9+UKh1iyO1wDV8uxLPU80mrDfK5I7xb4wjJUTvVzCHi/wgkX2jbWZel8q+uiy7ensf7bopoeEOoNqlg3zNr4il8+/DOgiLwQCQWuW9f692bDi5UH1Xq9FguErnqTcrp/WOd4Uq6unDwNJz4ou7hiyAC243NgEmHQLMU9KdRGZg4XsOVzBPu30APi6jlmskzpmyevJM7j7DZnRM3TOk7Hsdqtn5UFG0go819Vf6opUCr4fJPLzXVf8tNnCAR84Nwy42ujmCNBg2o8HV2KCA66UPLndsV+P4eIvLO2Ma5EPtDnhLPgl4ubijX4/mVADYamkxYUbZGy8E/h8IEiUYWDgjsofHWoJpAYzTe3nhEWHUTFJZnayW6w85is8CIKjFYrDXYStgLub3Ce6GZ1WenpKClWIEXrzeIWEXu0DaCOWIsN7jjMEUr2hR5c71R6yrA/616ZnLu3M9yIEupLsztx16/TOmhEz7jx7E9md03qWT2xvhWMJRzo23LhlrkBny1eD17J4g/1CGtBJ6fNJSFRyCJjH0uYvC8zuQhmTOZCSWVO+S5OnByswR5Q/2ZgVckNlEpKjiB7EmCGlCrtQm72QD4Ev6fHh2WPsLfpw22qT1LU9l0J0BYxUJGi+j+h+8RLSDsjHiQKChqOyfOMd2iDKs2yMxG7LsEBDWxNrSvb5WiUUaULS6Nj4/UjfVKSGCLI9MwIHx9TRBLFNb4ijtlhMTez/OdnYK0a2gWa3GV7I6b6LaYf2YXQz1S7BD1IV0kpbqW2CMhI/ATvnpmb2AzlnFFapaETpp7ot4EinR1M5mlnZJ3Zq0KC4r0ZM1K6sDsgL17dBgx8P7jB9HVKzxdXTUoPSqA9ofaEaatQ4sg4eiDDp8jdlN5nlFJhMw14TdwMt4hHr3hRzT5pFyI0k8i1sww11JqaVllhGcmHAhMyiCvjsMmD3uSuXRevOwFiHiYSZ/64O7LIzrFCx5Aw=



On 8/20/20 8:53 AM, Antoine Lavenant wrote:
Thanks for answer me.

I'm using the remove_almost_degenerate_faces() function.

First of all, i needed to add a few times CGAL::to_double( ... ) in CGAL code
in order to compile my code. Maybe because i'm using an exact kernel ?

Indeed, I guess this non-documented function was not tested with an exact kernel. Feel free to open a PR to submit your patch.

I'm moving the cap_threshold and collapse_length_threshold parameters. And
the number of almost degenerate triangles decreases. that's great ! Thanks
for that.

When i move the needle_threshold from 1., the global shape of my polyhedron
changes too much. Is it normal ? For now, i will not use it.


the threshold is a bound on the largest angle in the triangle, expressed as a cosinus. If you lower too must the bounds, many triangles will be
detected as to be removed.

Best,

Sebastien.


Thanks again,
Antoine

Antoine LAVENANT
IGN / SD
+33 1 43 98 80 00 - Poste : 76 69
E-mail :

________________________________________
De : [] de la part de
"Sebastien Loriot (GeometryFactory)" []
Envoyé : mardi 18 août 2020 18:10
À :
Objet : Re: [cgal-discuss] clean a polyhedron

You can either directly isotropically remesh the modified region like in
this example:
https://doc.cgal.org/latest/Polygon_mesh_processing/#title21

or you can use the non-documented function:
remove_almost_degenerate_faces() defined in
CGAL/Polygon_mesh_processing/repair_degeneracies.h

also on the set of selected faces.

The first option is better is you want to keep the shape of the
intersection polyline but is not really atomic. The second option
is atomic but it would require a first pass on the intersection edges
if you want to preserve the intersection curve shape.

Best,

Sebastien.


On 8/18/20 1:06 PM, Antoine Lavenant wrote:
Hi,

After some boolean operations, a triangulated polyhedron may have small
triangles.

I'd like to know if there is an easy way to clean it, by merging closed
vertex by exemple ?

Thanks,
Antoine

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss






Archive powered by MHonArc 2.6.19+.

Top of Page