问题
I am using the Arrangements package of CGAL 4.7 (64-bit, on Windows) to make 2-d arrangements of Bezier curves for a research project. Unfortunately, I keep experiencing crashes on some -usually (near) degenerate- input, when inserting Bezier curves.
As a simple example I have added the content of two data files that can be read by the Bezier_curve example project provided with CGAL 4.7 (found in .../CGAL-4.7/examples/Arrangement_on_surface_2).
The example crashes for me if I feed it either of the two files.
The example works correctly for me if I use the Bezier.dat file that comes with it, and on some other test cases that I tried.
Bezier_crash1.dat - (very simple test case)
1
4 0 100 100 0 100 200 0 100
Bezier_crash2.dat - (encountered and recorded in my own experiments)
6
4 2581853/262144 174874249452033/4398046511104 5673646619833933/35184372088832 2756888783932123/70368744177664 6296137/131072 15962699/131072 105/2 5687589/65536
4 105/2 5687589/65536 7466423/131072 6787657/131072 4884829/32768 1213073/16384 120 13200823/131072
4 120 13200823/131072 13772385/131072 14995659/131072 8262217/131072 13388069/131072 105/2 5687589/65536
4 105/2 5687589/65536 5500343/131072 9362287/131072 5544234768323137/35184372088832 5711427009345511/140737488355328 2581853/262144 183625004300137/2199023255552
4 696761914568827/4398046511104 3007857/16384 1156274078886441/17592186044416 301767055302015/8796093022208 4173567/65536 1173535/8192 97589/1024 428833/4096
4 97589/1024 428833/4096 8317825/65536 541797/8192 10142101/131072 1505657/16384 9752923/131072 1168223/16384
I don't know if I should (and am allowed to) post the code of the CGAL example, please let me know if it's needed. I also have more crashing test cases than just these two, but I am hoping that these crashes are a problem with my personal CGAL setup, and that the rest will magically be solved when I fix it :)
回答1:
We have fixed the bug that most probably causes this problem. It was in the CGAL component that handles Bezier curves, namely, Arr_Bezier_curve_traits_2.h.
来源:https://stackoverflow.com/questions/34879786/cgal-4-7-arrangement-of-bezier-curves-crashes-on-some-inputs