Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Arrangement observer and notification order

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Arrangement observer and notification order


Chronological Thread 
  • From: Efi Fogel <>
  • To:
  • Subject: Re: [cgal-discuss] Arrangement observer and notification order
  • Date: Sat, 4 Mar 2017 13:02:51 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:MJYV5xGHKTayhFWkU7BzIJ1GYnF86YWxBRYc798ds5kLTJ78r8ywAkXT6L1XgUPTWs2DsrQf2reQ6P6rAD1IyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSijewZbN/IA+4oAjQucUanI9vIbstxxXUpXdFZ/5Yzn5yK1KJmBb86Maw/Jp9/ClVpvks6c1OX7jkcqohVbBXAygoPG4z5M3wqBnMVhCP6WcGUmUXiRVHHQ7I5wznU5jrsyv6su192DSGPcDzULs5Vyiu47ttRRT1jioMKjw3/3zNisFojq1brhKvqRJ8zYDJfo+aKOFzcbnBcd4AX2dNQtpdWi5HD4ihb4UPFe0BPeNAoofyqVsOrAa1CwmrBOPg1DBIgmL90Kok3OQvEAHG0gsgH90Qv3TQt9j1O6ISXvq0zKnM1znMc/RW2TLk5YXObxsvr/aMXbdqfsrQz0kiDwLFjlOKqYzkJTyZzOoNs3Kd4uF9Vuyvk3Yqpx9trjWr3MshiYnEipgLxlzZ9ih12oY4KcG+RUVme9CrCoFQuDufN4ZuQsMtXWVouCEix70Do5G7fSwKxI0gxx7ed/CLaoaI7xL/WOqLLjd4g3VleL27hxms60Sv1ur8Vsys3FZLqCpKjMXMu2gT2xDP7sWLUPhw80e71TqRygze6ftILEAomabDLp4u2L8wlp4dsUTZGS/2nV37g7GYdkUl9Oio7OvnbavippKHOI90jxvxMqUqmsClHes4NQ0OU3CB+eugzL3j4VH5QLJSg/IqnanWqpTaKd0Gqa64GA9azpsj6w2kDzq9y9QZnXwHLEpfdx6djojpPUvOIPHiAvuljVSsimQj+vbdI7e0AonRNmOR1/D6bLNl4ghdzhAyxJZR/dVPG7QZKbXyXEH289fXBxt8Pw2vyPv8E4ZB0dYVVmuLR6OYK6jPqkSg5+Q1IuDKapVGliz6Lq0I6f+mo3g2lFtVKaSn3JUQZ328NvtjKkSdJ3Hrh4FSQi8xogMiQbmy2xW5WjlJaiPqUg==

I think that you are correct on both counts.
It should be symmetric and I'd pick the first order.
We will fix it.

   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/



On 2 March 2017 at 06:56, Ch'Gans <> wrote:
When inserting a (isolated) segment:
- Before create vertex
- After create vertex
- Before create vertex
- After create vertex
- Before create Edge
- After create edge

When removing a (isolated) segment:
- Before remove edge
- Before remove vertex
- After remove vertex
- Before remove vertex
- After remove vertex
- After remove edge


As you can see inserting and removing edges lead to a non symetrical
notification ordering, which I think is a bug.

I think that the notification ordering when inserting the edge is
correct, you start by inserting the first vertex, then the second, and
finally you *can* insert the edge since the 2 vertices are "fully"
inserted.
And so, the notification ordering when removing an edge is bogus, the
notifications should be: remove the edge, then remove a vertex (since
it is not used by any edge), then remove the other vertex.

I'm using the observer to maintain a (Qt) tree model of edges,
vertices and faces.
With Qt model/view, you *cannot* say:
- i'm about to remove something somewhere
- i'm about to remove something else somewhere else
- i'm have removed something somewhere
- i'm have removed something else somewhere else

Actually the above could work if 'something else' was a child of
'something', which is not my case, since my root items have 2
children:
- an Edge list node, whith Edge children
- a Vertex list node, with vertex children

Now, you might say that it is not because the CGAL ArrangementObserver
doesn't behave in a friendly way for my use-case (QAbstractItemModel),
that it is broken.
True. Nonetheless, I tend to consider non-symetrical behaviour as
design errors. In SW design, it usually doesn't make sense to
construct something following an order and dis-construct it using a
completely different order.

What do you guys think?

Chris

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