Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] minkowski_sum_2 assertion failures, even when using exact constructions

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] minkowski_sum_2 assertion failures, even when using exact constructions


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] minkowski_sum_2 assertion failures, even when using exact constructions
  • Date: Fri, 09 Oct 2015 16:03:35 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:9YD4AhVztOn5OmV10O6rBerNC0TV8LGtZVwlr6E/grcLSJyIuqrYZhKDt8tkgFKBZ4jH8fUM07OQ6PC8HzNfqsje+Fk5M7VyFDY9wf0MmAIhBMPXQWbaF9XNKxIAIcJZSVV+9Gu6O0UGUOz3ZlnVv2HgpWVKQka3CwN5K6zPF5LIiIzvjqbpq8GVPFoD2mX1SIgxBSv1hD2ZjtMRj4pmJ/R54TryiVwMRd5rw3h1L0mYhRf265T41pdi9yNNp6BprJYYAu2pN5g/GLdXBTBjP2Eu79DwrjHCSxGO7z0SSDY4iB1NVkL+4RvzRYvwvy2yku1n2S6GdY3ZQLcxVCi4/oliQwPvkjZGfXZt62XQkM13kORepDquohV+x8jfZ4TDZ6k2Rb/UYd5PHTkJZc1WTSEUWo4=
  • Organization: GeometryFactory

Could you give the 4.7 release a try?
The 2D minkowski sum package have been partly rework?

Thanks,

Sebastien.


On 10/09/2015 07:36 AM, Panaghis Mavrokefalos wrote:
Hello,

I have been using the minkowski_sum_2() function from the 2D Minkowski Sums
package to compute the sums of some non-convex, but simple polygons. In
some of
my test cases, I noticed CGAL assertion failures (pre- and post-condition
failures) at runtime, which I traced to calls of that function. I am
aware that
these sort of errors occur when using a kernel with inexact
consrtuctions, but
I made sure I was using the Exact_predicates_exact_constructions_kernel. At
first, I tried replacing the default (convolution) strategy with a
decomposition strategy (I chose Greene_convex_decomposition_2), but then the
errors occurred in another test case.

A test file is attached, reproducing the cases which triggerred the
errors. The
CMakeLists.txt file is generated using `cgal_create_CMakeLists -s main`.
I am
building with g++ version 4.8.4 and using CGAL version 4.5.1, configured
with
CMAKE_CXX_FLAGS=-frounding-math -std=c++11.

There are four different test cases, corresponding to the first command line
argument of the executable equal to 0 through 3. The simplicity of the input
polygons to the minkowski_sum_2() function is explicitly tested before the
call. For each test case, the output of the run of the executable is shown:

./main 0

p is simple
q is simple
Computing the Minkowski sum of p and q using the default strategy
terminate called after throwing an instance of
'CGAL::Precondition_exception'
what(): CGAL ERROR: precondition violation!
Expr: nodeP != NULL && nodeP->is_valid()
File: /usr/local/include/CGAL/Multiset.h
Line: 339
Aborted

./main 1

p is simple
q is simple
Computing the Minkowski sum of p and q using the default strategy
terminate called after throwing an instance of 'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: (!is_valid(i)) || (!is_valid(s)) || (!(i>s))
File: /usr/local/include/CGAL/Interval_nt.h
Line: 139
Explanation: Variable used before being initialized (or CGAL bug)
Aborted

./main 2

p is simple
q is simple
Computing the Minkowski sum of p and q using the default strategy
terminate called after throwing an instance of
'CGAL::Precondition_exception'
what(): CGAL ERROR: precondition violation!
Expr: nodeP != NULL && nodeP->is_valid()
File: /usr/local/include/CGAL/Multiset.h
Line: 339
Aborted

./main 3

p is simple
q is simple
Computing the Minkowski sum of p and q using the Greene decomposition
strategy
terminate called after throwing an instance of
'CGAL::Postcondition_exception'
what(): CGAL ERROR: postcondition violation!
Expr: convex_partition_is_valid_2(polygon.vertices_begin(),
polygon.vertices_end(), res.output_so_far_begin(),
res.output_so_far_end(), traits)
File: /usr/local/include/CGAL/Partition_2/partition_greene_approx_convex_2.h
Line: 834
Aborted

Since, as mentioned before, I am using an exact constructions kernel, and a
variety of different errors are produced, I am at a loss as to what is
wrong.
Any help would be greatly appreciated.





Archive powered by MHonArc 2.6.18.

Top of Page