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:53:34 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:a3N6JByNR4bGmH7XCy+O+j09IxM/srCxBDY+r6Qd0eMWIJqq85mqBkHD//Il1AaPBtSDrasVwLuH+4nbGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2WVTerzWI4CIIHV2nbEwud7yzQ9+Z3pX//tvx0qWbWx9Piju5bOE6BzSNhiKViPMrh5B/IL060BrDrygAUe1XwWR1OQDbxE6ktY/jtKNl6Dla7vI969ZbA+K9ZLU9VbUeDTI8Mmlz6tesrgjGVQLI530SVSIdnRNMRgTE9xrnRYyijiyvveV03GyWPNb9UKsvcTWk9aZiDhHy2wkdMDtsyGbTwul3irnA6Cq8vQD6i9rQZJyTPbx4eb3UVdwfTGtFGM1WUnoSUcuHc4ITAr9Zbq5jpI7nqg5WoA==

Oops, premature send.

All edges are reported as outside of the domain, so do faces. Output below.

How do we define the 'domain'?

Number of dtm points: 100

First point 728682.0600 6879360.7400 59.6400

Start triangulation

Bounding box: 727200.0000 6880670.0000 0.0000 744250.0000 6860620.0000 250.0000

Number of points and faces of CDT: 104 202

0/305 edges are inside the domain

0/202 faces are inside de domain

Saved triangulation at C:/Users/Pol/codeheli/portho/sampledata/npdc_QD/output/dtmtriang_sub.off



On Fri, Jul 1, 2016 at 6:47 PM, Pol Monsó Purtí <> wrote:
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