Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Unexpected assertion with arrangement insert_at_vertices

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Unexpected assertion with arrangement insert_at_vertices


Chronological Thread 
  • From: "Ch'Gans" <>
  • To:
  • Subject: Re: [cgal-discuss] Unexpected assertion with arrangement insert_at_vertices
  • Date: Sat, 4 Mar 2017 10:24:38 +1300
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:p0uBIhCAbXMSWB5LI2VVUyQJP3N1i/DPJgcQr6AfoPdwSP75p8bcNUDSrc9gkEXOFd2CrakV1qyN7+u5BTNIoc7Y9itdINoUD15NoP5VtjJjKfbNMVf8Iv/uYn5yN+V5f3ghwUuGN1NIEt31fVzYry76xzcTHhLiKVg9fbytScaBx/mxzP24rp3Pfx1T1n36eqJ3NBzwrAPLt8BQj5ElMbc00hKOo31GfKNdympsYF6ShB3h/dzjwJk2+CtZv7ct9tVLTL7hV6U+V71RSjo8YE4v48i+/zLDAiSG4GBWGjEdkhVBBRPt4xfzGJDrvX2p5aJGxCCGMJiuHvgPUjO44vIzRQ==

On 4 March 2017 at 00:28, Efi Fogel
<>
wrote:
> Could you please attach a small program that reproduces the problem.

I used that approach (reproduce the problem with a small program),
and realised that it worked, always. So I dag deeper and pin-pointed
the problem, the root cause was a use-after-free in another part of my
application! On top of that i've switched to an exact construction
kernel, so now everything seems to work nicely.

Thanks,
Chris

>
> ____ _ ____ _
> /_____/_) o /__________ __ //
> (____ ( ( ( (_/ (_/-(-'_(/
> _/
>
>
>
> On 3 March 2017 at 04:53, Ch'Gans
> <>
> wrote:
>>
>> Hi there,
>>
>> I am trying to insert segment whose end points correspond to existing
>> vertices.
>> Here is the use case that trigger an assertion:
>> - insert 4 segment to form a 4 sided face 'F'
>> - insert a segment S1 to form the first diagonal of 'F' (causing F to
>> be split in 2)
>> - insert a segment S2 to form the second diagonal of 'F' (visually
>> speaking)
>>
>> The 2 diagonals are inserted using
>> "insert_at_vertices(Segment(v1->point(), v2->point()), v1, v2)"
>>
>> When inserting the second diagonal i get an assertion:
>> ------------------------------
>> terminate called after throwing an instance of
>> 'CGAL::Precondition_exception'
>> what(): CGAL ERROR: precondition violation!
>> Expr: f == f2
>> File:
>> /usr/local/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h
>> Line: 2667
>> Explanation: The two halfedges must share the same incident face
>> ------------------------------
>>
>> I get the same results, using CGAL-4.8.1-1build1 and CGAL from git.
>>
>> Looking at the documentation i cannot see this precondition listed,
>> here is the list of preconditions:
>> 1. The interior of c is disjoint from all existing arrangement
>> vertices and edges.
>> 2. c must not be an unbounded curve.
>> 3. v1 and v2 are associated with c's endpoints.
>> 4. If v1 and v2 are already connected by an edge, this edge represents
>> an x-monotone curve that is interior-disjoint from c).
>>
>> I'm clearly not violating 2, 3 and 4. Am I violating 1? If so, could
>> someone shed some light on the meaning of it and what it implies?
>> If not, then shouldn't the documentation be updated? I'm happy to make
>> the change and do a pull request for it.
>>
>> Thanks,
>> 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