Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Limiting the maximum length of an edge in a Delaunay triangulation

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Limiting the maximum length of an edge in a Delaunay triangulation


Chronological Thread 
  • From: Pol Monsó Purtí <>
  • To:
  • Subject: Re: [cgal-discuss] Limiting the maximum length of an edge in a Delaunay triangulation
  • Date: Fri, 1 Jul 2016 18:47:45 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:mFc6BhMwhb5cmOsR1Y4l6mtUPXoX/o7sNwtQ0KIMzox0KPX7rarrMEGX3/hxlliBBdydsKMczbOH+PGxEUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6anHS+4HYoFwnlMkItf6KuS9aU1pX8hrH60qaQSj0AvCC6b7J2IUf+hiTqne5Sv7FfLL0swADCuHpCdrce72ppIVWOg0S0vZ/or9YwuxlWoO8ros5cTb3hLeN/Vq1dFD1gMmYv5cStuwOEVhqK/nJbU2MYlV1DDAHBqR37RZzsqTCpiu0o0yaTOYj6TKs/RC+5x6ZtUh7hzikdZBAj92SCsst0xIdcpgk67yRi2ZJRKNWRMOd4d+Xbes0TbWVEV8dVESdGB9XvPMM0E+MdMLMA/MHGrFwUoE7mCA==

It seems the bound is still incorrect.

In addition the bounding box, I've added the following code to check which edges are outside of the domain:
int edgesIn = 0;
    int numedges = 0;

    for (CDT::Finite_edges_iterator eit = cdt.finite_edges_begin(); eit != cdt.finite_edges_end(); ++eit)
    {
        numedges++;
        const CDT::Face_handle& fh = eit->first;

        if(!fh->is_in_domain() && !fh->neighbor(eit->second)->is_in_domain())
        {
            //both faces are outside the domain
            continue;
        }
        edgesIn++;
    }

    std::cout << edgesIn << "/" << numedges << " edges are inside the domain" << std::endl;


How do we define the 'domain'?


On Fri, Jul 1, 2016 at 5:00 PM, Pol Monsó Purtí <> wrote:

Ah, I understand now how the 'domain' is defined. I wrongly assumed the bound was computed automatically by following the outer edges. We have no specific constrains that define an outer bound

I've added what you suggested and refining didn't immediately return. In fact, it never returned. It keeps computing forever.

I was worried maybe I had too many points, but I've tried with 10 points (+4 from the box) to the same outcome. Debugging a little bit it appears no_longer_element_to_refine(); always returns false.

Do you know what else could be wrong?

Isn't there another way to prevent the creation of long edges? Force the violating vertices to attach to the infinite vertex, for example.

I still wonder what would the refine do on the long edges required to connect with the box's vertices. The edges to the bounding box's vertices will never fulfill the criteria, could that be why it doesn't finish?

Another alternative I've thought of is to set the bound to the perimeter of the point cloud. Then I presume I can distinguish the faces with is_in_domain, although the long edges will still be there.

Cheers,

Pol

On Wed, Jun 29, 2016 at 6:11 PM, Laurent Rineau (CGAL/GeometryFactory) <> wrote:
Le Wednesday 29 June 2016 16:34:33 Pol Monsó Purtí a écrit :
>     cdt.insert(bbul);
>
>     cdt.insert(bbbl);
>
>     cdt.insert(bbur);
>
>     cdt.insert(bbbr);

Here you have inserted only the four vertices of the box, and not its edges as
constraints. Use instead:

    Vertex_handle v_bbul = cdt.insert(bbul);
    Vertex_handle v_bbbl = cdt.insert(bbbl);
    Vertex_handle v_bbur = cdt.insert(bbur);
    Vertex_handle v_bbbr = cdt.insert(bbbr);

    cdt.insert_constraint(v_bbul, v_bbur);
    cdt.insert_constraint(v_bbur, v_bbbr);
    cdt.insert_constraint(v_bbbr, v_bbbl);
    cdt.insert_constraint(v_bbbl, v_bbul);

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory           http://www.geometryfactory.com/
Release Manager of the CGAL Project       http://www.cgal.org/


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

Top of Page