Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Clip make_surface_mesh output
- Date: Fri, 11 Sep 2020 10:38:33 +0200
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:eqO3hR1mUhxLiR+FsmDT+DRfVm0co7zxezQtwd8ZsesWKfnxwZ3uMQTl6Ol3ixeRBMOHsqwC0rCK+PC5EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCe8bL9oMRm6swrcusYVjId/N6081gbHrnxUdupM2GhmP0iTnxHy5sex+J5s7SFdsO8/+sBDTKv3Yb02QaRXAzo6PW814tbrtQTYQguU+nQcSGQWnQFWDAXD8Rr3Q43+sir+tup6xSmaIcj7Rq06VDi+86tmTgLjhSEaPDA77W7XkNR9gr9FrhKvpxJxwIDab4+aO/V8YqzTcsgXRXZDU8tLSyBNHo2xYokJAuEcPehYtY79p14WoBewGAejGvjgxSVThn/q3K01zeIhGhzA0gwnBdIOsXPUrMnoP6sWUO660q7IzTDdYPNKwzf86IjGfQo9rvGQWrJwa8rQxUwhGwjYiViQsojlPzSP1uQMtGib8/BsVeeri2M8pAFxpyKgxsYoioXTmo0VzVXE+Dx/zY0oKtK2VFR1bsS4EJtMqS6aLY12T9sjTm11pSs216AKtIK0ciUL1JkqxALSZuKJfoSV4R/tVOWcLCt2iXxqe7+yhRS//Ea9x+D4WMS4zFlHoCpKnNfMsH0GyhLd6s+CSvRn/0eh3y6C2Bzc6u5eJUA4j63bK4QuwrIomZoTsFjDHi/rmErtlqOZakIk+u2w5+TheLrpvYSTN4tqhQ3kLqsuncm/DOIlOQYNR2iW4fqw2KHn8EHjQ7hHjuc6nrTHvJ3ZP8gWprK1DxdL3ok59xqzEjKr38oEkXYdKV9JZg6Lg5XsNlzAOv/0E+uzjlGynDpoxP3JIrjsD5rXIXfZlLrseKtx5kBfxQUpyN1f6ZBZB7MDLf/1R0T/rsbXDgUjPAyx2+vnCMty1ocZWW+XB6+WKqLSsVuR6uMhJumAeZYZuDj9JvQ5/fLugng5mVgSfamtw5Qbcmy3HvNjI0mBYHrshMkOEXsSswYgUODnjEeOXD1TanqoQq4w+DI2BJimAIvfXoythaaO3Ca/Hp1YfGBGDVWMHG/zd4WAXPcMciOSIsh9kjAeULihT5Qs1R6rtADgyrpnKvDY9TEftZLmzNR1/fHclQku9TxoCMSQy32CT25ukWMMXjM5waF/oVdhxVeeyqh4mOdVFcdT5vNMSgc1L4TQz+18C9DoWwLOZM2FSFi8QobuPTZkRd04x5oCYl12Bs65phHFxSujRbEPxJKRA5lhuJnR1XHqO8dwzT7i07MgiEVuAuRCMmirmrRu2QHYG4nTggTT3/KxcaMG3SnRsmKH5WWLtUBcFgV3VPOWDjgkekLKoIGhtQv5RLi0BOF/a1cT+Yu5MqJPL+bRoxBeXv66YYbRZmuwnyG7AhPanurdPrqvQH0U2WDmMGZBlgkS+XicMg1nX3WupmvfCHplEle9Ohqxo9k7k2uySwoP9y/Pb0Bl0ODoqBschPjZVPZKm7xZ4GEurDJ7GFv71NXTWYKN
Maybe you are falling on a bug already reported 3 time this week :)
Could you try calling `CGAL::Polygon_mesh_processing::remove_isolated_vertices(to_be_cut)` ?
https://doc.cgal.org/latest/Polygon_mesh_processing/group__PMP__repairing__grp.html#ga91c02ef57e638faf2622eae93e7a25e2
It will remove isolated vertices that facets_in_complex_2_to_triangle_mesh should not create.
A "true" fix is already on its way:
https://github.com/CGAL/cgal/pull/4990
Best regards,
Sebastien.
On 9/11/20 10:12 AM, Kim ( via cgal-discuss Mailing List) wrote:
Hi everyone,
I am trying to clip a surface mesh using a closed PolygonMesh "shell" I am
importing from an external file. The section of the code in question looks
as follows:
CGAL::make_surface_mesh(c2t3, // Reconstructed mesh
(output)
surface, // Implicit surface
criteria, // Meshing criteria
CGAL::Manifold_tag()); // Require manifold mesh
PolygonMesh to_be_cut;
CGAL::facets_in_complex_2_to_triangle_mesh(c2t3, to_be_cut);
bool testing = CGAL::Polygon_mesh_processing::clip(to_be_cut, shell,
CGAL::parameters::clip_volume(true).use_compact_clipper(true));
This is giving me the followin error:
terminate called after throwing an instance of
'CGAL::Precondition_exception'
what(): CGAL ERROR: precondition violation!
Expr: CGAL::is_valid_polygon_mesh(tm)
File: ./libs/CGAL-5.1/include/CGAL/Polygon_mesh_processing/orientation.h
Since if I save the output of make_surface_mesh to a file and read the file
back in to a "PolygonMesh to_be_cut" the clipper has no problems, the
problem must lie in going from c2t3 to polygonMesh but I can't seem to
figure out how to make it work. Hopefully someone can help.
Kind regards,
Kim
--
Sent from: http://cgal-discuss.949826.n4.nabble.com/
- [cgal-discuss] Clip make_surface_mesh output, Kim, 09/11/2020
- Re: [cgal-discuss] Clip make_surface_mesh output, Sebastien Loriot (GeometryFactory), 09/11/2020
- Re: [cgal-discuss] Clip make_surface_mesh output, Kim, 09/11/2020
- Re: [cgal-discuss] Clip make_surface_mesh output, Sebastien Loriot (GeometryFactory), 09/11/2020
Archive powered by MHonArc 2.6.19+.