Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Infinite loop in PMP::corefine_and_compute_union since 4.14.2

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Infinite loop in PMP::corefine_and_compute_union since 4.14.2


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Infinite loop in PMP::corefine_and_compute_union since 4.14.2
  • Date: Wed, 5 Feb 2020 09:23:31 +0100
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:j2jgah8XImsdN/9uRHKM819IXTAuvvDOBiVQ1KB21+kcTK2v8tzYMVDF4r011RmVBNmdtqoP0rCM++C4ACpcuM3H6ChDOLV3FDY9wf0MmAIhBMPXQWbaF9XNKxIAIcJZSVV+9Gu6O0UGUOz3ZlnVv2HgpWVKQka3OgV6PPn6FZDPhMqrye+y54fTYwJVjzahfL9+Nhq7oRjeu8UMgYZuNqk9xgbXrndWZu9awX9kKU+Jkxvz+8u98oRv/zhMt/4k6sVNTbj0c6MkQLJCET8oKXo15MrltRnCSQuA+H4RWXgInxRLHgbI8gj0Uo/+vSXmuOV93jKaPdDtQrAvRTui9aZrRwT2hyoBKjU07XvYis10jKJcvRKhuxlyyJPabY2JKPZzeL7WcNUHTmRDQ8lRTTRMDJ6iYYsBD+QPPuhWoIfyqFQMsRSwChKhBP/sxzJSmnP6waM33uYnHArb3AIgBdUOsHHModn7KakdT/u6w7PTzTXfbvNZxzH945XOfBAmu/GMXLVwcdbMwkUrFg3KkFKQqYn7MDOJzOQMs2iV4PB8WuKzjG4nsQFwrj2hyswxjYTJnYYVylfe9SV4x4Y1Oce0SEt/YdO/H5tQsjuVN4pyQs84X25ovyM6x6QAtJWmciYKz5EnyATea/yBa4WI7RPjVPqRITdln31pYq6whxG38UWm1+byVdG03U5UoiZZltTArHMA2hzJ5sSZVPdx412t1DmN2gzL9O1LO1w4mbfeJpE/3rI/jJ8evVrfEiPrnUj7g7GaeVs49uWt5eTqYq/pqoOZOoJ7iwzzNrghl8m+DOk8MwUOUW2W9Oay1LL+8kD0RqhBgOcsnanDqp/aINwWpq6nDA9R1YYu8xO/AC2n0NQchHUGIkhFdA+eg4jnNFzDIur0Dfi4g1Srnzdrw+7JMqf9DZXKK3jPiLbhfbBj5E5A0Ac/08xT6pZOBrwCIP//QFH9uMLFAhMjPAG5wf7rCNBn2YMfXWKPDLWZMKTXsVKQ/eIvJ+6MZJUUuDb6N/gp/fvujXsilF8SeKmmx5oXaHSiEvt6JEWZZGLggs0dHmcSogo+UOvqhUWeXj5cfXmyW7sw6Sw6CIK9EYjDW5utgKea0SegHpxWY3hGBUqWHXfpcYWEQfYMZziILs9viDxXHYSmHoQu3BXruA7hwKd8NcLV/DcZvNTtzotb/erWwFsJ+DZ9FNic3mfFa2Zun2QUD38Z0ad6rFBn23mK2rR/me0ZX5QH/PdOSAY9KdjZy8R1DtnzXkTKedLfGwXuecmvHTxkFoF5+NQJeUsoQ4z/3CCG5DKjBvour5LOBJEw9fiBjX34JsI41Gyfkad90B8pRcxAMWDgjal6pVCKVtz51n6BnqPvTpwymSvE9WON122L5RgKXwt5UKGDVncaNBKP8YbJo3jaRrrrMowJdxNbwJfbeKRPY9zty15BQaW7NQ==

Does one of you mesh has a boundary?

The list of PRs that could have introduced a regression is here:
https://github.com/CGAL/cgal/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aclosed+label%3AMerged_in_4.12.2++label%3APkg%3A%3APMP+

I don't see anything suspicious. Is it deterministic?

Best,

Sebastien.



On 2/4/20 11:59 PM, Giles Puckett wrote:
Bonjour,

I have a CAD program that uses PMP to merge meshes. I moved from 4.12 to 5.0 in order to use the default visitor to keep attributes on faces through surface mesh unions. However, some previously working meshes now fail with an infinite loop. The problem also appears on 4.14.2.

The infinite loop is in Corefinement::remove_unused_polylines at face_graph_utils.h, line 1634: (in 5.0)

for(vertex_descriptor v: vertices_kept)
  {
    halfedge_descriptor h = halfedge(v, tm), start=GT::null_halfedge();

    do{
      while ( !is_border(h, tm) || is_border(opposite(h, tm), tm) ) // This while loop never exits
        h = opposite(next(h, tm), tm);
      halfedge_descriptor in = h;
      if (start==GT::null_halfedge())
        start=in;
      else
        if (start==in)
          break;
      while ( is_border(h, tm) )
        h = opposite(next(h, tm), tm);
      set_next(in, opposite(h, tm), tm);
    }
    while(true);//this loop handles non-manifold vertices
  }

One mesh is a simple convex shape, the other is the result of a previous union. All unions are done with exact predicates and constructions in the standard way for consecutive bool ops. Testing for self-intersections before and during the union reveals nothing.

Sadly, I cannot reproduce it in a simple test example program (when writing the meshes to OFF file, precision is lost, and I get self-intersections or an assertion about collinear points). I suspect there may be zero-area triangles produced by the first union.

Three questions:

Have there been any changes in corefinement, PMP or surface meshes between 4.12 and 4.14.2 that might produce this, or any known regressions?
And is there any way I can write the meshes out with sufficient accuracy to submit a simple test case?
Lastly, is there any way I can get the functionality of the example program (corefinement_mesh_union_with_attributes) to work in 4.12?

Thanks for any help and for reading on this far :-)

Giles.






Archive powered by MHonArc 2.6.18.

Top of Page