Subject: CGAL users discussion list
List archive
- From: Andreas fabri <>
- To:
- Subject: Re: [cgal-discuss] Deleting faces to create a hole in a triangulation
- Date: Tue, 17 Sep 2019 17:47:09 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=None ; spf=None
- Ironport-phdr: 9a23:pPonRRxWD5LiJIrXCy+O+j09IxM/srCxBDY+r6Qd2uwVIJqq85mqBkHD//Il1AaPAdyArasawLSK++C4ACpcuMzH6ChDOLV3FDY9wf0MmAIhBMPXQWbaF9XNKxIAIcJZSVV+9Gu6O0UGUOz3ZlnVv2HgpWVKQka3OgV6PPn6FZDPhMqrye+y54fTYwJVjzahfL9+Nhq7oRjfu8UMnIdvK6k9xxrGr3BVf+ha2X5kKUickhrh+Mu85oJv/zhVt/k868NOTKL2crgiQ7dFFjomKWc15MPqtRnHUwSC42YXX3sVnBRVHQXL9Qn2UZjtvCT0sOp9wzSaMtbtTb8oQzSi7rxkRwHuhSwaKjM26mDXish3jKJGvBKsogF0zoDIbI2JMvd1Y6XQds4YS2VcRMZcTyxPDZ+zYYQAAeQPIOVWr4f/qFUQqhWzHhWsBPrqyjNUhn/6wbM23uI8Gg/GxgwgGNcOvWzIodXzKagSS/66w7PTzT7eYfNZwyzy6JLJchs8pvyDR7RwftfLyUYxDQzFlU+cqYL/MDyOzOQNsnOW7+V+WuKojm4otR1xoiKvx8cikIbGmp4Vylfe9SR52oo6Odq4SEtibNOiDZBeuSaaN45sTcMjRWFloCA6xacdtpGgeCgF1o4ryALYa/yCa4SI4xTjVPyQIThinn5ldqi/ihCv+kaj0u3xTtS43VRJoyZfnNTAqGoB2wHN5sWHUPdx4Fmt1DWX2w3d6OxIO104mKvYJpI7wLM8i4AfvVndEiL4nkj9kbWYeV8++uey7uTqerXmqYGYN49zkgzyL7oilta6AeQ/MwUCRW2b9v691L3n5EH5R6hKjuEsnqnerpDaJd4XpqinDA9Jyooj6hC/ACm60NkAgHUKLlFIdAiJgoT3IV3CPe70APelj1iyjjtmxOjKPrj7DZXMKnjDnq3hfbF460NE0gUzy81Q54hKBb4bO/L/QEHxu8bDAR8jMgy52OnnB8t61oMbR22PHrWZMaPcsVCS+u0vP+6MZJUVuTrnN/cl4PvugWcjmVABZampwYcXaHegE/t6LEWWe37sjs4cHmcLpQoxUPHqiEaZUTNIfHazX6c85ikhB468DIfDQJqtgL2b0yuhEJ1WfDMON1aXDH29d5mYQ+xeL2WJM8p5m3oFU6KgQskvz1a1pQriwv1mKOTTvSYXvJam2Nlu7PDIjkIO8ml/AM2Zlm2MVGpphXggRjks3ak5r1Yu5E2E1P1RhfBCGNVIr/1AWB07fcrVyeBgBtnpHAzIdM2IYFmrRdCrHSsgQNs639gUcgB2HND03UOL5DajH7JAz+/DP5cz6K+JhyGsdfY48G7P0ewat3djQsZLMjf71PclsQ3UWcjMmkSd0qG3aeIbwi6L8mqfnzLX4BNoFTVoWKCAZkgxI1PMpI6gtEzPSLqjFa42PAJK1cmYO+1Bbdi71QwXFsemA8zXZieKo0n1AB+Jwr2Wa4+wIjcS0SLYBVQegg4a9mqBLxl4DSCk8TrT
You should only mark instead of deleting.
> On 17 Sep 2019, at 12:22, malcolm
> <>
> wrote:
>
> Hi,
> I am using the Constrained Delaunay triangulation and I need to create a
> hole in a triangulation using a clipping rectangle. For this, I first add
> the cliprect points to the triangulation and then find all the faces that
> have a vertex within the clipping polygon. I then call delete_face on each
> of these faces.
>
> Here's my code:
>
> std::vector<Face_handle> facesToDelete;
> for (auto& fItr = tDelaunay.all_faces_begin();
> fItr != tDelaunay.all_faces_end();
> fItr++)
> {
> for (int i = 0; i < 3; i++)
> {
> auto& pt = fItr->vertex(i)->point();
>
> // holePolygon is the closed point polygon with methods to find
> if a
> point lies on or inside the polygon
> if (holePolygon.isPointInside(pt) && !holePolygon.isPointOn(pt))
> // if
> face vertex is in the interior of the hole polygon
> {
> facesToDelete.push_back(fItr);
> break;
> }
> }
> }
>
> for (auto& face : facesToDelete)
> {
> tDelaunay.delete_face(face);
> }
>
>
> This works fine and I get the required hole. However, if I now add a vertex
> to this triangulation, I get a crash.
>
> I have tried using the make_hole() method too, and even with this, I run
> into problems. Is there another way to create a hole in a CDT?
>
>
>
> --
> 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] Deleting faces to create a hole in a triangulation, malcolm, 09/17/2019
- Re: [cgal-discuss] Deleting faces to create a hole in a triangulation, Olivier Devillers, 09/17/2019
- Re: [cgal-discuss] Deleting faces to create a hole in a triangulation, malcolm, 09/18/2019
- Re: [cgal-discuss] Deleting faces to create a hole in a triangulation, malcolm, 09/18/2019
- Re: [cgal-discuss] Deleting faces to create a hole in a triangulation, malcolm, 09/18/2019
- Re: [cgal-discuss] Deleting faces to create a hole in a triangulation, Andreas fabri, 09/17/2019
- Re: [cgal-discuss] Deleting faces to create a hole in a triangulation, Olivier Devillers, 09/17/2019
Archive powered by MHonArc 2.6.18.