Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Arrangement_2::insert_foo_bar preconditions

Subject: CGAL users discussion list

List archive

[cgal-discuss] Arrangement_2::insert_foo_bar preconditions


Chronological Thread 
  • From: "Ch'Gans" <>
  • To:
  • Subject: [cgal-discuss] Arrangement_2::insert_foo_bar preconditions
  • Date: Thu, 9 Mar 2017 00:04:11 +1300
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:PdaHzBEnXXWxpkqD66wQEJ1GYnF86YWxBRYc798ds5kLTJ76ocqwAkXT6L1XgUPTWs2DsrQf2reQ7/yrADNIoc7Y9itdINoUD15NoP5VtjJjKfbNMVf8Iv/uYn5yN+V5f3ghwUuGN1NIEt31fVzYry76xzcTHhLiKVg9fbytScaBx/iwguu98pmWbwRTjyemeptzKg+3pEPfrJo4m4xnf+waylTmq31TMawCzmNnLFSItxn674G35pE1oHcYgO4o68MVCfayRK8/V7ENVDk=

Hi there,

The various arrangement insert functions (not the free/global ones),
that takes a predecessor half-edge as a parameter don't check for for
the geometric correctness of the operation, eg they will happily
insert (in the circular list around a vertex) an edge 'e' before
another edge 'pred' even if the x_monotone_curve 'c' associated with
'e' is not geometrically on the left/right of the x_monotone_curve
'c_pred' associated with 'pred'.
What is checked instead is 'e->face() == pred->face()', which is
equivalent to the above only when they don't share the same face. If
they share the same face, then chaos is allowed.

If i'm not wrong using the
Kernel::counterclockwise_in_between_2_object() is a better alternative
to ensure the edge 'e' fulfill the geometrical requirement of the
insert operation into the topology structure.

First of all, I would like to know if what I said above makes sense, a
sort of precondition: "do I understand how it's suppose to work?" ;)

If I am right, then i'm curious to know why it is so. Is it omitted
because it's obvious, too expensive to check for, cannot always been
checked in a generic way (eg.: circular kernel) or any other reason?

My bet is that the CounterclockwiseInBetween_2 concept is only
available in the linear kernels (it's not listed in "Function Object
Concepts" chapter of the 2D Arrangements documentation). Thought i'm
still interesting to hear anyone's opinion on that matter.

As a user of an non-linear arrangement, if for example I have to use
insert_at_vertices(c, e1, e2), and I don't want my app to crash, then
i need a way to check for the validity of the insertion. If i can
validate this myself in a way that doesn't require something the
arrangement doesn't have access to, then couldn't this validation be
moved into the arrangement itself?

Regards,
Chris



Archive powered by MHonArc 2.6.18.

Top of Page