Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Surface mesh cannot be smoothed after removing faces

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Surface mesh cannot be smoothed after removing faces


Chronological Thread 
  • From: Maxime Gimeno <>
  • To:
  • Subject: Re: [cgal-discuss] Surface mesh cannot be smoothed after removing faces
  • Date: Wed, 15 Jul 2020 10:17:35 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:jLlg9RJYBGmrg335r9mcpTZWNBhigK39O0sv0rFitYgXKv7/rarrMEGX3/hxlliBBdydt6sazbGP+Pm5AyQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTagYL5+Nhu7oRjeusULnIduNLs6xwfUrHdPZ+lY335jK0iJnxb76Mew/Zpj/DpVtvk86cNOUrj0crohQ7BAAzsoL2465MvwtRneVgSP/WcTUn8XkhVTHQfI6gzxU4rrvSv7sup93zSaPdHzQLspVzmu87tnRRn1gyoBKjU38nzYitZoga1UrhKupRxxzYDXbo+IKvRxYrjQcskGSWdbRMtdSzBND4G6YoASD+QBJ+FYr4zlqlUJtxS/CgisBObxxTRVh3H23Kg63PonEQHBwQctGNcOv27brdX0MacdT/q5zKbJzTXGcfxW3zD95ZPHchAku/6MXLZwfdDNxkkoEgPIl1OdopHqMD2JzOoCqXSb7/Z+WuK1jW4qswJ8rzety8owiITFm40Yx03a+Clnwos4OMO1RFJlbNK4EpZcqT+XOpd0T84hX21lpTo3x7IJtJC7ciYHyYgrygPZZveafYaI5RfjW/yQITd+nH9lebS/hwyz8Ue60OH8WNO03VBXpSRGitnBrm4B2wDX58SdSfZw/l2t1SiS2wzP8O1JLkE5mKzGIJA72LEwjIAcsUHbEy/2hkr2iKiWe10h+uey6uTnZqzqppiAN4Npkw3+PKsjl82lDeQ3NQgOWGeb+eCi27H54UL5R7BKguU3kqnfrp/aOdwWqrClDwJRyIou6BayAy243NgFgXULNl1IdROfg4jsIV7OIfT4Dfmlg1SrlTdm3/XGMafuA5XMK3jMjq3tfbl8605Z1gUzy9df6olbCrEEOv3zW0vxuMbEAR8+Ngy42/znB8ll1oMCRWKPBbeUP7/dsVCS4uIjOvSDZI4OuDnhNvgl/OXugGQimV4deKmpxYEYZGq5HvRgOUWZYGDjjs0PEWcQ7UIDSvf3ggiCTSJLfCT1GLkt4ykyToOgF4bKAI63x6eQ2T+yWZxQaGcBAV+FFTLkdp6PRuwXOx+UOdJrsiABUe2hV5M5zkPp8xTrzqJuaOvS4CwR85z5k8Nk4vXa0hA0+zszBMuU1ySBTnp/g3gTFAIwx711nUFt1gKDzbRgmK4fUsdC4utAFAY8L5/VieJgTMvjXxrIOdaPRlHhSdqvBXQ9T8k63sQVMHp6Tt6thxSG0yuxCKIOjJSKAoY1++TSxSvfPcF4nlPPxKgkghEJQ85CM2ru0qt25wnWCsjGkkCUkaGCeqEV3SqL/2CGmznd9HpEWRJ9BP2WFUsUYVHb+IyguhHyCoS2ALFiCTNvjNaYI/ITONLshFRCAvzkPYaGOj/jqyKLHR+Ng4i0Qs/qdmEahniPDUEFl0UU4S/DO1RgQCimpG3aAXplEle9Oxq9o9k7k2uySwoP9y/PakRg07Sv/RtM3K6TTvoS2vQPvyJz8jg=

Hello,
From what I see, removing faces creates some non-manifold vertices. It usually means that Polygon Mesh Processing algorithms won't work.
For some reason I could not repair the mesh after the faces removal, but replacing your function with `experimental::remove_self_intersections()` worked fine. 

Le mar. 14 juil. 2020 à 03:36, Yaoyu Hu <> a écrit :
Hi Everyone, 

I am new to CGAL and I am running into an issue when I am trying to smooth a surface mesh which I just performed a face removal.

The surface mesh is loaded from a file as a CGAL::Surface_mesh object. The original mesh has some defects such as small dangling faces and self-intersected faces. I decided to deal with the self-interactions first. I collected all the self-intersections by using CGAL::Polygon_mesh_processing::self_intersections() function. And I insert the face descriptors into an std::set. Then I loop over all the face descriptors saved in the std::set and do a remove_face(). After that, a call to collect_garbage() is issued on the Surface_mesh object. 

So far so good. However, when I try to continue performing other operations on the Surface_mesh object, I get an exception from CGAL. The operation I'd like to do is a smoothing by CGAL::Polygon_mesh_processing::smooth_mesh(). The exception I got is as follows:

=== Terminal output begins. ===
terminate called after throwing an instance of 'CGAL::Assertion_exception'
  what():  CGAL ERROR: assertion violation!
Expr: _idx < data_.size()
File: /path/to/cgal/Surface_mesh/include/CGAL/Surface_mesh/Properties.h
Line: 195
=== Terminal output ends. ===

I am using Ubuntu 18.04 and CGAL 5.0.2 cloned from the Github repo.

You could find the sample code and the original mesh as the attachments.

My questions are 
(1) What is the correct procedure to remove faces from a Surface_mesh object and make the downstream process works correctly? I also tried Euler operations but got no luck. There will be the same exception.
(2) In the original mesh, there are som small faces dangling around the top and bottom borders. How can I robustly remove those dangling faces? I tried to use face area to do thresholding on all the faces. It sort of works but later I still get the above exceptions in the smoothing section.

Regards and thank you!

Yaoyu 

--
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