Subject: CGAL users discussion list
List archive
- From: "Ch'Gans" <>
- To:
- Subject: [cgal-discuss] Arrangement observer and notification order
- Date: Thu, 2 Mar 2017 17:56:34 +1300
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:IObyUh1aONvhkVxksmDT+DRfVm0co7zxezQtwd8ZsewRI/ad9pjvdHbS+e9qxAeQG96KtrQf0qGG7+jJYi8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6JvjvGo7Vks+7y/2+94fdbghMhDexe71/IAi5oQjSucQdnJdvJLs2xhbVuHVDZv5YxXlvJVKdnhb84tm/8Zt++ClOuPwv6tBNX7zic6s3UbJXAjImM3so5MLwrhnMURGP5noHXWoIlBdDHhXI4wv7Xpf1tSv6q/Z91SyHNsD4Ubw4RTKv5LptRRT1iikIKiQ5/XnXhMJ+j6xVvQyvqABkzo7IfI2YLuZycr/Bcd4YQ2dKQ8ZfVzZGAoO5d4YDAfQMPeZbo4f8vVQOqwC+CQexD+7o1jBIhnD20rc80+Q6CgzG0wogEMgUvHTTttX1O74fXOaox6fL1TXOd+1a1Sv55YTScR0soeuAUaxufcbN00UjCgHIg1WWpIf4JT2azP4NvHKe7+d4VeKglWonqwZprziq3Mgsi43JipsMylDH6Sl12Yg1KcC6RUN7e9KkH5xQtyaVN4tyXMwuWX1nuCE/yrEeuJ67ejYFyIg/yhLBd/CKd5KE7xHjWeqLPzt0mm5pdKiiixuw8UWs0uj8WdO10FZOoCpFiN7MtnUV2hPP6siHReFy/kG62TuU2ADT7/tLIUEwlabBN5EhxbswmoIJsUvfBi/2hFn2jKiOe0o49ein8eDnbqz7qZ+dLI97lhz+Mr81msGkGuQ5Mg0OX3CB9uim1b3j+1f5QLRQgfEsnKnZqsOSGcNOraGwB0pZ050o9g2kJzagytUR23cdf3xffxfSxaPpdH7HJuuyRaO0g1ullixDyPbPeLr7DcOefTD4jL79cOMluAZnww0pwIUH6g==
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
- [cgal-discuss] Arrangement observer and notification order, Ch'Gans, 03/02/2017
- Re: [cgal-discuss] Arrangement observer and notification order, Efi Fogel, 03/04/2017
- Re: [cgal-discuss] Arrangement observer and notification order, Ch'Gans, 03/05/2017
- Re: [cgal-discuss] Arrangement observer and notification order, Efi Fogel, 03/06/2017
- Re: [cgal-discuss] Arrangement observer and notification order, Ch'Gans, 03/05/2017
- Re: [cgal-discuss] Arrangement observer and notification order, Efi Fogel, 03/04/2017
Archive powered by MHonArc 2.6.18.